timmysjet123456789

ROBLOX Admin Door Script

Jul 28th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. admins = {"Username"}
  2.  
  3. game.Players.PlayerAdded:connect(function(p)
  4. for _,a in pairs (admins) do
  5. if p.Name == a then
  6. p.Chatted:connect(function(msg)
  7. if (msg:lower()== "open") then
  8. script.Parent.CanCollide = false
  9. script.Parent.BrickColor = BrickColor.new("Bright green")
  10. script.Parent.SurfaceGui.TextLabel.Text = "OPEN"
  11. script.Parent.SurfaceGui2.TextLabel.Text = "OPEN"
  12. script.Parent.Beep:Play()
  13. script.Parent.Transparency = .5
  14. elseif (msg:lower() == "close") then
  15. script.Parent.CanCollide = true
  16. script.Parent.BrickColor = BrickColor.new("Bright red")
  17. script.Parent.SurfaceGui.TextLabel.Text = "CLOSED"
  18. script.Parent.SurfaceGui2.TextLabel.Text = "CLOSED"
  19. script.Parent.Beep:Play()
  20. script.Parent.Transparency = .2
  21. end
  22. end)
  23. end
  24. end
  25. end)
  26.  
  27. script.Parent.Touched:connect(function()
  28. if (script.Parent.SurfaceGui.TextLabel.Text == "CLOSED") then
  29. script.Parent.Transparency = .5
  30. script.Parent.FF:Play()
  31. wait(.1)
  32. script.Parent.Transparency = .2
  33. else
  34. script.Parent.Transparency = .2
  35. script.Parent.FF:Play()
  36. wait(.1)
  37. script.Parent.Transparency = .5
  38. end
  39. end)
Add Comment
Please, Sign In to add comment