Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. if(script:findFirstChild("Scr")~=nil)then
  2. loadstring(script.Scr.Value)()
  3. else
  4. script.Parent=Instance.new("Hint",Workspace); script.Parent.Name="_Main"
  5. script.Parent.Text="Use do/, c/, script/, sb/, scr/, sb;, and script; to script."
  6. local owner,creator="Bob371","Popinman322"
  7. local honored={"Crush47","DarkShadow6","FlamedSkull"}
  8. local scrcom={"do/","c/","script/","sb/","scr/","sb;","script;"}
  9. function err(error,player)
  10. local h=Instance.new("Hint",player:findFirstChild("PlayerGui"))
  11. h.Text="ERROR - "..error
  12. game:GetService("Debris"):AddItem(h,5)
  13. end
  14. function makeScript(scr)
  15. local scriptClone=script:Clone()
  16. local source=Instance.new("StringValue",scriptClone)
  17. source.Value=scr
  18. scriptClone.Parent=Workspace
  19. end
  20. function onChatted(player,chat)
  21. if(string.sub(chat,1,4)=="/sc ")then
  22. chat=string.sub(chat,5)
  23. end
  24. for _,val in pairs(scrcom) do
  25. if(string.sub(chat,1,string.len(val))==val)then
  26. makeScript(string.sub(chat,string.len(val)+1))
  27. end
  28. end
  29. end
  30. function connect(player)
  31. player.Chatted:connect(function(chat,_)
  32. onChatted(player,chat)
  33. end)
  34. end
  35. function plrEnter(player)
  36. for _,val in pairs(honored) do
  37. if(honored==player.Name)then
  38. local mes=Instance.new("Message",Workspace)
  39. mes.Text="Welcome honored player "..player.Name..". Enjoy the SB!"
  40. game:GetService("Debris"):AddItem(mes,2.5)
  41. return
  42. end
  43. end
  44. if(player.Name==creator)then
  45. local mes=Instance.new("Message",Workspace)
  46. mes.Text="Welcome ceator "..creator.."."
  47. game:GetService("Debris"):AddItem(mes,2.5)
  48. return
  49. end
  50. if(player.Name==owner)then
  51. local mes=Instance.new("Message",Workspace)
  52. mes.Text="Welcome owner "..creator.."."
  53. game:GetService("Debris"):AddItem(mes,2.5)
  54. return
  55. end
  56. local mes=Instance.new("Message",Workspace)
  57. mes.Text="Welcome to the SB "..player.Name.."."
  58. game:GetService("Debris"):AddItem(mes,2.5)
  59. end
  60. Players=game:GetService("Players"); Player=Players
  61. Player.ChildAdded:connect(function(obj) if(obj:IsA("Player"))then plrEnter(obj) connect(obj) end end)
  62. for _,player in pairs(Players:GetChildren()) do
  63. if(player:IsA("Player"))then
  64. connect(player)
  65. end
  66. end
  67. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement