Advertisement
TryHarderNoob

fffffffff

Dec 11th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. game.Players.PlayerAdded:connect(function(plr)
  2. glockActivate = false
  3. debounce = false
  4.  
  5. local function showMessage(message)
  6. if debounce == false then
  7. debounce = true
  8. local hintScreenGui = Instance.new("ScreenGui", plr.PlayerGui)
  9. hintScreenGui.Name = "hintScreenGui"
  10. local hintFrame = Instance.new("Frame", plr.PlayerGui.hintScreenGui)
  11. hintFrame.Name = "hintFrame"
  12. hintFrame.BackgroundColor = BrickColor.new(0, 0, 0)
  13. hintFrame.BackgroundTransparency = 0.3
  14. hintFrame.Position = UDim2.new(-0.1, 0, 0.1, 0)
  15. hintFrame.Size = UDim2.new(0, 0, 0.1, 0)
  16. local notificationSound = Instance.new("Sound", plr.PlayerGui.hintScreenGui)
  17. notificationSound.SoundId = "rbxassetid://205310435"
  18. notificationSound:Play()
  19. hintFrame:TweenSize(UDim2.new(1.2, 0, 0.1, 0), "Out", "Quad", 2)
  20. local glockText = Instance.new("TextBox", plr.PlayerGui.hintScreenGui.hintFrame)
  21. glockText.Name = "glockText"
  22. glockText.BackgroundTransparency = 1
  23. glockText.BorderSizePixel = 0
  24. glockText.Size = UDim2.new(1, 0, 1, 0)
  25. glockText.Font = 5
  26. glockText.Text = ""
  27. glockText.TextColor3 = Color3.fromRGB(255, 255, 255)
  28. glockText.TextScaled = true
  29. local text = message
  30. wait(2)
  31. for i = 0, #text do
  32. glockText.Text = string.sub(text, 1, i)
  33. wait()
  34. end
  35. wait(2)
  36. local glockTextTransparency = 0
  37. while glockTextTransparency < 1 do
  38. glockTextTransparency = glockTextTransparency + 0.05
  39. glockText.TextTransparency = glockTextTransparency
  40. wait()
  41. end
  42. local backgroundTransparency = 0.3
  43. while backgroundTransparency < 1 do
  44. backgroundTransparency = backgroundTransparency + 0.05
  45. hintFrame.BackgroundTransparency = backgroundTransparency
  46. wait()
  47. end
  48. plr.PlayerGui.hintScreenGui:Destroy()
  49. debounce = false
  50. end
  51. end
  52.  
  53. plr.Chatted:connect(function(msg)
  54. if plr:GetRankInGroup(groupID) >= minimumRankGlockActivate then
  55. if msg == "-glock on" then
  56. if debounce == false then
  57. if glockActivate == false then
  58. glockActivate = true
  59. game.Players.PlayerAdded:connect(function(plr)
  60. for _,v in pairs (game.Players:GetChildren()) do
  61. if v:GetRankInGroup(groupID) < minimumRankGlockAvoidance then
  62. plr:Kick("This server is group locked.")
  63. end
  64. end
  65. end)
  66. if plr:GetRankInGroup(groupID) < minimumRankGlockAvoidance then
  67. plr:Kick("The server is group locked.")
  68. end
  69. showMessage("The server has been group locked!")
  70. end
  71. end
  72. elseif msg == "-glock off" then
  73. if debounce == false then
  74. if glockActivate == true then
  75. glockActivate = false
  76. showMessage("The server has been unlocked!")
  77. end
  78. end
  79. end
  80. end
  81. end)
  82. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement