What I've Been Told
I've been told that RemoteEvents get their UserId through locally or through the Client. I am also told that Exploiters can access another clients PlayerGui Folder. Apparently, exploiters can use something called debug.profilebegin to access another clients PlayerGui Folder.
My Scripts
My scripts are designed to make sure anyone who isn't under the Admin ID list can't get access to these controls or even if they get access to the controls themselves, every time a button is pressed... it checks to see if the users UserId is equal to one of the adminIDs.
Improvements/Wants
I have nothing to go off of to know what I can improve on but I want to make sure that my code is unable to be exploited against me.
My Question
Is my script secure and not exploitable? What else do I need to know?
Command In Action
--Made By MillerrIAm
-------------------Variables------------------
Event = game.ReplicatedStorage.ColorEvents.ExampleEvent
adminCheck = require(game.ServerScriptService["Scripts|Admins"]["ModuleScript|AdminCheck"])
------------------Main Script------------------
Event.OnServerEvent:Connect(function(plr,function1,function2)
if adminCheck.Activate(plr) then
end
end)
Admin Module
--[Made By MillerrIAm]--
--------[Variables]-------
local player = game:GetService("Players")
---------[Admins]--------
adminIDs = {678299,4947564}
--[[UserIds in order = {"MillerrIAm" = 678299,"NemesisY2J"}]]
--------[Main Code]------
local adminCheck = {}
function adminCheck.Activate(plr)
for i,Admin in ipairs (adminIDs) do
if plr.UserId == Admin then
print("Admin Started")
return true
else
return false
end
end
end
return adminCheck
Thank you for any feedback you give me.

1 comment
Should be fine, As long as you don't break the rule "Basic Server Side Validation" it should be fine, Also you can use table.find() instead of a loop