
Keyless

if getgenv().energyhook then
hookmetamethod(game, "__namecall", getgenv().energyhook)
getgenv().energyhook = nil
game:GetService("ReplicatedStorage").Game.Consume:InvokeServer("Check")
game:GetService("ReplicatedStorage").Game.Consume:InvokeServer("Check")
game:GetService("StarterGui"):SetCore("SendNotification", {Title = "noo", Text = "script is stopped :(", Duration = 6})
else
getgenv().energyhook = hookmetamethod(game, "__namecall", newcclosure(function(self, ...)
if getnamecallmethod() == "InvokeServer" and self.Name == "Consume" then
return
end
if getnamecallmethod() == "InvokeServer" and self.Name == "GetEnergy" then
if (function(...) return ... end)(getgenv().energyhook(self, ...)) <= 0 then
return (function(...) return select(2, ...) end)(getgenv().energyhook(self, ...)), (function(...) return select(2, ...) end)(getgenv().energyhook(self, ...))
end
return getgenv().energyhook(self, ...)
end
return getgenv().energyhook(self, ...)
end))
game:GetService("StarterGui"):SetCore("SendNotification", {Title = "ok", Text = "yay script working", Duration = 6})
end
i hope there a auto detect if it a human or not