Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local AimbotUI = Instance.new("ScreenGui")
- local Aimbot = Instance.new("Frame")
- local Title = Instance.new("TextLabel")
- local Toggle = Instance.new("TextButton")
- --Properties:
- AimbotUI.Name = "AimbotUI"
- AimbotUI.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- Aimbot.Name = "Aimbot"
- Aimbot.Parent = AimbotUI
- Aimbot.BackgroundColor3 = Color3.fromRGB(58, 58, 58)
- Aimbot.Position = UDim2.new(0.103068449, 0, 0.353565991, 0)
- Aimbot.Size = UDim2.new(0, 122, 0, 162)
- Title.Name = "Title"
- Title.Parent = Aimbot
- Title.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
- Title.BorderSizePixel = 0
- Title.Size = UDim2.new(0, 122, 0, 50)
- Title.Font = Enum.Font.SourceSansBold
- Title.Text = "Aimbot"
- Title.TextColor3 = Color3.fromRGB(255, 255, 255)
- Title.TextSize = 27.000
- Toggle.Name = "Toggle"
- Toggle.Parent = Aimbot
- Toggle.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- Toggle.BorderSizePixel = 0
- Toggle.Position = UDim2.new(0, 0, 0.395061731, 0)
- Toggle.Size = UDim2.new(0, 122, 0, 50)
- Toggle.Font = Enum.Font.SourceSansBold
- Toggle.Text = "Off"
- Toggle.TextColor3 = Color3.fromRGB(255, 0, 0)
- Toggle.TextSize = 40.000
- -- Scripts:
- local function CNQUST_fake_script() -- Toggle.LocalScript
- local script = Instance.new('LocalScript', Toggle)
- _G.aimbot = false
- local camera = game.Workspace.CurrentCamera
- local localplayer = game:GetService("Players").LocalPlayer
- script.Parent.MouseButton1Click:Connect(function()
- if _G.aimbot == false then
- _G.aimbot = true
- script.Parent.TextColor3 = Color3.fromRGB(0,170,0)
- script.Parent.Text = "On"
- function closestplayer()
- local dist = math.huge -- math.huge means a really large number, 1M+.
- local target = nil --- nil means no value
- for i,v in pairs (game:GetService("Players"):GetPlayers()) do
- if v ~= localplayer then
- if v.Character and v.Character:FindFirstChild("Head") and v.TeamColor ~= localplayer.TeamColor and _G.aimbot and v.Character.Humanoid.Health > 0 then --- creating the checks
- local magnitude = (v.Character.Head.Position - localplayer.Character.Head.Position).magnitude
- if magnitude < dist then
- dist = magnitude
- target = v
- end
- end
- end
- end
- return target
- end
- else
- _G.aimbot = false
- script.Parent.TextColor3 = Color3.fromRGB(255,0,0)
- script.Parent.Text = "Off"
- end
- end)
- local settings = {
- keybind = Enum.UserInputType.MouseButton2
- }
- local UIS = game:GetService("UserInputService")
- local aiming = false --- this toggle will make it so we lock on to the person when we press our keybind
- UIS.InputBegan:Connect(function(inp)
- if inp.UserInputType == settings.keybind then
- aiming = true
- end
- end)
- UIS.InputEnded:Connect(function(inp)
- if inp.UserInputType == settings.keybind then ---- when we stop pressing the keybind it would unlock off the player
- aiming = false
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if aiming then
- camera.CFrame = CFrame.new(camera.CFrame.Position,closestplayer().Character.Head.Position) -- locks into the HEAD
- end
- end)
- end
- coroutine.wrap(CNQUST_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement