Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- toggle = true
- togglekey = "n" --Key that you will use to toggle the on and off
- killkey = "k" --Key that you will use to kill a player
- function Hint(txt)
- local b = Instance.new('Hint', workspace)
- b.Text = txt
- wait(2)
- b:Destroy()
- end
- Local = game:GetService('Players').LocalPlayer
- Mouse = Local:GetMouse()
- Mouse.Button1Down:connect(function()
- pcall(function()
- if toggle then
- Local.Character.HumanoidRootPart.CFrame = Local:GetMouse().Hit
- end
- end)
- end)
- Mouse.KeyDown:connect(function(key)
- if key == togglekey then
- if toggle then
- toggle = false
- Hint('Turned Off!')
- print ('Turned Off!')
- else
- toggle = true
- Hint('Turned On!')
- print ('Turned On!')
- end
- elseif key == killkey then
- if toggle then
- pcall(function()
- Mouse.Target.Parent:FindFirstChild('Humanoid').Health = 0
- Hint('Killed ' .. Mouse.Target.Parent.Name)
- end)
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement