Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextButton = Instance.new("TextButton")
- local UICorner = Instance.new("UICorner")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame.Parent = ScreenGui
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.Position = UDim2.new(0.0586419739, 0, 0.395663947, 0)
- Frame.Size = UDim2.new(0, 126, 0, 152)
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.Size = UDim2.new(0, 126, 0, 50)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "Aimbot Tutorial"
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextSize = 20.000
- TextLabel.TextWrapped = true
- TextButton.Parent = Frame
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.Position = UDim2.new(0, 0, 0.473684222, 0)
- TextButton.Size = UDim2.new(0, 126, 0, 50)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = "Off"
- TextButton.TextColor3 = Color3.fromRGB(255, 0, 0)
- TextButton.TextSize = 46.000
- TextButton.TextWrapped = true
- UICorner.Parent = TextButton
- -- Scripts:
- local function HJQIX_fake_script() -- TextButton.LocalScript
- local script = Instance.new('LocalScript', TextButton)
- _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 NearestPlayerOrDummy = nil
- local NearestDistance = math.huge
- for i, Player, Dummy in pairs(game:GetService("Players"):GetPlayers() and workspace:FindFirstChild("Default Dummy")) do
- if Player and Dummy ~= LocalPlayer and Player.Character or Dummy.Character and Player.Character:FindFirstChild("Head") and Dummy.Character:FindFirstChildOfClass("Head") then
- local Distance = (Player.Character.Head.Position - LocalPlayer.Character.Head.Position).magnitude
- local DummyDist = (Dummy.Character.Head.Position - LocalPlayer.Character.Head.Position).magnitude
- if Distance and DummyDist < NearestDistance then
- NearestDistance = Distance and DummyDist
- NearestPlayerOrDummy = Player or Dummy
- end
- end
- end
- return NearestPlayerOrDummy
- end
- else
- _G.aimbot = false
- script.Parent.TextColor3 = Color3.fromRGB(255,0,0)
- script.Parent.Text = "Off"
- end
- end)
- function closestDummy()
- local NearestDummy = nil
- local NearestDistance = math.huge
- for i, Dummy in pairs(workspace["Default Dummy"]) do
- if Dummy ~= LocalPlayer and Dummy.Character and Dummy.Character:FindFirstChild("Head") then
- local Distance = (Dummy.Character.Head.Position - LocalPlayer.Character.Head.Position).magnitude
- if Distance < NearestDistance then
- NearestDistance = Distance
- NearestDummy = Dummy
- end
- end
- end
- return NearestDummy
- end
- 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"
- else
- _G.aim = 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
- UIS.InputBegan:Connect(function(inp)
- if inp.UserInputType == settings.keybind and script.Parent.TextColor3 == Color3.fromRGB(0,170,0) then
- aiming = true
- elseif inp.UserInputType == settings.keybind and script.Parent.TextColor3 == Color3.fromRGB(255, 0, 0) then
- warn("You cannot aim if it's off!")
- end
- end)
- UIS.InputEnded:Connect(function(inp)
- if inp.UserInputType == settings.keybind then
- aiming = false
- end
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if aiming and _G.aimbot == true then
- local nearest = closestplayer()
- if nearest then
- if nearest.Character then
- local target = nearest.Character:FindFirstChild("Head", true)
- if target then
- camera.CFrame = CFrame.new(camera.CFrame.Position, target.Position) -- locks into the target's position
- end
- end
- end
- end
- end)
- end
- coroutine.wrap(HJQIX_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement