View difference between Paste ID: RFcBJkHB and 9YU0gMrA
SHOW: | | - or go back to the newest paste.
1
--   /$$$$$$  /$$$$$$ /$$      /$$ /$$      /$$  /$$$$$$  /$$$$$$$  /$$   /$$  /$$$$$$         /$$$$$$      /$$$$$$ 
2
--  /$$__  $$|_  $$_/| $$$    /$$$| $$  /$ | $$ /$$__  $$| $$__  $$| $$  /$$/ /$$__  $$       /$$__  $$    /$$__  $$
3
-- | $$  \ $$  | $$  | $$$$  /$$$$| $$ /$$$| $$| $$  \ $$| $$  \ $$| $$ /$$/ | $$  \__/      |__/  \ $$   |__/  \ $$
4
-- | $$$$$$$$  | $$  | $$ $$/$$ $$| $$/$$ $$ $$| $$  | $$| $$$$$$$/| $$$$$/  |  $$$$$$          /$$$$$/     /$$$$$$/
5
-- | $$__  $$  | $$  | $$  $$$| $$| $$$$_  $$$$| $$  | $$| $$__  $$| $$  $$   \____  $$        |___  $$    /$$____/ 
6
-- | $$  | $$  | $$  | $$\  $ | $$| $$$/ \  $$$| $$  | $$| $$  \ $$| $$\  $$  /$$  \ $$       /$$  \ $$   | $$      
7
-- | $$  | $$ /$$$$$$| $$ \/  | $$| $$/   \  $$|  $$$$$$/| $$  | $$| $$ \  $$|  $$$$$$/      |  $$$$$$//$$| $$$$$$$$
8
-- |__/  |__/|______/|__/     |__/|__/     \__/ \______/ |__/  |__/|__/  \__/ \______/        \______/|__/|________/
9
-- "IT ACTUALLY WORKS THIS TIME"
10
11
12
-- AIMWORKS 3.2: NEARLY DECENT..
13
-- THE GREATEST AIMBOT ON ROBLOX
14
-- AND PROBABLY THE BUGGIEST TOO
15
-- BUT WHATEVER IT'S GOOD ENOUGH
16
-- WRITTEN BY UNREAL AND SCAPTER
17
-- THANKS AUSTIN, CACA22, SAFAZI
18
-- THANKS THETRUERIAS TOO UR GR8
19
-- THANKS FOR CHOOSING FAZE SHIT
20
-- SHOUTOUT TO CHROME/XETRICS XD
21
22
-- i should probably be using userinputservice
23
-- tbh i shud probably get working on proper FOV stuffs 
24
-- prune dead vars
25
-- FOV restrictions 
26
-- ESPP :D(Chams - Scap)
27
28
-- added in this version (3.1): huge amount of bug fixes, even uglier code (i keep impressing myself with how bad this can get... i need 2 rewrite this soon),  
29
30-
local accuracy = 80
30+
local accuracy = 100
31
local aimkey = "f" --Disable/Enable AimWorks
32
local toggle_teamcheck = "h" --Ez-Pz Fix so people don't have to rejoin on FFA/TDM Games.
33
local lassokey = "q" --Disable/Enable Lasso Rendering
34
local control = "p" --Hide/UnHide Gui
35-
local headshot = 35
35+
local headshot = 100
36
local ignoreFOV    =  true
37
local ignoreWalls  =  true
38
local perfect_aim  =  true
39-
local perfect_aim_firstperson_distance = 100
39+
local perfect_aim_firstperson_distance = 200
40
local rage_triggers = false --Elysian Only
41
local RenderLassos =  true
42
local ShootingTeam =  false -- will target neutral people anyways XDDD
43
local SpreadControlRadius = Vector3.new(25, 25, 15) -- the larger you make those numbers the more likely your bullet is to hit. anything above 25, 25, 25 is a bit much. try 15, 15, 5
44
local trigger_speed = 0.1
45
local triggers  =  false --Elysian Only
46
local Chams = true --Works now!??!!?
47
48
--Player Whitelist(People who don't get shot at.)
49
local Whitelist = {"ihanks", "Lua_Environment", "like_clockwork", "Gin_Freecs", "AimWorks"}
50
for i,v in pairs(game.Players:GetChildren()) do  --Adds anyone in-game who's friends with the Currenet player into the list.
51
    if game.Players.LocalPlayer:IsFriendsWith(v.userId) then 
52
        table.insert(Whitelist, v.Name) 
53
    end 
54
end
55
56
game.Players.PlayerAdded:connect(function(player) --Adds friends to whitelist if they're just joining the game.
57
    if game.Players.LocalPlayer:IsFriendsWith(player.userId) then
58
        table.insert(Whitelist, player.Name)
59
    end
60
end)
61
62
-- todo --
63
_G.SwordFightMode = false -- stuff that i am testing goes in _G. so i can toggle it
64
65
-- aim engine vars
66
-- todo: more priorities
67
-- prune dead vars
68
local aim_through_list = {nil, nil, nil}
69
local bone_name
70
local camera = workspace.CurrentCamera
71
local closest_distance
72
local deathBlock
73
local distance
74
local FilteringEnabled = workspace.FilteringEnabled
75
local huge = math.huge
76
local in_fov
77
local lasso
78
local localplayer = game:GetService("Players").LocalPlayer
79
local most_viable_player
80
local mouse = localplayer:GetMouse()
81
local CreatorId = game.CreatorId
82
local players_service = game:GetService("Players")
83
local position
84
local random = math.random
85
local ray = Ray.new
86
local ray_start
87
local running = true
88
local sleeping
89
local target
90
local tele_bone
91
local targ_bone
92
local ticksslept = 0
93
local trigger_debounce
94
local vector
95
local viableplayers = {}
96
97
local function FindInstance(instance_className, search_directory) -- i can inline this in a LOT of places... plus i can very very easily make this return a table of all found parts if a certain parameter is passed... might add that feature to my boilerplate
98
99
	if not search_directory then return end
100
101
	for i, v in pairs(search_directory:GetChildren()) do
102
		if v.className == instance_className then
103
			return(v)
104
		end
105
	end
106
107
end
108
109
local function CreateBlockOfDeath()
110
111
	if deathBlock then deathBlock:Destroy() end
112
113
	deathBlock = Instance.new("Part", workspace)
114
	deathBlock.CanCollide = false
115
	deathBlock.Size = SpreadControlRadius
116
	deathBlock.Locked = true
117
	mouse.TargetFilter = deathBlock
118
	return deathBlock -- unnecessary
119
120
end -- Finished
121
122
local function ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, bone) -- note: figure out what i wanted to do with datas in here
123
124
	if not bone then
125
		return {_, false}
126
	end
127
128
	return camera:WorldToScreenPoint(player.Character[bone].Position)
129
130
end
131
132
local function ReturnsPlayerCheckResults(player)
133
134
	-- Checks teams. If we won't shoot teammates and they're a teammate when we're not neutral, target them. We do this now because it can save a lot of FPS.
135
	if not ShootingTeam then -- if not shooting teammates
136
		if player.TeamColor == localplayer.TeamColor then -- if we're not shooting teammates and they're teammates
137
			if not (player.Neutral and localplayer.Neutral) then -- if we're not shooting teammates and they're teammates and they're not neutral
138
				return false
139
			end
140
		end
141
	end
142
    
143
    --Read through player 'Whitelist'
144
    for i,v in pairs(Whitelist) do
145
    	if player.Name == v then
146
    		return false
147
    	end
148
    end
149
    
150
	-- Checks if person is yourself.
151
	if player == localplayer then
152
		return false
153
	end
154
155
	-- Checks if the player can be hurt.
156
	if FindInstance("ForceField", player.Character) or FindInstance("Humanoid", player.Character, true).MaxHealth == huge then
157
		return false
158
	end
159
160
	-- Checks if they're dead.
161
	if FindInstance("Humanoid", player.Character, true).Health == 0 then
162
		return false
163
	end
164
165
	-- Checks if person is in FOV.
166
	local screen_position, in_fov = ReturnsScreenCoordinatesAsVectorAndFOVChecksAsBool(player, "Torso")
167
	if not (in_fov or ignoreFOV) then
168
		return false
169
	else
170
		return player, screen_position
171
	end
172
173
end
174
175
local function ReturnsBoneOrFalse(player)
176
177
	if perfect_aim then
178
		return (FilteringEnabled and "Head" or "Left Arm") -- should be Head or left arm
179
	end
180
181
	if not (random(1, 100) <= accuracy) then
182
		return false
183
	end
184
185
	if (random(1, 100) <= headshot) and FilteringEnabled then
186
		return "Head"
187
	end
188
189
	return "Left Arm" -- should be left arm
190
191
end
192
193
194
-- rewrite for cursor distance checks then optimize
195
local function ReturnsViablePlayerOrNil() -- this is a clusterfuck i should probably branch this off into more functions... especially one for raycasting
196
	aim_through_list[1], aim_through_list[2] = deathBlock, localplayer.Character
197
	local distance = 1000
198
	local closest_distance = 1000
199
	local most_viable_player = nil
200
201
	-- FPS optimizations for shitty pcs... should more than double FPS in some situations. not really necessary for me :D..
202
	-- if sleeping and ticksslept ~= 15 then
203
	-- 	ticksslept = ticksslept + 1
204
	-- 	return target
205
	-- end
206
207
	local your_character = localplayer.Character
208
	local your_head = your_character and your_character:FindFirstChild "Head"
209
210
	for i, player_being_checked in pairs(players_service:GetPlayers()) do -- getplayers is underrated
211
212
		local player_or_false, targets_coordinates = ReturnsPlayerCheckResults(player_being_checked)
213
214
		if player_or_false then
215
216
			local char = player_being_checked.Character
217
			local target_torso = char and char:FindFirstChild "Torso" -- where the ray will aim/shoot for
218
219
			if target_torso then
220
221
				-- phantom fuckery tbh
222
				-- aim ahead (why arent we just taking advantage of ignorerays austin tf) of gun sights... Swag :O
223
				if (camera.Focus.p - camera.CoordinateFrame.p).magnitude <= 1 then
224
					ray_start = your_head.Position + your_head.CFrame.lookVector * 10 + Vector3.new(0, 3, 0)
225
				else
226
					ray_start = your_head.Position + Vector3.new(0, 2, 0)
227
				end
228
229
				-- ray_start = your_head.Position + your_head.CFrame.lookVector * 10 + Vector3.new(0, 3, 0) -- doododoo do DOODODOododoDoERFAhaagr
230
231
				if not targets_coordinates then -- unnecessary rn
232
					distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude -- broken
233
				else
234
					distance = (Vector2.new(targets_coordinates.X, targets_coordinates.Y) - Vector2.new(mouse.X, mouse.Y)).magnitude
235
				end
236
				vector = (target_torso.Position - ray_start)
237
238
				-- distance = vector -- bug
239
240
				if (not targets_coordinates) or (distance <= closest_distance) then
241
242
					-- create ray that starts at 'ray_start' and points towards the target
243
					local new_ray = ray(ray_start, vector.unit * 1000) -- "fire" ray and make sure to ignore our own character
244
					local hit, position = workspace:FindPartOnRayWithIgnoreList(new_ray, aim_through_list) -- check if the ray hit anything and if it's a descendant of the target's character
245
246
					if (hit and hit:isDescendantOf(char)) or ignoreWalls then
247
						-- only change closest_distance if the target character is visible
248
						closest_distance = distance
249
						most_viable_player = player_being_checked
250
					end -- hit or ignore walls
251
252
				end -- meets distance or no priority
253
254
			end -- closes player_or_false
255
256
		end -- closes player_or_false check
257
	end -- closes table loop
258
259
	blockName = ReturnsBoneOrFalse(most_viable_player)
260
	sleeping = true
261
	return most_viable_player
262
263
end -- closes function
264
265
266
function CreateChams()
267
	if Chams then
268
		for _,q in pairs(camera:GetChildren()) do
269
			if q:IsA("BoxHandleAdornment") then
270
				q:Destroy()
271
			end
272
		end
273
		for _,v in pairs(game.Players:GetChildren()) do
274
			if v.Name ~= game.Players.LocalPlayer.Name and v.Character then
275
				for _,c in pairs(v.Character:GetChildren()) do
276
					if c.Name ~= "Head" and c:IsA("BasePart") then
277
						for _,p in pairs(Whitelist) do
278
							if v.TeamColor == game.Players.LocalPlayer.TeamColor or v.Name == p then
279
								local esp = Instance.new("BoxHandleAdornment", camera)
280
								esp.Color3 = Color3.new(0, 255, 0)
281
								esp.Size = c.Size
282
								esp.AlwaysOnTop = true
283
								esp.ZIndex = 1
284
								esp.Adornee = c
285
							elseif v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
286
								local esp = Instance.new("BoxHandleAdornment", camera)
287
								esp.Color3 = Color3.new(255, 0, 0)
288
								esp.Size = c.Size
289
								esp.AlwaysOnTop = true
290
								esp.ZIndex = 1
291
								esp.Adornee = c
292
							end
293
						end
294
					end
295
				end 
296
			end
297
		end
298
	end
299
end
300
301
CreateChams()
302
303
game.Workspace.ChildAdded:connect(function(child)
304
	if child:IsA("Model") or child:IsA("Folder") or child:IsA("BasePart") then
305
		CreateChams()
306
	end
307
end)
308
309
game.Workspace.ChildRemoved:connect(function(child)
310
	if child:IsA("Model") or child:IsA("Folder") then
311
		CreateChams()
312
	end
313
end)
314
315
game.Players.LocalPlayer.Changed:connect(function()
316
	CreateChams()
317
end)
318
319
local function TargetPlayer(player) -- this needs to be refactored
320
321
	-- not needed anymore unless you want sticky aim (this can be a good thing) or the aimbot lags you
322
	-- sticky aim would be defined as "wont instantly target another guy if they enter the screen"
323
324
	-- if ticksslept == 15 then -- ok
325
	-- 	ticksslept = 0
326
	-- 	sleeping = false
327
	-- end
328
    
329
	if aim_through_list[3] then
330
		aim_through_list[3].Position = aim_through_list[3].Position + Vector3.new(0,200,0)
331
		table.remove(aim_through_list, 3)
332
	end
333
334
	if not player then -- i see this and i pretty much give up on rewriting
335
		if lasso then lasso:Destroy() lasso = nil end -- this feels wrong. i cant stand reusing code outside functions >:(
336
		target = nil
337
		lasso = Instance.new("SelectionPointLasso", camera)
338
		lasso.Humanoid, lasso.Point = FindInstance("Humanoid", localplayer.Character, true), mouse.Hit.p
339
		lasso.Color3 = Color3.new(0,255,0)
340
		return -- this one line here determines a surprising amount about how the aimbot works XD
341
		-- thats not a good thing :(
342
	end
343
344
	if RenderLassos then -- should be snaplassos... always gon be lassos tbh
345
		if lasso then lasso:Destroy() lasso = nil end
346
		lasso = Instance.new("SelectionPartLasso", camera)
347
	    lasso.Humanoid, lasso.Part = FindInstance("Humanoid", player.Character, true), game.Players.LocalPlayer.Character.Torso
348
	    lasso.Color3 = Color3.new(0,255,0)
349
	end
350
351
	bone_name = ReturnsBoneOrFalse(player)
352
353
	if player.Character.Head and bone_name then
354
		-- this lets us force headshots :D
355
		tele_bone = player.Character[bone_name]
356
		tele_bone.Parent = player.Character
357
		tele_bone.Size = SpreadControlRadius
358
		tele_bone.CanCollide = false
359
		tele_bone.CFrame = CFrame.new(workspace.CurrentCamera.CoordinateFrame.p + workspace.CurrentCamera.CoordinateFrame.lookVector * perfect_aim_firstperson_distance, workspace.CurrentCamera.CoordinateFrame.p) -- // thx to my main man safazi,,,, for this and for showing me the magic of coordinateframe <3
360
		tele_bone.Transparency=1
361
		tele_bone:ClearAllChildren()
362
		table.insert(aim_through_list, 3, tele_bone)
363
		-- swager
364
		target = player
365
		return player
366
367
	end
368
369
	if bone_name then
370
		deathBlock.Parent = player.Character
371
		deathBlock.CanCollide = false
372
		deathBlock.Name = bone_name
373
	else
374
		return
375
	end
376
377
	target = player
378
	return player
379
380
end
381
382
383
--[[
384
385
INIT PROCESS DOCUMENTATION:
386
387
1] CREATE DEATHBLOCK
388
2] MAKE DEATHBLOCK REGENERATE
389
3] USE BINDTORENDERSTEP TO START AIMBOT LOOP
390
4] DETECT KEY INPUT (WITHOUT USERINPUTSERVICE. I KNOW THAT IM LAME)
391
392
]]--
393
394
395
CreateBlockOfDeath()
396
workspace.DescendantRemoving:connect(function(instance)
397
	if instance == deathBlock then CreateBlockOfDeath() end
398
end)
399
-- Keeps blockie safe :33 XD
400
401
-- test? havent tried
402
local function shoot() -- elysian only :33333 XDd. bother jordan, not mememememe.
403
404
	if not mouse1press then return end
405
406
	if trigger_debounce then return end
407
408
	trigger_debounce = true
409
410
	if rage_triggers and mouse1press() then
411
412
		mouse1press()
413
		wait(0.1)
414
		mouse1release()
415
416
	elseif mouse1press then
417
418
		mouse1press()
419
		wait(0)
420
		mouse1release()
421
		wait(trigger_speed)
422
423
	end
424
425
	trigger_debounce = false
426
427
end
428
429
-- refaactorrrr
430
game:GetService("RunService"):BindToRenderStep("First", Enum.RenderPriority.First.Value, function() -- another clusterfuck
431
432
	if running then
433
		if localplayer.Character then -- pretty sure i do this in getviableplayer lmao tbh
434
			TargetPlayer(ReturnsViablePlayerOrNil())
435
			if target and target.Character then
436
				if localplayer:GetMouse().Target == deathBlock then return end -- praise targetfilter!
437
				-- later
438
				-- deathBlock.CFrame = CFrame.new(localplayer.Character.Head.Position + (mouse.Hit.p + localplayer.Character.Head.Position).unit * 16)
439
				-- print(deathBlock)
440
				if triggers then shoot() end
441
			else
442
				deathBlock.Parent = workspace
443
			end
444
		end
445
	end
446
447
end)
448
449
local Keys = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
450
Keys.Name = "AimWorks Container"
451
local Frame = Instance.new("Frame", Keys)
452
Frame.Name = "Holder"
453
Frame.BackgroundColor3 = Color3.new(62/255, 62/255, 62/255)
454
Frame.BackgroundTransparency = 0.3
455
Frame.BorderSizePixel = 2
456
Frame.BorderColor3 = Color3.new(255,255,255)
457
Frame.Size = UDim2.new(0, 200, 0, 300)
458
Frame.Position = UDim2.new(0, 0, 0.5, 0)
459
local Aim = Instance.new("TextLabel", Frame)
460
Aim.BackgroundTransparency = 1
461
Aim.Size = UDim2.new(0, 200, 0, 100)
462
Aim.FontSize = "Size32"
463
Aim.Font = "SourceSans"
464
Aim.Text = " Rendering Lassos: "..tostring(RenderLassos).." \n Key: "..lassokey
465
Aim.TextColor3 = Color3.new(255, 255, 255)
466
Aim.TextXAlignment = "Left"
467
Aim.TextStrokeTransparency = 0
468
Aim.TextYAlignment = "Top"
469
Aim.TextWrapped = true
470
local Team = Instance.new("TextLabel", Frame)
471
Team.Position = UDim2.new(0, 0, 0, 100)
472
Team.BackgroundTransparency = 1
473
Team.Size = UDim2.new(0, 200, 0, 100)
474
Team.FontSize = "Size32"
475
Team.Font = "SourceSans"
476
Team.Text = " Team Check: \n "..tostring(ShootingTeam).." \n Key: "..toggle_teamcheck
477
Team.TextColor3 = Color3.new(255, 255, 255)
478
Team.TextXAlignment = "Left"
479
Team.TextStrokeTransparency = 0
480
Team.TextYAlignment = "Top"
481
Team.TextWrapped = true
482
local Run = Instance.new("TextLabel", Frame)
483
Run.Position = UDim2.new(0, 0, 0, 200)
484
Run.BackgroundTransparency = 1
485
Run.Size = UDim2.new(0, 200, 0, 100)
486
Run.FontSize = "Size32"
487
Run.Font = "SourceSans"
488
Run.Text = " Running: "..tostring(running).." \n Key: "..aimkey
489
Run.TextColor3 = Color3.new(255, 255, 255)
490
Run.TextXAlignment = "Left"
491
Run.TextStrokeTransparency = 0
492
Run.TextYAlignment = "Top"
493
Run.TextWrapped = true
494
495
local keydown = mouse.KeyDown:connect(function(keys)
496
	if (keys == aimkey) then
497
		running = not running
498
		if (running) then
499
			print("[SILENTAIM] activated.")
500
			Run.Text = " Running: "..tostring(running).." \n Key: "..aimkey
501
		else
502
			print("[SILENTAIM] deactivated.")
503
			Run.Text = " Running: "..tostring(running).." \n Key: "..aimkey
504
		end
505
	end
506
end)
507
508
local keydowns = mouse.KeyDown:connect(function(keys)
509
	if (keys == toggle_teamcheck) then
510
		if (ShootingTeam) then
511
		    print("[SILENTAIM] Team Shooting deactivated")
512
			ShootingTeam = false
513
			Team.Text = " Team Check: \n "..tostring(ShootingTeam).." \n Key: "..toggle_teamcheck
514
		else
515
		    print("[SILENTAIM] Team Shooting activated")
516
			ShootingTeam = true
517
			Team.Text = " Team Check: \n "..tostring(ShootingTeam).." \n Key: "..toggle_teamcheck
518
		end
519
	end
520
end)
521
522
local keydowns = mouse.KeyDown:connect(function(keys)
523
	if (keys == lassokey) then
524
		if (RenderLassos) then
525
		    print("[SILENTAIM] No Longer Rendering Lassos")
526
			RenderLassos = false
527
			Aim.Text = " Rendering Lassos: "..tostring(RenderLassos).." \n Key: "..lassokey
528
		else
529
		    print("[SILENTAIM] Rendering Lassos")
530
			RenderLassos = true
531
			Aim.Text = " Rendering Lassos: "..tostring(RenderLassos).." \n Key: "..lassokey
532
		end
533
	end
534
end)
535
536
local keydowns = mouse.KeyDown:connect(function(keys)
537
	if (keys == control) then
538
		if (Frame.Visible == true) then
539
			Frame.Visible = false
540
		else
541
		   Frame.Visible = true
542
		end
543
	end
544
end)