Professional Documents
Culture Documents
Message
Message
Message
-- workspace
local vector2_new = Vector2.new
local vector3_new = Vector3.new
local cframe_new = CFrame.new
local cframe_angles = CFrame.Angles
local raycast_params_new = RaycastParams.new
local raycast = workspace.Raycast
-- color
local color3_rgb = Color3.fromRGB
local color3_hsv = Color3.fromHSV
local color3_new = Color3.new
-- math
local math_floor = math.floor
local math_ceil = math.ceil
local math_atan2 = math.atan2
local math_rad = math.rad
local math_random = math.random
local math_randomseed = math.randomseed
-- string
local string_char = string.char
local string_format = string.format
-- table
local table_sort = table.sort
-- task
local task_wait = task.wait
-- namecall
local gdbd = game.GetDebugId
local get_children = game.GetChildren
local get_descendants = game.GetDescendants
local find_first_child_of_class = game.FindFirstChildOfClass
local find_first_child = game.FindFirstChild
local is_descendant_of = game.IsDescendantOf
local world_to_view_point = find_first_child_of_class(workspace,
"Camera").WorldToViewportPoint
local point_world_space = cframe_new().pointToWorldSpace
local point_object_space = cframe_new().pointToObjectSpace
local vector_world_space = cframe_new().vectorToWorldSpace
local is_a = game.IsA
-- globals
local workspace = workspace
local pairs = pairs
local pcall = pcall
local tostring = tostring
local tick = tick
local getgenv = getgenv
local mousemoverel = mousemoverel
local mouse1press = mouse1press
local mouse1release = mouse1release
-- random
math_randomseed(tick())
function random_string(len)
local str = ""
for i = 1, len do
str = str .. string_char(math_random(97, 122))
end
return str
end
getgenv().render_loop_stepped_name = renderloop_stepped_name or
random_string(math_random(15, 35))
getgenv().update_loop_stepped_name = update_loop_stepped_name or
random_string(math_random(15, 35))
-- services
local players = game:GetService("Players")
local run_service = game:GetService("RunService")
local uis = game:GetService("UserInputService")
-- other
local local_player = players.LocalPlayer
local mouse = local_player:GetMouse()
local pi = math.pi
-- execute to apply
local options = {
-- global settings
frame_delay = 10, -- delay between rendering each frame (in miliseconds)
refresh_delay = 0.25, -- delay between refreshing script (in seconds)
max_dist = 9e9, -- 9e9 = very big
team_check = true,
wall_check = true,
-- aimbot settings
aimbot = true,
smoothness = 3,
fov = 200,
fov_increase_on_aim = 0, -- increases your fov by this value while the aimbot
is active
rage_mode = false, -- disregards fov, smoothness, odds and will lock onto
people behind you
-- will not lock on to people with this *username*, do not use a displayname
for this, use the username
ignore_people = {
["name"] = true, -- example of how you would exclude someone
},
-- https://developer.roblox.com/en-us/api-reference/enum/UserInputType
mouse_key = Enum.UserInputType["MouseButton2"],
-- how to disable: mouse_key = nil,
-- how to enable: mouse_key = Enum.UserInputType["*"],
-- https://developer.roblox.com/en-us/api-reference/enum/KeyCode
keyboard_key = Enum.KeyCode["E"],
-- how to disable: keyboard_key = nil,
-- how to enable: keyboard_key = Enum.KeyCode["*"],
-- headshot odds
headshot_chance = 100, -- odds for aiming on the head in percentage, 0 = no
head (lol) and 100 = always head
update_on_refresh_delay = false, -- less nauseating, will recalculate odds
every refresh instead of every frame
-- taxing, usually useless, will iterate backwards through players list if the
"best player to lock onto" cant be locked onto
backwards_iteration = false,
-- global esp settings
esp = true,
esp_thickness = 2,
-- esp settings
tracers = true,
box = true,
-- rainbow settings
rainbow = false,
rainbow_speed = 5, -- lower is faster, 0.000001 is the lowest you can go
--https://www.google.com/search?q=color+picker
lat_color = color3_rgb(200, 0, 255), -- color in rgb
lat_thickness = 2,
lat_length = 3, -- how far the tracer will go (in studs)
-- crosshair settings
crosshair = false,
crosshair_distance = 4,
crosshair_thickness = 1,
crosshair_length = 8;
}
remove_all_esp()
if descendant_hum_added then
descendant_hum_added:Disconnect()
descendant_hum_removing:Disconnect()
player_name_added:Disconnect()
player_name_removed:Disconnect()
end
player_added:Disconnect()
player_removed:Disconnect()
input_began:Disconnect()
input_ended:Disconnect()
getgenv().remove_all_esp = nil
return;
end
if options.loop_all_humanoids then
if not player_names[local_player.Name] then -- ran for the first time
-- get player names
for _, val in pairs(get_children(players)) do
player_names[val.Name] = true
end
getgenv().player_name_added =
players.ChildAdded:Connect(function(added)
player_names[added.Name] = true
end)
getgenv().player_name_removed =
players.ChildRemoved:Connect(function(added)
player_names[added.Name] = nil
end)
getgenv().descendant_hum_added =
workspace.DescendantAdded:Connect(function(added)
if is_a(added, "Humanoid") and added.Parent ~=
local_player.Character and not (options.ignore_player_humanoids and
player_names[added.Parent.Name]) then
characters[gdbd(added.Parent)] = added.Parent
end
end)
getgenv().descendant_hum_removing =
workspace.DescendantRemoving:Connect(function(removing)
if is_a(removing, "Humanoid") then
characters[gdbd(removing.Parent)] = nil
end
end)
end
return characters
end
return {} -- wtf???
end
return chars
end
custom_players = false
return get_children(players)
end
local aiming = {
fov_circle_obj = nil,
line = nil,
circle = nil;
}
local crosshair = {
top = nil,
bottom = nil,
right = nil,
left = nil;
}
local players_table = {}
local tracers = {}
local quads = {}
local overheads = {}
local looking_at_tracers = {}
-- needed functions
local function to_screen(vec3)
local screen_pos, in_screen = world_to_view_point(cam, vec3)
local cf = part.CFrame
return {
top_right = (cf * cframe_new(-size.X, -size.Y, 0)).Position,
bottom_right = (cf * cframe_new(-size.X, size.Y, 0)).Position,
top_left = (cf * cframe_new(size.X, -size.Y, 0)).Position,
bottom_left = (cf * cframe_new(size.X, size.Y, 0)).Position,
}
end
return inst
end
end
return inst;
end
return inst
end
add_or_update_instance(quads, idx, {
Visible = false,
instance = "Quad"
})
add_or_update_instance(overheads, idx, {
Visible = false,
instance = "Text"
})
add_or_update_instance(looking_at_tracers, idx, {
Visible = false,
instance = "Line"
})
end
local ignored_instances = {}
raycast_params.FilterDescendantsInstances = ignore_list
raycast_params.FilterDescendantsInstances = ignore_list
return result_part
end
return 0.5
end
local function _refresh()
for idx in pairs(tracers) do -- hide all esp instances
remove_esp(idx)
end
-- player events
getgenv().player_added = players.ChildAdded:Connect(refresh)
getgenv().player_removed = players.ChildRemoved:Connect(refresh)
-- aimbot triggers
getgenv().input_began = uis.InputBegan:Connect(function(input)
if input.KeyCode == options.keyboard_key then
if options.acts_as_toggle then
start_aim = not start_aim
else
start_aim = true
end
added_fov = options.fov_increase_on_aim
end
end
added_fov = options.fov_increase_on_aim
end
end
end)
getgenv().input_ended = uis.InputEnded:Connect(function(input)
if input.KeyCode == options.keyboard_key then
if not options.acts_as_toggle then
start_aim = false
end
if options.fov_increase_on_aim > 0 then
for i = 1, options.fov_increase_on_aim * 0.3 do
added_fov = added_fov - 3
task_wait()
end
added_fov = 0
end
end
task_wait()
end
added_fov = 0
end
end
end)
local last_tick = 0;
refresh_que = false
end
add_or_update_instance(aiming, "fov_circle_obj", {
Visible = options.fov_circle,
Thickness = options.esp_thickness,
Radius = options.fov + added_fov,
Position = center_screen,
Color = (options.rainbow and get_rainbow()) or white,
instance = "Circle";
})
add_or_update_instance(crosshair, "top", {
Visible = options.crosshair,
Thickness = options.crosshair_thickness,
From = vector2_new(center_screen.X, center_screen.Y -
options.crosshair_length - options.crosshair_distance),
To = vector2_new(center_screen.X, center_screen.Y -
options.crosshair_distance),
Color = (options.rainbow and get_rainbow()) or white,
instance = "Line";
})
add_or_update_instance(crosshair, "bottom", {
Visible = options.crosshair,
Thickness = options.crosshair_thickness,
From = vector2_new(center_screen.X, center_screen.Y +
options.crosshair_length + options.crosshair_distance + 1),
To = vector2_new(center_screen.X, center_screen.Y +
options.crosshair_distance + 1),
Color = (options.rainbow and get_rainbow()) or white,
instance = "Line";
})
add_or_update_instance(crosshair, "left", {
Visible = options.crosshair,
Thickness = options.crosshair_thickness,
From = vector2_new(center_screen.X - options.crosshair_length -
options.crosshair_distance, center_screen.Y),
To = vector2_new(center_screen.X - options.crosshair_distance,
center_screen.Y),
Color = (options.rainbow and get_rainbow()) or white,
instance = "Line";
})
add_or_update_instance(crosshair, "right", {
Visible = options.crosshair,
Thickness = options.crosshair_thickness,
From = vector2_new(center_screen.X + options.crosshair_length +
options.crosshair_distance + 1, center_screen.Y),
To = vector2_new(center_screen.X + options.crosshair_distance + 1,
center_screen.Y),
Color = (options.rainbow and get_rainbow()) or white,
instance = "Line";
})
local closers_chars = {}
local root_part =
find_first_child(plr_char, "Torso")
or find_first_child(plr_char, "UpperTorso")
or find_first_child(plr_char, "LowerTorso")
or find_first_child(plr_char, "HumanoidRootPart")
or find_first_child(plr_char, "Head")
or find_first_child_of_class(plr_char, "BasePart")
if options.esp then
local col = (options.rainbow and get_rainbow()) or white
local corners = get_part_corners(root_part)
local tracer_pos =
to_screen(point_world_space(cam.CFrame, object_space_pos))
add_or_update_instance(tracers, id, {
Visible = options.esp,
Thickness = options.esp_thickness,
From = vector2_new(screen_size.X / 2, screen_size.Y - 36),
To = tracer_pos,
Color = (options.rainbow and get_rainbow()) or
color3_new(255 / mag, mag / 255, 0),
instance = "Line";
})
end
if options.box then
if a_visible and b_visible and c_visible and d_visible then
add_or_update_instance(quads, id, {
Visible = options.esp,
Thickness = options.esp_thickness,
PointA = a_screen,
PointB = b_screen,
PointC = c_screen,
PointD = d_screen,
Color = col,
instance = "Quad";
})
else
add_or_update_instance(quads, id, {
Visible = false,
instance = "Quad";
})
end
end
if options.looking_at_tracer then
local a_head_src, a_visible = to_screen(head.Position)
local b_lv_src, b_visible = to_screen(head.Position +
head.CFrame.LookVector * options.lat_length)
if options.overhead then
local text = "";
if options.health then
local hum = find_first_child_of_class(plr_char, "Humanoid")
if hum then
text = string_format("%s[%d/%d] ", text,
math_ceil(hum.Health), math_ceil(hum.MaxHealth))
end
end
if options.distance then
text = string_format("%s[%d]\n", text, math_floor(mag))
end
if options.name then
text = string_format("%s%s ", text, plr.Name)
end
add_or_update_instance(overheads, id, {
Visible = options.esp,
Outline = options.outline,
Center = true,
Position = head_screen - vector2_new(0, (obj and
obj.TextBounds.Y) or 0),
Text = text,
Color = col,
instance = "Text";
})
else
add_or_update_instance(overheads, id, {
Visible = false,
instance = "Text";
})
end
end
end
if options.aimbot then
if options.looking_at_you then
closers_chars[((head.Position + head.CFrame.LookVector * mag) -
cam.CFrame.p).Magnitude] = plr_char
elseif options.closest_to_center_screen then
closers_chars[(plr_screen - center_screen).Magnitude] =
plr_char
elseif options.closest_to_you then
closers_chars[mag] = plr_char
end
end
end -- sort players, esp, teamcheck
local mags = {}
table_sort(mags)
local idx_sorted = {}
if char then
local children = get_children(char)
local parts = {}
for _, obj in pairs(children) do
if is_a(obj, "BasePart") then
local part_screen, part_in_screen, _, rage =
to_screen(obj.Position)
parts[obj.Name] = set
if chosen then
local scale = (chosen.part.Size.Y / 2)
add_or_update_instance(aiming, "circle", {
Visible = top_visible and bottom_visible and
options.aiming_at,
Thickness = options.esp_thickness,
Radius = radius / 2,
Position = chosen.screen,
Color = (options.rainbow and get_rainbow()) or (start_aim
and green) or white,
instance = "Circle";
})
if start_aim then
add_or_update_instance(aiming, "line", {
Visible = options.aiming_at,
Thickness = options.esp_thickness,
From = center_screen,
To = chosen.screen,
Color = (options.rainbow and get_rainbow()) or
(start_aim and green) or white,
instance = "Line";
})
if chosen.visible then
if options.mouse_emulation then
mousemoverel((chosen.screen.X - mouse.X) /
smoothness, (chosen.screen.Y - (mouse.Y + 36)) / smoothness)
elseif options.camera_cframe then
cam.CFrame = cframe_new(cam.CFrame.p,
chosen.part.Position)
end
elseif options.rage_mode then
if options.mouse_emulation then
mousemoverel(screen_size.X / 4, (chosen.screen.Y -
(mouse.Y + 36)) * screen_height(mouse.Y))
elseif options.camera_cframe then
cam.CFrame = cframe_new(cam.CFrame.p,
chosen.part.Position)
end
end
if options.triggerbot then
if is_descendant_of(hitting_what(cam.CFrame),
chosen.part.Parent) then
mouse1press()
else
mouse1release()
end
end
return;
else
if options.triggerbot then
mouse1release()
end
add_or_update_instance(aiming, "line", {
Visible = false,
instance = "Line";
})
return;
end -- aiming?
add_or_update_instance(aiming, "line", {
Visible = false,
instance = "Line";
})
add_or_update_instance(aiming, "circle", {
Visible = false,
instance = "Circle";
})
if options.backwards_iteration then
run_aimbot(plr_offset + 1); -- previous player
end
end
end
run_aimbot(1);
end
end
local last_refresh = 0;
world_to_view_point = cam.WorldToViewportPoint
end
if options.update_on_refresh_delay then
aim_head = chanced()
end
refresh()
end
end) -- refresher
-- kills esp
getgenv().remove_all_esp = function()
for idx in pairs(tracers) do -- hide all esp instances
remove_esp(idx)
end
-- aiming
add_or_update_instance(aiming, "fov_circle_obj", {
Visible = false,
instance = "Circle";
})
add_or_update_instance(aiming, "circle", {
Visible = false,
instance = "Circle";
})
add_or_update_instance(aiming, "line", {
Visible = false,
instance = "Line";
})
-- crosshair
add_or_update_instance(crosshair, "top", {
Visible = false,
instance = "Line";
})
add_or_update_instance(crosshair, "bottom", {
Visible = false,
instance = "Line";
})
add_or_update_instance(crosshair, "left", {
Visible = false,
instance = "Line";
})
add_or_update_instance(crosshair, "right", {
Visible = false,
instance = "Line";
})
end