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

Whats the best way to prevent exploiters from changing these values?

Asked by 2 years ago
Edited 2 years ago

Ok so I have a script which essentially runs an inventory gui so the player can see all of the items they have. I have an issue however: An exploiter can just change these values. I know that less then 1% of the roblox community uses exploits but I still want to be on the safe side especially as people might leave the game as other people might hack. So this is mylocal script right now and how can I have a server side check to make sure these values are equal as the server cannot access this gui because it is being cloned.

This is the script:

local player = game.Players.LocalPlayer
local inventory = player.Inventory
player.Inventory.ChildAdded:Connect(function(addedweapon)
for _,child in pairs(inventory:GetChildren()) do
        local weaponframe = script.Parent.Parent.Frame:Clone()
        weaponframe.Parent = script.Parent
        weaponframe.Visible = true
        weaponframe.WeaponName.Value = addedweapon.Name
        weaponframe.Damage.Value = addedweapon.Damage.Value
        weaponframe.CritChance.Value = addedweapon.CritChance.Value
        weaponframe.Health.Value = addedweapon.Health.Value
        weaponframe.HitRate.Value = addedweapon.HitRate.Value
end
    inventory.ChildAdded:Connect(function(child)

end)
    inventory.ChildRemoved:Connect(function(child)

    end)
    end)

1 answer

Log in to vote
1
Answered by 2 years ago

It shouldn't matter as you normally wouldn't fire the dmg from the local script. It should just be a visual exploit that will only show to the exploiter and it also wont change in the data as long as theres no remote being fired with those stats. When you are damaging, take the damage from a module (something like require(game.ReplicatedStorage.Modules.WeaponStats)[addedweapon].Damage). You should never fire a remote with the amount of damage and hit rate, etc. there are more exploiters than you think.

0
Ok so doing this is fine but rswhat if say I wanted to "upgrade" the weapon and I will change the values if I do this through a local script hackewill be able to change the upgrade amount right? epicnmac 63 — 2y
0
For upgrading, you would probably use a server script. This way, you can save the stats if you want. if you want to fire an event to upgrade the tool, make sure that you aren't checking for the price there. You can do fireserver(tool, upgradeamount) which will only make upgrading a little faster for the exploiters but don't check for the requirements until you receive the event. BulletproofVast 1033 — 2y
0
Also upgrading from a local script wont change the dmg bc you are taking the dmg values from a module. you could do in the server script damage * upgrade_amount but it cant see the upgrade_amount unless you change it from the server BulletproofVast 1033 — 2y
Ad

Answer this question