The_Samuelson_Studio

Announcement System #2

Sep 29th, 2023 (edited)
934
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. --[CHECK THE NEW VIDEO!]--
  2. -- https://youtu.be/rHBLb0j1uJ0 --
  3.  
  4. -- [GROUP ALLOWED] --
  5.  
  6. local plr = game:GetService("Players").LocalPlayer
  7. local groupid = 0000 -- Paste your group's id here.
  8. local rankallowed = 1 -- Paste the minimum rank id that a player needs to have!
  9.  
  10. local frame = script.Parent
  11.  
  12. if plr:GetRankInGroup(groupid) >= rankallowed then
  13.     frame.Visible = true
  14. else
  15.     frame:Destroy()
  16. end
  17.  
  18.  
  19.  
  20. -- [PLAYER ALLOWED] --
  21. local plr = game:GetService("Players").LocalPlayer
  22. local frame = script.Parent
  23. local allowedPlayers = {"AddUsernamehere", "AddUsernamehere"} -- Change the names here!
  24.  
  25.  
  26. local function PlayerAllowed()
  27.     local playername = plr.Name
  28.     for _, allowedplayer in ipairs(allowedPlayers) do
  29.         if allowedplayer == playername then
  30.             return true
  31.         end
  32.     end
  33.     return false
  34. end
  35.  
  36. if PlayerAllowed(plr) then
  37.     frame.Visible = true
  38. else
  39.     frame:Destroy()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment