so ive tested my game with executors like skisploit simple none paid ones and when i set any value over the limit that i set in game it is supposed to kick the player but it doesnt
game.Players.PlayerAdded:Connect(function(plr) local moral = plr.Nut.Moral.Value local coins = plr.Nut.Coins.Value wait(2) if moral >= 1001 then plr.Nut.Moral.Value = 1000 if coins >= 10000001 then plr.Nut.Coins.Value = 10000000 end if plr.Experience.Will.Value >= 1000001 then plr.Experience.Will.Value = 1000000 end if plr.Experience.Skill.Value >= 1000001 then plr.Experience.Skill.Value = 1000000 end if plr.Experience.Strength.Value >= 1000001 then plr.Experience.Strength.Value = 1000000 end if plr.Character.Humanoid.WalkSpeed >= 201 then plr.Character.Humanoid.WalkSpeed = 16 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.JumpPower >= 51 then plr.Character.Humanoid.JumpPower = 50 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.MaxHealth >= 801 then plr.Character.Humanoid.MaxHealth = 800 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.HipHeight >= 1.36 then plr.Character.Humanoid.HipHeight = 1.35 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.MaxSlopeAngle >= 90 then plr.Character.Humanoid.MaxSlopeAngle = 89 plr:Kick("Unexpected Humanoid Change") end end end)
i tried a while true do loop but that just made it where the player couldnt spawn in
its because the script only runs once when the PlayerAdded
event fires, so the if statments
will run once, so if you changed a value after the PlayerAdded
event fires, it wont do anything since its not running. if you want to fix this, i suggest using Changed
events, as it fires if one of the objects properties changes such as your values.
I would be trying this,
This will be a server sided script.
game.Players.PlayerAdded:Connect(function(plr) local moral = plr.Nut.Moral local coins = plr.Nut.Coins wait(2) moral.Changed:Connect(function() if plr.Nut.Moral.Value > 1000 then plr.Nut.Moral.Value = 1000 end end) coins.Changed:Connect(function() if coins.Value > 10000000 then plr.Nut.Coins.Value = 10000000 end end) -- 6 zeros, skillz , strength , xp plr.Experience.Will.Changed:Connect(function() if plr.Experience.Will.Value > 10000000 then plr.Experience.Will.Value = 10000000 end end) plr.Experience.Skill.Changed:Connect(function() if plr.Experience.Skill.Value > 1000000 then plr.Experience.Skill.Value = 1000000 end end) plr.Experience.Strength.Changed:Connect(function() if plr.Experience.Strength.Value > 1000000 then plr.Experience.Strength.Value = 1000000 end end) function hum() plr.Character.Humanoid.Changed:Connect(function() if plr.Character.Humanoid.WalkSpeed>= 201 then plr.Character.Humanoid.WalkSpeed = 16 plr:Kick("Unexpected Humanoid Change") end end) plr.Character.Humanoid.Changed:Connect(function() if plr.Character.Humanoid.JumpPower >= 51 then plr.Character.Humanoid.JumpPower = 50 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.MaxHealth >= 801 then plr.Character.Humanoid.MaxHealth = 800 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.HipHeight >= 1.36 then plr.Character.Humanoid.HipHeight = 1.35 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.MaxSlopeAngle >= 90 then plr.Character.Humanoid.MaxSlopeAngle = 89 plr:Kick("Unexpected Humanoid Change") end end) end hum() plr.CharacterAdded:Connect(hum) end)
Put a local script in the StarterGui and put this code
plr = game.Players.LocalPlayer repeat wait() until plr.Character local moral = plr.Nut.Moral local coins = plr.Nut.Coins wait(2) moral.Changed:Connect(function() if plr.Nut.Moral.Value > 1000 then plr.Nut.Moral.Value = 1000 end end) coins.Changed:Connect(function() if coins.Value > 10000000 then plr.Nut.Coins.Value = 10000000 end end) -- 6 zeros, skillz , strength , xp plr.Experience.Will.Changed:Connect(function() if plr.Experience.Will.Value > 10000000 then plr.Experience.Will.Value = 10000000 end end) plr.Experience.Skill.Changed:Connect(function() if plr.Experience.Skill.Value > 1000000 then plr.Experience.Skill.Value = 1000000 end end) plr.Experience.Strength.Changed:Connect(function() if plr.Experience.Strength.Value > 1000000 then plr.Experience.Strength.Value = 1000000 end end) function hum() plr.Character.Humanoid.Changed:Connect(function() if plr.Character.Humanoid.WalkSpeed>= 201 then plr.Character.Humanoid.WalkSpeed = 16 plr:Kick("Unexpected Humanoid Change") end end) plr.Character.Humanoid.Changed:Connect(function() if plr.Character.Humanoid.JumpPower >= 51 then plr.Character.Humanoid.JumpPower = 50 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.MaxHealth >= 801 then plr.Character.Humanoid.MaxHealth = 800 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.HipHeight >= 1.36 then plr.Character.Humanoid.HipHeight = 1.35 plr:Kick("Unexpected Humanoid Change") end if plr.Character.Humanoid.MaxSlopeAngle >= 90 then plr.Character.Humanoid.MaxSlopeAngle = 89 plr:Kick("Unexpected Humanoid Change") end end) end plr.CharacterAdded:Connect(hum) hum()
hope this helps