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

RemoteEvent Exploit prevention. am i doing it right?

Asked by 5 years ago

Hey, Still pretty new to scripting and slowly getting my head around remotes. Before i go any further i would like some advice as to if i'm working in the right direction of Exploit prevention.

If i were to fire a RemoteEvent from a localscript, would the below ServerScript prevent exploiters from firing the event multiple times?

Note i have a seperate ServerScript creating the RemoteDebounce Bool inside ServerStorage.Player upon PlayerAdded.

01local ss = game:GetService("ServerStorage")
02local rs = game:GetService("ReplicatedStorage")
03 
04 
05rs.Remote.OnServerEvent:Connect(function(player)
06    if ss[player.Name].RemoteDebounce.Value == true then
07        return
08    end
09    if ss[player.Name].RemoteDebounce.Value == false then
10        ss[player.Name].RemoteDebounce.Value = true
11 
12 
13    if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, gamepassid) then
14 
15        --Code Here--
View all 26 lines...
0
Ive had my fair share of worries about this, the best you can do is give the server more control in places you understand. for example, i would probably have a value inside the character that counts down from a server script, and have the remoteevent read that value before it decides to fire. Fatul 9 — 5y
0
I figured this was the roughly the same thing, except instead of a value in the player as you suggest, mine is inside serverstorage, which i believe is only accessable by the server. Yishles 4 — 5y

Answer this question