It's not working.
-- Variables local player = game.Players.LocalPlayer local mouse = player:GetMouse() -- Settings bind = "r" -- has to be lowercase -- Script mouse.KeyDown:connect(function(key) if key == bind then game.Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(c) if p.Name == "bobplayerxd123" then c.Humanoid.MaxHealth = 0 end end) end)
the god script was given to me.
Use UserInputService
the script -.-:
local UIS = game:GetService("UserInputService") UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.R then game.Players.PlayerAdded:Connect(function(p) p.CharacterAdded:Connect(function(c) if p.Name == "bobplayerxd123" then c.Humanoid.MaxHealth = 0 end end) end) end UIS.InputEnded:Connect(function(input)) if input.KeyCode == Enum.KeyCode.R then return end
Use the UserInputService instead as mouse is deprecated. Some of your functions are not correct either, so check over them again.
Not sure if this will work but try local bind = instead of just bind.