This is a common question but I have not found a working solution. My game is FilterEnabled and this script will kick players who change their JumpPower, but it only works in the studio:
local player = game.Players.LocalPlayer local character = player.Character if not character or not character.Parent then character = player.CharacterAdded:wait() end local char = game.Players.LocalPlayer.Character:WaitForChild("Humanoid") while wait() do if char.JumpPower ~= 50 then player:Kick("Jumping to the moon is not allowed") end end
It is a LocalScript and I placed it in StarterCharacterScripts
Try more efficient ways that won't distract your game resources:
local player = game.Players.LocalPlayer local onJumpPowerChanged = function() player:Kick("Jumping to the moon is not allowed") end local onCharacterAdded = function(char) char.Humanoid:GetPropertyChangedSignal("JumpPower"):Connect(onJumpPowerChanged) end player.CharacterAdded:Connect(onCharacterAdded) if player.Character then onCharacterAdded(player.Character) end
local player = game.Players.LocalPlayer local character = player.Character local char = game.Players.LocalPlayer.Character:FindFirstChild("Humanoid") while wait() do if char.JumpPower ~= 50 then player:Kick("Jumping to the moon is not allowed") end end
Try that one, it worked for me. If it works accept my answer. Also add that to StarterGui.
Hkmag3, Having this type of anti-exploit script may not be the best idea. The local script is being processed by the HACKER'S COMPUTER, not Roblox Servers. This will make it MUCH easier for the hacker to prevent getting kicked.