Version / Update: v1.0.0
- Download / Script Link
- local replicated_storage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local remotes = replicated_storage.Remotes
local local_player = players.LocalPlayer
local storage = {
gamemode_list = {
hunt = {
roles = {
traitors = true,
detective = true,
innocents = true,
assault = false,
machinegunner = false,
breacher = false,
fighter = false,
juggernaut = false,
},
guns_spawn = true,
team_battle = false,
},
tdm = {
roles = {
traitors = false,
detective = false,
innocents = false,
assault = true,
machinegunner = true,
breacher = true,
fighter = false,
juggernaut = false,
},
guns_spawn = false,
team_battle = true,
},
juggernaut = {
roles = {
traitors = false,
detective = false,
innocents = false,
assault = false,
machinegunner = false,
breacher = false,
fighter = true,
juggernaut = true,
},
guns_spawn = true,
team_battle = true,
}
},
gun_list = {
ak47 = { traitor = true, detective = false, findable = true },
magnum = { traitor = true, detective = false, findable = true },
ar15 = { traitor = false, detective = true, findable = true },
r870 = { traitor = false, detective = true, findable = false },
aks74u = { traitor = false, detective = false, findable = false },
glock17 = { traitor = false, detective = true, findable = true },
glock18 = { traitor = true, detective = false, findable = false },
m4a1 = { traitor = false, detective = false, findable = false },
kar98k = { traitor = true, detective = false, findable = false },
hk417 = { traitor = false, detective = false, findable = false },
m16a2 = { traitor = false, detective = false, findable = false },
m16a4 = { traitor = false, detective = false, findable = false },
galilarm = { traitor = false, detective = false, findable = false },
m37 = { traitor = true, detective = false, findable = true },
an94 = { traitor = false, detective = false, findable = false },
m92fs = { traitor = false, detective = false, findable = true },
mk23 = { traitor = false, detective = true, findable = true },
m1911 = { traitor = false, detective = false, findable = false },
m93r = { traitor = false, detective = false, findable = false },
deserteagle = { traitor = false, detective = false, findable = true },
m1014 = { traitor = false, detective = false, findable = false },
fal = { traitor = false, detective = false, findable = false },
scarh = { traitor = true, detective = true, findable = true },
sa5 = { traitor = false, detective = false, findable = false },
underbarrelgun = { traitor = false, detective = false, findable = false },
rpg7 = { traitor = false, detective = false, findable = false },
atgm = { traitor = false, detective = false, findable = false },
m60 = { traitor = false, detective = false, findable = false },
mk23s = { traitor = true, detective = false, findable = false },
pkp = { traitor = false, detective = false, findable = false },
m82 = { traitor = false, detective = false, findable = false },
mp5 = { traitor = false, detective = false, findable = false }
},
game_storage = {
state = nil,
localplayer_team = nil,
localplayer_loadout = nil,
current_gamemode = nil,
variant = nil,
teammates = {},
enemies = {}
}
}
local sterilize_text = function(text)
return text:lower():gsub("[^a-z0-9]", "")
end
local is_detective = function(player): boolean
local backpack = player.Backpack
if backpack then
for index, value in ipairs(backpack:GetChildren()) do
local sterilized = sterilize_text(value.Name)
local found_tool = storage.gun_list[sterilized]
if found_tool and found_tool.detective == true then
return true
end
end
end
return false
end
local is_traitor = function(player): boolean
local backpack = player.Backpack
if backpack then
for index, value in ipairs(backpack:GetChildren()) do
local sterilized = sterilize_text(value.Name)
local found_tool = storage.gun_list[sterilized]
if found_tool and found_tool.traitor == true then
return true
end
end
end
return false
end
local is_teammate = function(player): boolean
if not player.Character then
return false
end
local tag = player.Character:FindFirstChild("tag", true)
if not tag or not tag:IsA("BillboardGui") then
return false
end
local label = tag:FindFirstChildWhichIsA("TextLabel", true)
if not label then
return false
end
local sterilized = sterilize_text(label.Text)
local expected = "teammate" .. sterilize_text(player.Name)
return sterilized == expected
end
local process_gamemode = function(gamemode_text)
if gamemode_text ~= "" then
local sterilized = sterilize_text(gamemode_text)
if storage.gamemode_list[sterilized] then
return sterilized
end
end
return "hunt"
end
local process_players = function()
task.wait(3)
if storage.game_storage.current_gamemode == "hunt" then
for index, player in ipairs(players:GetPlayers()) do
if player ~= local_player then
if storage.game_storage.localplayer_team == "innocent" then
if is_detective(player) then
print(player.Name, "det")
storage.game_storage.teammates[player] = true
elseif is_traitor(player) then
print(player.Name, " traitor")
storage.game_storage.enemies[player] = true
else
storage.game_storage.teammates[player] = true
print(player.Name, " teammate")
end
elseif storage.game_storage.localplayer_team == "traitor" then
if is_detective(player) then
storage.game_storage.enemies[player] = true
elseif is_traitor(player) then
storage.game_storage.teammates[player] = true
else
storage.game_storage.enemies[player] = true
print(player.Name, " enemy")
end
elseif storage.game_storage.localplayer_team == "detective" then
if is_traitor(player) then
storage.game_storage.enemies[player] = true
else
storage.game_storage.teammates[player] = true
end
end
end
end
elseif storage.game_storage.current_gamemode == "tdm" or storage.game_storage.current_gamemode == "juggernaut" then
for index, player in ipairs(players:GetPlayers()) do
if player ~= local_player then
if is_teammate(player) then
storage.game_storage.teammates[player] = true
else
storage.game_storage.enemies[player] = true
print(player.Name, " enemy")
end
end
end
end
end
local handle_round = function(team, loadout, objective, loadout_color, gamemode)
if storage.game_storage.state == nil or storage.game_storage.state == "Waiting" then
return
end
local gamemode = process_gamemode(gamemode[1])
storage.game_storage.current_gamemode = gamemode
storage.game_storage.localplayer_team = sterilize_text(team)
storage.game_storage.localplayer_loadout = loadout
process_players()
end
local handle_state = function(state)
if state == "Waiting" or state == "Ending" then
storage.game_storage.teammates = {}
storage.game_storage.enemies = {}
return
end
storage.game_storage.state = state
end
remotes.PlayerAssigned.OnClientEvent:Connect(handle_round)
remotes.StateChanged.OnClientEvent:Connect(handle_state)
getgenv().aimbot_toggle_key = Enum.UserInputType.MouseButton2
getgenv().aimbot_distance = 200
getgenv().aim_part = "Head"
getgenv().fov = 120
getgenv().wall_check = true
getgenv().whitelisted_players = {""}
local services = {
workspace = cloneref(game:GetService("Workspace")),
runservice = cloneref(game:GetService("RunService")),
userinputservice = cloneref(game:GetService("UserInputService")),
players = cloneref(game:GetService("Players")),
}
local current_camera = services.workspace.CurrentCamera
local aiming = false
local fov_circle = Drawing.new("Circle")
fov_circle.Visible = true
fov_circle.Thickness = 2
fov_circle.Color = Color3.fromRGB(255, 255, 255)
fov_circle.Filled = false
fov_circle.Radius = getgenv().fov
fov_circle.Position = current_camera.ViewportSize / 2
local check_whitelist = function(player)
for _, name in ipairs(getgenv().whitelisted_players) do
if player.Name == name then
return true
end
end
return false
end
local check_team = function(player)
if storage.game_storage.current_gamemode then
if storage.game_storage.enemies[player] then
return true
end
if storage.game_storage.teammates[player] then
return false
end
return false
end
if player.Team ~= local_player.Team then
return true
end
return false
end
local update_fov_circle = function()
local camera_viewport = current_camera.ViewportSize
fov_circle.Position = camera_viewport / 2
fov_circle.Radius = getgenv().fov
end
local look_at = function(target)
local look_vector = (target - current_camera.CFrame.Position).unit
local new_cframe = CFrame.new(current_camera.CFrame.Position, current_camera.CFrame.Position + look_vector)
current_camera.CFrame = new_cframe
end
local is_target_visible = function(player)
if not getgenv().wall_check then return true end
local player_character = player.Character
local local_player_character = local_player.Character
if not (player_character and local_player_character) then return false end
local aim_part_name = getgenv().aim_part
local player_root = player_character:FindFirstChild(aim_part_name) or player_character:FindFirstChild("HumanoidRootPart")
if not player_root then return false end
local cast_points, ignore_list = {player_root.Position}, {local_player_character, player_character}
local obscuring_parts = current_camera:GetPartsObscuringTarget(cast_points, ignore_list)
for _, part in ipairs(obscuring_parts) do
if part.CanCollide and part.Transparency < 1 then
return false
end
end
return true
end
local get_closest_target = function()
local nearest_player = nil
local smallest_distance = math.huge
local mouse_position = current_camera.ViewportSize / 2
for _, player in ipairs(services.players:GetPlayers()) do
if not check_whitelist(player) and player ~= local_player and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
local humanoid_root_part = player.Character.HumanoidRootPart
local screen_position, is_on_screen = current_camera:WorldToViewportPoint(humanoid_root_part.Position)
local distance_from_crosshair = (Vector2.new(screen_position.x, screen_position.y) - mouse_position).Magnitude
if is_on_screen and
distance_from_crosshair < getgenv().fov and
(humanoid_root_part.Position - local_player.Character.HumanoidRootPart.Position).Magnitude < getgenv().aimbot_distance and
is_target_visible(player) and
humanoid_root_part.Material ~= Enum.Material.ForceField and
check_team(player) and
player.Character:FindFirstChild("Humanoid").Health > 18 then
if distance_from_crosshair < smallest_distance then
smallest_distance = distance_from_crosshair
nearest_player = player
end
end
end
end
return nearest_player
end
services.userinputservice.InputBegan:Connect(function(input, game_processed)
if input.UserInputType == getgenv().aimbot_toggle_key and not game_processed then
aiming = true
end
end)
services.userinputservice.InputEnded:Connect(function(input, game_processed)
if input.UserInputType == getgenv().aimbot_toggle_key and not game_processed then
aiming = false
end
end)
services.runservice.RenderStepped:Connect(function()
update_fov_circle()
local closest_target = nil
if aiming then
closest_target = get_closest_target()
if closest_target and closest_target.Character:FindFirstChild(getgenv().aim_part) then
look_at(closest_target.Character:FindFirstChild(getgenv().aim_part).Position)
end
end
end)[ View More ]
Allows you to aimbot in Retrograd Testing and kill all traitors easily