forked from zzerexx/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTriggerBot.lua
More file actions
22 lines (21 loc) · 954 Bytes
/
TriggerBot.lua
File metadata and controls
22 lines (21 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local enabled = true
local toggle = Enum.KeyCode.H
local mouse = game:GetService("Players").LocalPlayer:GetMouse()
game:GetService("RunService").RenderStepped:Connect(function()
if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") and mouse.Target.Parent:FindFirstChildOfClass("Humanoid").Health > 0 and game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Team ~= game:GetService("Players").LocalPlayer.Team and enabled then
mouse1press()
repeat
game:GetService("RunService").RenderStepped:Wait()
until not mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
mouse1release()
end
end)
game:GetService("UserInputService").InputBegan:Connect(function(i,gp)
if i.KeyCode == toggle then
enabled = not enabled
local hint = Instance.new("Hint",game.CoreGui)
hint.Text = "Toggled: "..tostring(enabled)
wait(1.5)
hint:Destroy()
end
end)