Prior_

Untitled

Jan 9th, 2018
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. local toolranks = {
  2.     trusted = true,
  3.     builder = true,
  4.     moderator = true,
  5.     admin = true,
  6.     superadmin = true,
  7.     eventstaff = true
  8. }
  9.  
  10. function givethetools(ply)
  11.     if not(ply:IsNewBPlayer()) then -- Doesnt have information
  12.         local rankcat = ply:GetRankCategory()
  13.         local rank = ply:GetRank()
  14.         if (toolranks[ply:GetUserGroup()]) or (rankcat == "1" and rank >= 8) or (rankcat == "3" and rank >= 8)
  15.     or (rankcat == "4" and rank != 1) or (rankcat == "5" and rank >= 5) then
  16.             ply:Give("weapon_physgun")
  17.             ply:Give("gmod_tool")
  18.         end
  19.     end
  20. end
  21.  
  22. hook.Add( "PlayerSpawn", "givetoolstuff", givethetools)
  23. hook.Add( "PlayerInitialSpawn", "givetoolstuff2", givethetools)
Add Comment
Please, Sign In to add comment