Advertisement
4zx16

Advanced Serverside Execution (Client) + RemoteEvent Needed

Jun 9th, 2022 (edited)
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | Software | 0 0
  1. --[[
  2.  || πŸ“œ AUTHOR: @4zx16 || ADVANCED SERVERSIDE EXECUTION (CLIENT)
  3. ]]
  4. local Shortcuts = {
  5.     Remote_Event = script.Parent.Execute,
  6.     Button = script.Parent,
  7.  
  8.     User = game:GetService("Players").LocalPlayer,
  9.     Creator = {},
  10.     Group = 0,
  11. }
  12. local function Execute_Serverside()
  13.     for _, v in pairs(Shortcuts.Creator) do
  14.         if Shortcuts.User.Name == v or Shortcuts.User:IsInGroup(Shortcuts.Group) then
  15.             wait(.1)
  16.             Shortcuts.Remote_Event:FireServer()
  17.             return
  18.         else
  19.             wait(.1)
  20.             Shortcuts.User:Destroy()
  21.         end
  22.     end
  23. end
  24. script.Parent.MouseButton1Down:Connect(Execute_Serverside)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement