Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

JumpPower Anti Exploit LocalScript only working in studio?

Asked by
hkmag 0
6 years ago

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

0
Since this is in an LS, you'd probably want to do server invokes, but if I were you I would just run this entirely on the server. T0XN 276 — 6y
0
Also, you'd probably want to check if the JumpPower would be >= 50. T0XN 276 — 6y
0
Localscripts shouldn't be used for anti exploits. The exploiter can easily delete this. hiimgoodpack 2009 — 6y
0
I used to use local scripts for anti exploits but I set it to where it would require another script which if any were deleted it kicked for suspected exploit Sergiomontani10 236 — 6y
0
if your interested in roblox anti exploit feel free to join this server discord server :) its helpfull https://discord.gg/Yhb8m29 it has advance anti fly and noclip and more!! shadowboy6753 -5 — 4y

3 answers

Log in to vote
0
Answered by
Sir_Melio 221 Moderation Voter
6 years ago

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
0
Where should I put this? I tried in StarterCharacterScripts and StarterGui but it only works on the studio in both hkmag 0 — 6y
0
Make sure it's a LocalScript that's in StarterPlayerScripts, not StarterCharacterScripts. And check the name of the Players service, maybe you've renamed it to something else. (Same goes for the Humanoid in the player's character.) Sir_Melio 221 — 6y
Ad
Log in to vote
1
Answered by
valchip 789 Moderation Voter
6 years ago
Edited 6 years ago
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.

0
I tried it in both StarterGui and StarterCharacterScripts but it still only works on the server hkmag 0 — 6y
0
Naming the Humanoid object char is sort of confusing and conflicts with the already-existing character var. T0XN 276 — 6y
0
Yes that is true I just editted hkmag's script a bit, and for me it worked even in studio and even in game. valchip 789 — 6y
0
Weird, I'm assuming filtering was enabled when you were testing, right? T0XN 276 — 6y
View all comments (2 more)
0
I tried even with FE off and FE on. valchip 789 — 6y
0
I don't understand why it doesn't work for me. I even tried putting it in StarterGui, StarterCharacterScripts, AND StarterPlayerScripts at the same time but it doesn't do anything in game. hkmag 0 — 6y
Log in to vote
0
Answered by 6 years ago

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.

0
if your interested in roblox anti exploit feel free to join this server discord server :) its helpfull https://discord.gg/Yhb8m29 it has advance anti fly and noclip and more!! shadowboy6753 -5 — 4y

Answer this question