ADVERTISEMENTREMOVE ADS
Game icon

anti reduce energy

Script preview thumbnail
Script Preview
ADVERTISEMENTREMOVE ADS
21 Lines • 1.21 KiB
Verified
Raw
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
ADVERTISEMENTREMOVE ADS

Comments

1 comment
to add a comment
ma

i can add auto allow humans if yall want

0
0
ADVERTISEMENTREMOVE ADS