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

Will this encryption script i made work for my scripts?

Asked by 3 years ago

I made this script that can help give a random value for ur local script firing and fire the random value and is this a efficent security method? (minds this is all a example this isnt actully true)

Random value script ;

function(Generate)
local N1 = math.random(1,9)
local N2 = math.random(1,9)
local N3 = math.random(1,9)
local N4 = math.random(1,9)
local N5 = math.random(1,9)
local N6 = math.random(1,9)
local Code = N1 * N5 ^ N2 /N3 + N4 - N6
local Codedisplay = Instance.new("Part",game.Workspace)
Codedisplay.Name = Code
end
game.ReplicatedStorage.BindableEventExample.Event:connect(Generate)

Local script:

script.Parent.Touched:connect(function(part)
local plr  = game.Players:GetPlayerFromCharacter(part.Parent)
game.ReplicatedStorage.ServerEvent:FireServer(plr,game.Workspace.Codedisplay.Name)
end)

ServerScript:

while true do wait(0.5)
game.ReplicatedStorage.BindableEventExample:Fire()
end
game.ReplicatedStorage.ServerEvent.OnServerEvent:connect(function(plr,Code)
if Code = game.Workspace.Codedisplay.Name then
plr.Character.Humanoid.Health = 0
end
end)
0
I wanna make a good security for my game so exploiters dont just /kill all :/ TheUltimateTNTFriend 109 — 3y
2
They can literally delete the local script so the chances of that working is near 0% User#32819 0 — 3y

1 answer

Log in to vote
0
Answered by
Dfzoz 489 Moderation Voter
3 years ago
Edited 3 years ago

You know, the OnServerEvent of RemoteEvent first parameter will always be the player who fired it, so the variable plr is representing who fired the event, and variable code is being represented by local plr = game.Players:GetPlayerFromCharacter(part.Parent). So the actual CodeDisplay.Name you sent to the serverevent would be a third parameter.

But you can just sanity check who fired the event on the server with that first parameter to prevent hacking. Even though the hacker would still be able to just delete the touched event, in which case he wouldn't be affected by it, so its just better to let the touched event fire serverside too.

0
ok TheUltimateTNTFriend 109 — 3y
0
also as i stated before this is a example incase i might need to use a local script for UIS or something like that so i want good security for hackers to not be able to hack the UIS system TheUltimateTNTFriend 109 — 3y
Ad

Answer this question