SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | ((Go to my profile pls and join my game. Name (SurviveMyDEV). The first people to join gets Free Admin to abuse others)) | |
3 | ||
4 | local plrs = game:GetService("Players") | |
5 | local TeamBased = true ; local teambasedswitch = "o" | |
6 | local presskeytoaim = true; local aimkey = "e" | |
7 | local raycast = false | |
8 | ||
9 | local espupdatetime = 5; autoesp = false | |
10 | ||
11 | ||
12 | ||
13 | local lockaim = true; local lockangle = 5 | |
14 | ||
15 | ||
16 | ||
17 | --function findwat(folder, what) | |
18 | -- for i, smth in pairs(folder:GetChildren()) do | |
19 | -- if string.find(string.lower(tostring(smth)), string.lower(what)) then | |
20 | -- return smth | |
21 | -- end | |
22 | -- end | |
23 | --end | |
24 | -- | |
25 | --local plrs = findwat(game, "Players") | |
26 | ||
27 | ||
28 | ||
29 | ||
30 | local Gui = Instance.new("ScreenGui") | |
31 | local Move = Instance.new("Frame") | |
32 | local Main = Instance.new("Frame") | |
33 | local EspStatus = Instance.new("TextLabel") | |
34 | local st1 = Instance.new("TextLabel") | |
35 | local st1_2 = Instance.new("TextLabel") | |
36 | local st1_3 = Instance.new("TextLabel") | |
37 | local Name = Instance.new("TextLabel") | |
38 | --Properties: | |
39 | Gui.Name = "Gui" | |
40 | Gui.Parent = plrs.LocalPlayer:WaitForChild("PlayerGui") | |
41 | ||
42 | Move.Name = "Move" | |
43 | Move.Parent = Gui | |
44 | Move.BackgroundColor3 = Color3.new(0.0431373, 1, 0.0745098) | |
45 | Move.BackgroundTransparency = 0.40000000596046 | |
46 | Move.BorderSizePixel = 0 | |
47 | Move.Position = UDim2.new(0.005, 0,0.018, 0) | |
48 | Move.Size = UDim2.new(0.28141585, 0, 0.0320388414, 0) | |
49 | ||
50 | Main.Name = "Main" | |
51 | Main.Parent = Move | |
52 | Main.BackgroundColor3 = Color3.new(0.176471, 0.176471, 0.176471) | |
53 | Main.BackgroundTransparency = 0.69999998807907 | |
54 | Main.Position = UDim2.new(0, 0, 0.995670795, 0) | |
55 | Main.Size = UDim2.new(1.0000006, 0, 9.79697132, 0) | |
56 | ||
57 | EspStatus.Name = "EspStatus" | |
58 | EspStatus.Parent = Main | |
59 | EspStatus.BackgroundColor3 = Color3.new(1, 1, 1) | |
60 | EspStatus.BackgroundTransparency = 1 | |
61 | EspStatus.Size = UDim2.new(0.272955924, 0, 0.161862016, 0) | |
62 | EspStatus.Font = Enum.Font.ArialBold | |
63 | EspStatus.Text = "Press T to update Esp" | |
64 | EspStatus.TextColor3 = Color3.new(0.0431373, 1, 0.0745098) | |
65 | EspStatus.TextScaled = true | |
66 | EspStatus.TextSize = 14 | |
67 | EspStatus.TextWrapped = true | |
68 | ||
69 | st1.Name = "st1" | |
70 | st1.Parent = Main | |
71 | st1.BackgroundColor3 = Color3.new(1, 1, 1) | |
72 | st1.BackgroundTransparency = 1 | |
73 | st1.Position = UDim2.new(0.271787882, 0, 0, 0) | |
74 | st1.Size = UDim2.new(0.728211343, 0, 0.161862016, 0) | |
75 | st1.Font = Enum.Font.ArialBold | |
76 | st1.Text = "Press "..aimkey.." to lock on a person inside ur view" | |
77 | st1.TextColor3 = Color3.new(0.0431373, 1, 0.0745098) | |
78 | st1.TextScaled = true | |
79 | st1.TextSize = 14 | |
80 | st1.TextWrapped = true | |
81 | ||
82 | st1_2.Name = "st1" | |
83 | st1_2.Parent = Main | |
84 | st1_2.BackgroundColor3 = Color3.new(1, 1, 1) | |
85 | st1_2.BackgroundTransparency = 1 | |
86 | st1_2.Position = UDim2.new(0, 0, 0.375590861, 0) | |
87 | st1_2.Size = UDim2.new(0.999999881, 0, 0.161862016, 0) | |
88 | st1_2.Font = Enum.Font.ArialBold | |
89 | st1_2.Text = "Press L to enable esp loop" | |
90 | st1_2.TextColor3 = Color3.new(0.0431373, 1, 0.0745098) | |
91 | st1_2.TextScaled = true | |
92 | st1_2.TextSize = 14 | |
93 | st1_2.TextWrapped = true | |
94 | ||
95 | st1_3.Name = "st1" | |
96 | st1_3.Parent = Main | |
97 | st1_3.BackgroundColor3 = Color3.new(1, 1, 1) | |
98 | st1_3.BackgroundTransparency = 1 | |
99 | st1_3.Position = UDim2.new(0, 0, 0.18558608, 0) | |
100 | st1_3.Size = UDim2.new(0.999999881, 0, 0.161862016, 0) | |
101 | st1_3.Font = Enum.Font.ArialBold | |
102 | st1_3.Text = "Press O to change team based mode" | |
103 | st1_3.TextColor3 = Color3.new(0.0431373, 1, 0.0745098) | |
104 | st1_3.TextScaled = true | |
105 | st1_3.TextSize = 14 | |
106 | st1_3.TextWrapped = true | |
107 | local teambasedstatus = st1_3:Clone() | |
108 | teambasedstatus.Parent = st1_3 | |
109 | teambasedstatus.TextScaled = true | |
110 | teambasedstatus.Position = UDim2.new(0, 0,0.694, 0) | |
111 | teambasedstatus.Text = tostring(TeamBased) | |
112 | ||
113 | Name.Name = "Name" | |
114 | Name.Parent = Move | |
115 | Name.BackgroundColor3 = Color3.new(1, 1, 1) | |
116 | Name.BackgroundTransparency = 1 | |
117 | Name.Size = UDim2.new(0.838, 0, 0.980000019, 0) | |
118 | Name.Font = Enum.Font.Arial | |
119 | Name.Text = "FPS gui v1.0" | |
120 | Name.TextColor3 = Color3.new(0, 0, 0) | |
121 | Name.TextScaled = true | |
122 | Name.TextSize = 14 | |
123 | Name.TextWrapped = true | |
124 | Name.TextXAlignment = Enum.TextXAlignment.Left | |
125 | -- Scripts: | |
126 | ||
127 | ||
128 | local plrsforaim = {} | |
129 | ||
130 | local lplr = game:GetService("Players").LocalPlayer | |
131 | Move.Draggable = true | |
132 | Gui.ResetOnSpawn = false | |
133 | Gui.Name = "Chat" | |
134 | Gui.DisplayOrder = 999 | |
135 | ||
136 | Gui.Parent = plrs.LocalPlayer.PlayerGui | |
137 | ||
138 | ||
139 | f = {} | |
140 | local espforlder | |
141 | ||
142 | f.addesp = function() | |
143 | --print("ESP ran") | |
144 | if espforlder then | |
145 | else | |
146 | espforlder = Instance.new("Folder") | |
147 | espforlder.Parent = game.Workspace.CurrentCamera | |
148 | end | |
149 | for i, v in pairs(espforlder:GetChildren()) do | |
150 | v:Destroy() | |
151 | end | |
152 | for _, plr in pairs(plrs:GetChildren()) do | |
153 | if plr.Character and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name then | |
154 | if TeamBased == true then | |
155 | if plr.Team.Name ~= plrs.LocalPlayer.Team.Name then | |
156 | local e = espforlder:FindFirstChild(plr.Name) | |
157 | if not e then | |
158 | --print("Added esp for team based") | |
159 | local bill = Instance.new("BillboardGui", espforlder) | |
160 | bill.Name = plr.Name | |
161 | bill.AlwaysOnTop = true | |
162 | bill.Size = UDim2.new(1,0,1,0) | |
163 | bill.Adornee = plr.Character.Head | |
164 | local Frame = Instance.new('Frame',bill) | |
165 | Frame.Active = true | |
166 | Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255) | |
167 | Frame.BackgroundTransparency = 0 | |
168 | Frame.BorderSizePixel = 0 | |
169 | Frame.AnchorPoint = Vector2.new(.5, .5) | |
170 | Frame.Position = UDim2.new (0.5,0,0.5,0) | |
171 | Frame.Size = UDim2.new (1,0,1,0) | |
172 | Frame.Rotation = 0 | |
173 | plr.Character.Humanoid.Died:Connect(function() | |
174 | bill:Destroy() | |
175 | end) | |
176 | end | |
177 | end | |
178 | else | |
179 | local e = espforlder:FindFirstChild(plr.Name) | |
180 | if not e then | |
181 | --print("Added esp") | |
182 | local bill = Instance.new("BillboardGui", espforlder) | |
183 | bill.Name = plr.Name | |
184 | bill.AlwaysOnTop = true | |
185 | bill.Size = UDim2.new(1,0,1,0) | |
186 | bill.Adornee = plr.Character.Head | |
187 | local Frame = Instance.new('Frame',bill) | |
188 | Frame.Active = true | |
189 | Frame.BackgroundColor3 = Color3.new(0/255,255/255,0/255) | |
190 | Frame.BackgroundTransparency = 0 | |
191 | Frame.BorderSizePixel = 0 | |
192 | Frame.AnchorPoint = Vector2.new(.5, .5) | |
193 | Frame.Position = UDim2.new (0.5,0,0.5,0) | |
194 | Frame.Size = UDim2.new (1,0,1,0) | |
195 | Frame.Rotation = 0 | |
196 | plr.Character.Humanoid.Died:Connect(function() | |
197 | bill:Destroy() | |
198 | end) | |
199 | end | |
200 | end | |
201 | ||
202 | ||
203 | end | |
204 | end | |
205 | end | |
206 | local cam = game.Workspace.CurrentCamera | |
207 | ||
208 | local mouse = lplr:GetMouse() | |
209 | local switch = false | |
210 | local key = "k" | |
211 | local aimatpart = nil | |
212 | mouse.KeyDown:Connect(function(a) | |
213 | if a == "t" then | |
214 | print("worked1") | |
215 | f.addesp() | |
216 | elseif a == "u" then | |
217 | if raycast == true then | |
218 | raycast = false | |
219 | else | |
220 | raycast = true | |
221 | end | |
222 | elseif a == "l" then | |
223 | if autoesp == false then | |
224 | autoesp = true | |
225 | else | |
226 | autoesp = false | |
227 | end | |
228 | end | |
229 | if a == "j" then | |
230 | if mouse.Target then | |
231 | mouse.Target:Destroy() | |
232 | end | |
233 | end | |
234 | if a == key then | |
235 | if switch == false then | |
236 | switch = true | |
237 | else | |
238 | switch = false | |
239 | if aimatpart ~= nil then | |
240 | aimatpart = nil | |
241 | end | |
242 | end | |
243 | elseif a == teambasedswitch then | |
244 | if TeamBased == true then | |
245 | TeamBased = false | |
246 | teambasedstatus.Text = tostring(TeamBased) | |
247 | else | |
248 | TeamBased = true | |
249 | teambasedstatus.Text = tostring(TeamBased) | |
250 | end | |
251 | elseif a == aimkey then | |
252 | if not aimatpart then | |
253 | local maxangle = math.rad(20) | |
254 | for i, plr in pairs(plrs:GetChildren()) do | |
255 | if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then | |
256 | if TeamBased == true then | |
257 | if plr.Team.Name ~= lplr.Team.Name then | |
258 | local an = checkfov(plr.Character.Head) | |
259 | if an < maxangle then | |
260 | maxangle = an | |
261 | aimatpart = plr.Character.Head | |
262 | end | |
263 | end | |
264 | else | |
265 | local an = checkfov(plr.Character.Head) | |
266 | if an < maxangle then | |
267 | maxangle = an | |
268 | aimatpart = plr.Character.Head | |
269 | end | |
270 | print(plr) | |
271 | end | |
272 | plr.Character.Humanoid.Died:Connect(function() | |
273 | if aimatpart.Parent == plr.Character or aimatpart == nil then | |
274 | aimatpart = nil | |
275 | end | |
276 | end) | |
277 | end | |
278 | end | |
279 | else | |
280 | aimatpart = nil | |
281 | end | |
282 | end | |
283 | end) | |
284 | ||
285 | function getfovxyz (p0, p1, deg) | |
286 | local x1, y1, z1 = p0:ToOrientation() | |
287 | local cf = CFrame.new(p0.p, p1.p) | |
288 | local x2, y2, z2 = cf:ToOrientation() | |
289 | --local d = math.deg | |
290 | if deg then | |
291 | --return Vector3.new(d(x1-x2), d(y1-y2), d(z1-z2)) | |
292 | else | |
293 | return Vector3.new((x1-x2), (y1-y2), (z1-z2)) | |
294 | end | |
295 | end | |
296 | ||
297 | function getaimbotplrs() | |
298 | plrsforaim = {} | |
299 | for i, plr in pairs(plrs:GetChildren()) do | |
300 | if plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health > 0 and plr.Name ~= lplr.Name and plr.Character.Head then | |
301 | ||
302 | if TeamBased == true then | |
303 | if plr.Team.Name ~= lplr.Team.Name then | |
304 | local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p) | |
305 | local r = Ray.new(cf, cf.LookVector * 10000) | |
306 | local ign = {} | |
307 | for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do | |
308 | if v:IsA("BasePart") then | |
309 | table.insert(ign , v) | |
310 | end | |
311 | end | |
312 | local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign) | |
313 | if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then | |
314 | table.insert(plrsforaim, obj) | |
315 | end | |
316 | end | |
317 | else | |
318 | local cf = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, plr.Character.Head.CFrame.p) | |
319 | local r = Ray.new(cf, cf.LookVector * 10000) | |
320 | local ign = {} | |
321 | for i, v in pairs(plrs.LocalPlayer.Character:GetChildren()) do | |
322 | if v:IsA("BasePart") then | |
323 | table.insert(ign , v) | |
324 | end | |
325 | end | |
326 | local obj = game.Workspace:FindPartOnRayWithIgnoreList(r, ign) | |
327 | if obj.Parent == plr.Character and obj.Parent ~= lplr.Character then | |
328 | table.insert(plrsforaim, obj) | |
329 | end | |
330 | end | |
331 | ||
332 | ||
333 | end | |
334 | end | |
335 | end | |
336 | ||
337 | function aimat(part) | |
338 | cam.CFrame = CFrame.new(cam.CFrame.p, part.CFrame.p) | |
339 | end | |
340 | function checkfov (part) | |
341 | local fov = getfovxyz(game.Workspace.CurrentCamera.CFrame, part.CFrame) | |
342 | local angle = math.abs(fov.X) + math.abs(fov.Y) | |
343 | return angle | |
344 | end | |
345 | ||
346 | game:GetService("RunService").RenderStepped:Connect(function() | |
347 | if aimatpart then | |
348 | aimat(aimatpart) | |
349 | if aimatpart.Parent == plrs.LocalPlayer.Character then | |
350 | aimatpart = nil | |
351 | end | |
352 | end | |
353 | ||
354 | ||
355 | -- if switch == true then | |
356 | -- local maxangle = 99999 | |
357 | -- | |
358 | -- --print("Loop") | |
359 | -- if true and raycast == false then | |
360 | -- for i, plr in pairs(plrs:GetChildren()) do | |
361 | -- if plr.Name ~= lplr.Name and plr.Character and plr.Character.Head and plr.Character.Humanoid and plr.Character.Humanoid.Health > 1 then | |
362 | -- if TeamBased then | |
363 | -- if plr.Team.Name ~= lplr.Team.Name or plr.Team.TeamColor ~= lplr.Team.TeamColor then | |
364 | -- local an = checkfov(plr.Character.Head) | |
365 | -- if an < maxangle then | |
366 | -- maxangle = an | |
367 | -- aimatpart = plr.Character.Head | |
368 | -- if an < lockangle then | |
369 | -- break | |
370 | -- end | |
371 | -- end | |
372 | -- end | |
373 | -- else | |
374 | -- local an = checkfov(plr.Character.Head) | |
375 | -- if an < maxangle then | |
376 | -- maxangle = an | |
377 | -- aimatpart = plr.Character.Head | |
378 | -- if an < lockangle then | |
379 | -- break | |
380 | -- end | |
381 | -- end | |
382 | -- end | |
383 | -- | |
384 | -- | |
385 | -- | |
386 | -- | |
387 | -- end | |
388 | -- end | |
389 | -- elseif raycast == true then | |
390 | -- | |
391 | -- end | |
392 | ||
393 | if raycast == true and switch == false and not aimatpart then | |
394 | getaimbotplrs() | |
395 | aimatpart = nil | |
396 | local maxangle = 999 | |
397 | for i, v in ipairs(plrsforaim) do | |
398 | if v.Parent ~= lplr.Character then | |
399 | local an = checkfov(v) | |
400 | if an < maxangle and v ~= lplr.Character.Head then | |
401 | maxangle = an | |
402 | aimatpart = v | |
403 | print(v:GetFullName()) | |
404 | v.Parent.Humanoid.Died:connect(function() | |
405 | aimatpart = nil | |
406 | end) | |
407 | end | |
408 | end | |
409 | end | |
410 | ||
411 | end | |
412 | end) | |
413 | delay(0, function() | |
414 | while wait(espupdatetime) do | |
415 | if autoesp == true then | |
416 | pcall(function() | |
417 | f.addesp() | |
418 | end) | |
419 | end | |
420 | end | |
421 | end) | |
422 | warn("loaded") |