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 KLWR_fake_script() -- TextButton.LocalScript
- local script = Instance.new('LocalScript', TextButton)
- _G.aimbot = false
- local camera = 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 in pairs(game:GetService("Players"):GetPlayers()) do
- if Player ~= LocalPlayer and Player.Character and Player.Character:FindFirstChild("Head") then
- local Distance = (Player.Character.Head.Position - LocalPlayer.Character.Head.Position).magnitude
- if Distance < NearestDistance then
- NearestDistance = Distance
- NearestPlayerOrDummy = Player
- end
- end
- end
- return NearestPlayerOrDummy
- 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 and script.Parent.TextColor3 == Color3.fromRGB(0, 170, 0) 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(KLWR_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement