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)

2 comments
I wanna make a good security for my game so exploiters dont just /kill all :/
They can literally delete the local script so the chances of that working is near 0%