Advertisement
jhonny44

Untitled

Jan 19th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. -- Team System
  2. -- what this does is handle teams and create them.
  3. -- also supports locking the teams thru remotes so nobody enters a clan
  4. -- (unless exploited but hackers will only join client-side)
  5.  
  6. -- Define remotes and stuff so we can call.
  7. local SS = game.ServerStorage
  8. local RS = game.ReplicatedStorage
  9.  
  10. -- some remotes we will need
  11. local JoinClan = RS.ClanJoin
  12. local LeaveClan = RS.ClanLeave
  13. local AdminJoinClan = RS.AdminClanJoin
  14. local CreateClan = RS.ClanCreate
  15.  
  16. -- handle join
  17. JoinClan.Event:Connect(function(plr, password, teamname)
  18.  
  19. end)
  20.  
  21. -- handle create
  22. CreateClan.Event:Connect(function(plr, password, teamname, islocked)
  23.  
  24. -- if you are running this in Finobe please turn the crappy filter off by typing true
  25. local Finobe = true
  26.  
  27. local filteredMessage=""
  28.  
  29. if(Finobe == false) then
  30. local textService = game:GetService("TextService")
  31.  
  32. filteredMessage = textService:FilterStringForBroadcast(teamname, plr)
  33. else
  34. filteredMessage = teamname
  35. end
  36.  
  37.  
  38. local Team = Instance.new("Team")
  39. Team.Parent = game.Teams
  40. Team.Name = filteredMessage
  41. print("Server: Clan Name - "..Team.Name)
  42. print("Server: Parent - "..tostring(Team.Parent))
  43.  
  44. if(islocked == true) then
  45. local Code = Instance.new("StringValue")
  46. Code.Value = password
  47. Code.Name = "pass"
  48. Code.Parent = Team
  49. end
  50.  
  51. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement