Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local aimbot = false
- game:GetService("UserInputService").InputBegan:connect(function(a)
- if (a.UserInputType == Enum.UserInputType[_G.settings.ToggleAimbot]) then --and aimbot == false
- warn("a")
- aimbot = true
- end
- end)
- game:GetService("UserInputService").InputEnded:connect(function(a)
- if (a.UserInputType == Enum.UserInputType[_G.settings.ToggleAimbot]) then
- warn("b")
- aimbot = false
- end
- end)
- local cc = game.workspace.CurrentCamera
- local mouse = game.Players.LocalPlayer:GetMouse()
- function pos(a)
- return cc:WorldToViewportPoint(a)
- end
- function esp(char)
- local line = Drawing.new('Line')
- local box = Drawing.new('Square')
- local cham = Drawing.new('Circle')
- local text = Drawing.new('Text')
- line.Color = Color3.new(255,0,0)
- line.From = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y)
- line.Thickness = 1
- box.Color = Color3.new(255,0,0)
- box.Thickness = 3
- cham.Color = Color3.new(255,0,0)
- cham.Filled = true
- cham.Transparency = 1
- text.Size = 20
- text.Color = Color3.new(255,0,0)
- game:GetService('RunService').Stepped:connect(function()
- function lolVis(ok)
- if _G.settings.esp_settings.Tracers then
- line.Visible = ok
- else
- line.Visible = false
- end
- if _G.settings.esp_settings.Box then
- box.Visible = ok
- text.Visible = ok
- else
- box.Visible = false
- text.Visible = false
- end
- if _G.settings.esp_settings.Chams then
- cham.Visible = ok
- else
- cham.Visible = false
- end
- end
- function lolClr(ok)
- line.Color = Color3.new(unpack(ok))
- box.Color = Color3.new(unpack(ok))
- cham.Color = Color3.new(unpack(ok))
- text.Color = Color3.new(unpack(ok))
- end
- if char and char:FindFirstChild("Head") and game.Players.LocalPlayer.Character and game.Players:GetPlayerFromCharacter(char) and _G.settings.esp_settings.Esp then
- local hum, vis = pos(char.Head.Position)
- local getPlayer = game.Players:GetPlayerFromCharacter(char)
- local name = getPlayer.Name
- box.Size = Vector2.new(40,40)
- box.Position = Vector2.new(hum.x - box.Size.x / 2, hum.y - box.Size.y / 2)--hum.x - box.Size.x / 2, hum.y - box.Size.y / 2
- cham.Radius = 500 / hum.Z
- cham.Position = Vector2.new(hum.x, hum.y)
- line.To = Vector2.new(hum.x + box.Size.x / 32, hum.y + box.Size.y / 2)
- if game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
- text.Text = getPlayer.Name .. "\n" .. tostring(math.floor((char:FindFirstChild("Head").Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude))
- end
- text.Position = Vector2.new(hum.x + box.Size.x * 1.1, hum.y - box.Size.y)
- local testing = false
- if game.PlaceId == 292439477 then
- for i,v in pairs(game.workspace.Players:GetChildren()) do
- if v:FindFirstChild(name) then
- testing = true
- end
- end
- if not testing or not vis then
- lolVis(false)
- elseif testing and vis then
- lolVis(true)
- end
- end
- if game.PlaceId ~= 292439477 then
- lolVis(vis)
- end
- if getPlayer then
- if getPlayer.TeamColor ~= game.Players.LocalPlayer.TeamColor and _G.settings.esp_settings.Teamcheck then
- lolClr({255,0,0}) --red
- elseif getPlayer.TeamColor == game.Players.LocalPlayer.TeamColor and _G.settings.esp_settings.Teamcheck then
- lolVis(false)
- elseif not _G.settings.esp_settings.Teamcheck and getPlayer.TeamColor == game.Players.LocalPlayer.TeamColor then
- lolClr({0,128,0}) --green
- end
- end
- else
- lolVis(false)
- end
- end)
- end
- function getClosestMouse(trg_part)
- local nearest = nil
- local last = math.huge
- local ignore = {}
- for i,v in pairs(game.Players:GetPlayers()) do
- if v ~= game.Players.LocalPlayer and game.Players.LocalPlayer.Character and v.Character and v.Character:FindFirstChild(trg_part) and v.TeamColor ~= game.Players.LocalPlayer.TeamColor then -- and v.TeamColor ~= game.Players.LocalPlayer.TeamColor
- if game.Players.LocalPlayer.Character:FindFirstChild(trg_part) then
- local ePos = pos(v.Character[trg_part].Position)
- local AccPos = Vector2.new(ePos.x, ePos.y)
- local mousePos = Vector2.new(cc.ViewportSize.x / 2, cc.ViewportSize.y / 2) --local mousePos = Vector2.new(mouse.x, mouse.y)
- local distance = (AccPos - mousePos).magnitude
- if distance < last then
- last = distance
- nearest = v
- end
- end
- end
- end
- if nearest ~= nil then
- if game.PlaceId == 292439477 then
- for i,v in pairs(game.workspace.Players:GetChildren()) do
- if v:FindFirstChild(nearest.Name) then
- return nearest
- end
- end
- else
- return nearest
- end
- end
- end
- game:GetService('RunService').Stepped:connect(function()
- local nam = getClosestMouse(_G.settings.TargetPart)
- if nam ~= nil and nam then
- local move, vis = pos(getClosestMouse(_G.settings.TargetPart).Character[_G.settings.TargetPart].Position)
- if vis and aimbot then
- mousemoverel((move.x - mouse.x) * _G.settings.Smoothness, ((move.y * 0.93) - mouse.y) * _G.settings.Smoothness)
- if _G.settings.TriggerBot then
- mouse1press()
- game:GetService('RunService').Stepped:wait()
- mouse1release()
- end
- end
- end
- end)
- --Just creating esps and stuff
- for i,v in pairs(game.Players:GetPlayers()) do
- if v ~= game.Players.LocalPlayer then
- if v.Character then
- esp(v.Character)
- end
- v.CharacterAdded:connect(function(a)
- esp(a)
- end)
- end
- end
- function someEspShit(a)
- a.CharacterAdded:connect(function(b)
- print(b:GetFullName())
- esp(b)
- end)
- end
- game.Players.PlayerAdded:connect(someEspShit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement