· 5 years ago · May 24, 2020, 05:52 PM
1PASTEBIN
2GO API TOOLS FAQ DEALS
3paste
4SIGN IN SIGN UP
5Public Pastes
6JSON to HTML Table
7JavaScript | 3 min ago
8GPS
9C++ | 38 min ago
10Light Sensor Conju...
11JSON | 47 min ago
12Untitled
13Python | 55 min ago
14lab3
15SQL | 1 hour ago
16Untitled
17mIRC | 1 hour ago
18color.py
19Python | 1 hour ago
20Rust/Relm/ drawing...
21Rust | 2 hours ago
22
23
24
25SHARE
26TWEET
27
28aimbot SCRIPT for roblox games
29 a guest Jul 25th, 2019 15,351 Never
30
31
32Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
33rawdownloadcloneembedreportprint
34text 7.24 KB
35PLAYER = game.Players.LocalPlayer
36MOUSE = PLAYER:GetMouse()
37CC = game.Workspace.CurrentCamera
38
39ENABLED = false
40ESP_ENABLED = false
41
42_G.FREE_FOR_ALL = true
43
44_G.ESP_BIND = 52
45_G.CHANGE_AIM = 'q'
46
47_G.AIM_AT = 'Head'
48
49wait(1)
50
51function GetNearestPlayerToMouse()
52 local PLAYERS = {}
53 local PLAYER_HOLD = {}
54 local DISTANCES = {}
55 for i, v in pairs(game.Players:GetPlayers()) do
56 if v ~= PLAYER then
57 table.insert(PLAYERS, v)
58 end
59 end
60 for i, v in pairs(PLAYERS) do
61 if _G.FREE_FOR_ALL == false then
62 if v and (v.Character) ~= nil and v.TeamColor ~= PLAYER.TeamColor then
63 local AIM = v.Character:FindFirstChild(_G.AIM_AT)
64 if AIM ~= nil then
65 local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
66 local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
67 local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
68 local DIFF = math.floor((POS - AIM.Position).magnitude)
69 PLAYER_HOLD[v.Name .. i] = {}
70 PLAYER_HOLD[v.Name .. i].dist = DISTANCE
71 PLAYER_HOLD[v.Name .. i].plr = v
72 PLAYER_HOLD[v.Name .. i].diff = DIFF
73 table.insert(DISTANCES, DIFF)
74 end
75 end
76 elseif _G.FREE_FOR_ALL == true then
77 local AIM = v.Character:FindFirstChild(_G.AIM_AT)
78 if AIM ~= nil then
79 local DISTANCE = (AIM.Position - game.Workspace.CurrentCamera.CoordinateFrame.p).magnitude
80 local RAY = Ray.new(game.Workspace.CurrentCamera.CoordinateFrame.p, (MOUSE.Hit.p - CC.CoordinateFrame.p).unit * DISTANCE)
81 local HIT,POS = game.Workspace:FindPartOnRay(RAY, game.Workspace)
82 local DIFF = math.floor((POS - AIM.Position).magnitude)
83 PLAYER_HOLD[v.Name .. i] = {}
84 PLAYER_HOLD[v.Name .. i].dist = DISTANCE
85 PLAYER_HOLD[v.Name .. i].plr = v
86 PLAYER_HOLD[v.Name .. i].diff = DIFF
87 table.insert(DISTANCES, DIFF)
88 end
89 end
90 end
91
92 if unpack(DISTANCES) == nil then
93 return false
94 end
95
96 local L_DISTANCE = math.floor(math.min(unpack(DISTANCES)))
97 if L_DISTANCE > 20 then
98 return false
99 end
100
101 for i, v in pairs(PLAYER_HOLD) do
102 if v.diff == L_DISTANCE then
103 return v.plr
104 end
105 end
106 return false
107end
108
109GUI_MAIN = Instance.new('ScreenGui', game.CoreGui)
110GUI_TARGET = Instance.new('TextLabel', GUI_MAIN)
111GUI_AIM_AT = Instance.new('TextLabel', GUI_MAIN)
112
113GUI_MAIN.Name = 'AIMBOT'
114
115GUI_TARGET.Size = UDim2.new(0,200,0,30)
116GUI_TARGET.BackgroundTransparency = 0.5
117GUI_TARGET.BackgroundColor = BrickColor.new('Fossil')
118GUI_TARGET.BorderSizePixel = 0
119GUI_TARGET.Position = UDim2.new(0.5,-100,0,0)
120GUI_TARGET.Text = 'AIMBOT : OFF'
121GUI_TARGET.TextColor3 = Color3.new(1,1,1)
122GUI_TARGET.TextStrokeTransparency = 1
123GUI_TARGET.TextWrapped = true
124GUI_TARGET.FontSize = 'Size24'
125GUI_TARGET.Font = 'SourceSansBold'
126
127GUI_AIM_AT.Size = UDim2.new(0,200,0,20)
128GUI_AIM_AT.BackgroundTransparency = 0.5
129GUI_AIM_AT.BackgroundColor = BrickColor.new('Fossil')
130GUI_AIM_AT.BorderSizePixel = 0
131GUI_AIM_AT.Position = UDim2.new(0.5,-100,0,30)
132GUI_AIM_AT.Text = 'AIMING : HEAD'
133GUI_AIM_AT.TextColor3 = Color3.new(1,1,1)
134GUI_AIM_AT.TextStrokeTransparency = 1
135GUI_AIM_AT.TextWrapped = true
136GUI_AIM_AT.FontSize = 'Size18'
137GUI_AIM_AT.Font = 'SourceSansBold'
138
139local TRACK = false
140
141function CREATE(BASE, TEAM)
142 local ESP_MAIN = Instance.new('BillboardGui', PLAYER.PlayerGui)
143 local ESP_DOT = Instance.new('Frame', ESP_MAIN)
144 local ESP_NAME = Instance.new('TextLabel', ESP_MAIN)
145
146 ESP_MAIN.Name = 'ESP'
147 ESP_MAIN.Adornee = BASE
148 ESP_MAIN.AlwaysOnTop = true
149 ESP_MAIN.ExtentsOffset = Vector3.new(0, 1, 0)
150 ESP_MAIN.Size = UDim2.new(0, 5, 0, 5)
151
152 ESP_DOT.Name = 'DOT'
153 ESP_DOT.BackgroundColor = BrickColor.new('Bright red')
154 ESP_DOT.BackgroundTransparency = 0.3
155 ESP_DOT.BorderSizePixel = 0
156 ESP_DOT.Position = UDim2.new(-0.5, 0, -0.5, 0)
157 ESP_DOT.Size = UDim2.new(2, 0, 2, 0)
158 ESP_DOT.Visible = true
159 ESP_DOT.ZIndex = 10
160
161 ESP_NAME.Name = 'NAME'
162 ESP_NAME.BackgroundColor3 = Color3.new(255, 255, 255)
163 ESP_NAME.BackgroundTransparency = 1
164 ESP_NAME.BorderSizePixel = 0
165 ESP_NAME.Position = UDim2.new(0, 0, 0, -40)
166 ESP_NAME.Size = UDim2.new(1, 0, 10, 0)
167 ESP_NAME.Visible = true
168 ESP_NAME.ZIndex = 10
169 ESP_NAME.Font = 'ArialBold'
170 ESP_NAME.FontSize = 'Size14'
171 ESP_NAME.Text = BASE.Parent.Name:upper()
172 ESP_NAME.TextColor = BrickColor.new('Bright red')
173end
174
175function CLEAR()
176 for _,v in pairs(PLAYER.PlayerGui:children()) do
177 if v.Name == 'ESP' and v:IsA('BillboardGui') then
178 v:Destroy()
179 end
180 end
181end
182
183function FIND()
184 CLEAR()
185 TRACK = true
186 spawn(function()
187 while wait() do
188 if TRACK then
189 CLEAR()
190 for i,v in pairs(game.Players:GetChildren()) do
191 if v.Character and v.Character:FindFirstChild('Head') then
192 if _G.FREE_FOR_ALL == false then
193 if v.TeamColor ~= PLAYER.TeamColor then
194 if v.Character:FindFirstChild('Head') then
195 CREATE(v.Character.Head, true)
196 end
197 end
198 else
199 if v.Character:FindFirstChild('Head') then
200 CREATE(v.Character.Head, true)
201 end
202 end
203 end
204 end
205 end
206 end
207 wait(1)
208 end)
209end
210
211MOUSE.Button2Down:connect(function()
212 ENABLED = true
213end)
214
215MOUSE.Button2Up:connect(function()
216 ENABLED = false
217end)
218
219MOUSE.KeyDown:connect(function(KEY)
220 KEY = KEY:lower():byte()
221 if KEY == _G.ESP_BIND then
222 if ESP_ENABLED == false then
223 FIND()
224 ESP_ENABLED = true
225 print('ESP : ON')
226 elseif ESP_ENABLED == true then
227 wait()
228 CLEAR()
229 TRACK = false
230 ESP_ENABLED = false
231 print('ESP : OFF')
232 end
233 end
234end)
235
236MOUSE.KeyDown:connect(function(KEY)
237 if KEY == _G.CHANGE_AIM then
238 if _G.AIM_AT == 'Head' then
239 _G.AIM_AT = 'Torso'
240 GUI_AIM_AT.Text = 'AIMING : TORSO'
241 elseif _G.AIM_AT == 'Torso' then
242 _G.AIM_AT = 'Head'
243 GUI_AIM_AT.Text = 'AIMING : HEAD'
244 end
245 end
246end)
247
248game:GetService('RunService').RenderStepped:connect(function()
249 if ENABLED then
250 local TARGET = GetNearestPlayerToMouse()
251 if (TARGET ~= false) then
252 local AIM = TARGET.Character:FindFirstChild(_G.AIM_AT)
253 if AIM then
254 CC.CoordinateFrame = CFrame.new(CC.CoordinateFrame.p, AIM.CFrame.p)
255 end
256 GUI_TARGET.Text = 'AIMBOT : '.. TARGET.Name:sub(1, 5)
257 else
258 GUI_TARGET.Text = 'AIMBOT : OFF'
259 end
260 end
261end)
262
263repeat
264 wait()
265 if ESP_ENABLED == true then
266 FIND()
267 end
268until ESP_ENABLED == false
269RAW Paste Data
270
271
272
273We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
274
275Not a member of Pastebin yet?
276Sign Up, it unlocks many cool features!
277
278
279create new paste / dealsnew! / syntax languages / archive / faq / tools / night mode / api / scraping api
280privacy statement / cookies policy / terms of service / security disclosure / dmca / contact
281
282By using Pastebin.com you agree to our cookies policy to enhance your experience.
283Site design & logo © 2020 Pastebin; user contributions (pastes) licensed under cc by-sa 3.0 Dedicated Server Hosting by Steadfast