Advertisement
Chxp

Untitled

Jul 29th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. script.Parent = game.ServerScriptService
  2. Admins = {"Chxp", "Player", "Player1"}
  3. RISE = 5
  4. TURN = -2.5
  5. FOLLOW = true
  6. Prefix = ";"
  7. Orbs = {}
  8. CS = game:GetService("Chat")
  9.  
  10. function Create(Name,Size,Char,LifeLine,Chat)
  11.  
  12. local P = Instance.new("Part", Char)
  13. if P.Parent ~= nil then
  14. P.Name = Name
  15. P.FormFactor = "Custom"
  16. P.Size = Vector3.new(Size,Size,Size)
  17. P.BrickColor = BrickColor.new("Institutional white")
  18. P.TopSurface = "Smooth"
  19. P.BottomSurface = "Smooth"
  20. P.CanCollide = false
  21. P.CFrame = CFrame.new(Char.Torso.Position)
  22. local D = Instance.new("Decal", P)
  23. D.Texture = "http://www.roblox.com/asset/?id=202384125"
  24. D.Face = "Front"
  25. D = Instance.new("Decal", P)
  26. D.Texture = "http://www.roblox.com/asset/?id=202384125"
  27. D.Face = "Back"
  28. local Partical = Instance.new("ParticleEmitter", P)
  29. Partical.Rate = 1
  30. Partical.Rotation = NumberRange.new(90,180)
  31. Partical.RotSpeed = NumberRange.new(30,50)
  32.  
  33. Partical.Texture = "http://www.roblox.com/asset/?id=202384125"
  34. local Mesh = Instance.new("SpecialMesh", P)
  35. Mesh.MeshType = "Sphere"
  36. local BP = Instance.new("BodyPosition", P)
  37. BP.Name = "BP"
  38. local A = Instance.new("NumberValue", P)
  39. A.Name = "angle"
  40. table.insert(Orbs, 1, P)
  41. repeat wait() until P.Parent
  42. if Chat then
  43.  
  44. CS:Chat(P, Chat, "Blue")
  45.  
  46. end
  47. if LifeLine then
  48. game:GetService("Debris"):AddItem(P, LifeLine)
  49. end
  50. return P
  51. else
  52. P:Destroy()
  53. return nil
  54. end
  55. end
  56.  
  57. function GetPlr(Msg, Ply)
  58. local M=false
  59. local Plys = {}
  60. local Players = game.Players:GetChildren()
  61. local x = 1
  62.  
  63. for i=1, string.len(Msg) do
  64. local Str = string.sub(Msg, x, i)
  65. if string.sub(Msg, i, i) == "," then
  66. Str = string.sub(Msg, x, i-1)
  67. for i, Player2 in ipairs(Players) do
  68. local N = Player2.Name:lower()
  69. for i=1, string.len(N) do
  70. local Str2 = string.sub(N, 1, i)
  71. if Str == "me" then table.insert(Plys, 1, Ply); break end
  72. if Str == "all" then for i,P in ipairs(game.Players:GetChildren()) do table.insert(Plys, 1, P) end; M=true; break end
  73. if Str == Str2 then table.insert(Plys, 1, Player2); break end
  74. end
  75. if M == true then break end
  76. end
  77. x = i+1
  78. end
  79. if string.sub(Msg, i, i) == " " then
  80. Str = string.sub(Msg, x, i-1)
  81. for i, Player2 in ipairs(Players) do
  82. local N = Player2.Name:lower()
  83. for i=1, string.len(N) do
  84. local Str2 = string.sub(N, 1, i)
  85. if Str == "me" then table.insert(Plys, 1, Ply); M = true; break end
  86. if Str == "all" then for i,P in ipairs(game.Players:GetChildren()) do table.insert(Plys, 1, P) end; M=true; break end
  87. if Str == Str2 then table.insert(Plys, 1, Player2); M = true; break end
  88. end
  89. if M == true then break end
  90. end
  91. x = i+1
  92. break
  93. end
  94.  
  95. if i == string.len(Msg) then
  96. Str = string.sub(Msg, x, i)
  97. for i, Player2 in ipairs(Players) do
  98. local N = Player2.Name:lower()
  99. for i=1, string.len(N) do
  100. local Str2 = string.sub(N, 1, i)
  101. if Str == "me" then table.insert(Plys, 1, Ply); M = true; break end
  102. if Str == "all" then for i,P in ipairs(game.Players:GetChildren()) do table.insert(Plys, 1, P) end; M=true; break end
  103. if Str == Str2 then table.insert(Plys, 1, Player2); M = true; break end
  104. end
  105. if M == true then break end
  106. end
  107. x = i+1
  108. break
  109. end
  110. end
  111.  
  112. return Plys,string.sub(Msg, x)
  113. end
  114.  
  115. function OnChatted(Msg, Player)
  116. Msg = Msg:lower()
  117. if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+3) == "tp " then
  118. local Plrs,Str = GetPlr(string.sub(Msg, 4+string.len(Prefix)), Player)
  119. local Plrs2,Str = GetPlr(Str, Player)
  120. if #Plrs >= 1 and #Plrs2 >= 1 then
  121. for i, P in ipairs(Plrs) do
  122. P.Character:MoveTo(Plrs2[1].Character.Torso.Position)
  123. end
  124. else
  125. Create("Mess", 2, Player.Character, 5, "Correct useage is: /tp (Player1) (Player2)")
  126. end
  127. return
  128. end
  129. -- Kill
  130. if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+5) == "kill " then
  131. local Plrs,Str = GetPlr(string.sub(Msg, 6+string.len(Prefix)), Player)
  132. for i, P in ipairs(Plrs) do
  133. coroutine.resume(coroutine.create(function()
  134. P.Character:LoadCharacter()
  135. end))
  136. end
  137. end
  138. -- Orb
  139. if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+4) == "orb " then
  140. local Plrs,Str = GetPlr(string.sub(Msg, 5+string.len(Prefix)), Player)
  141. for i, P in ipairs(Plrs) do
  142. coroutine.resume(coroutine.create(function()
  143. local Orb = Create("Orb", 2, P.Character, nil, "I have come master.")
  144. local L = Instance.new("SelectionPartLasso", P.Character)
  145. L.Part = Orb
  146. L.Humanoid = P.Character.Humanoid
  147. L.Color = BrickColor.new("Bright blue")
  148. game:GetService("Debris"):AddItem(L, 5)
  149. end))
  150. end
  151. end
  152. -- Unorb
  153. if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+6) == "unorb " then
  154. local Plrs,Str = GetPlr(string.sub(Msg, 7+string.len(Prefix)), Player)
  155. for i, P in ipairs(Plrs) do
  156. coroutine.resume(coroutine.create(function()
  157. if P.Character then
  158. for x, T in ipairs(P.Character:GetChildren()) do
  159. if T.Name == "Orb" then T:Destroy() end
  160. end
  161. end
  162. end))
  163. end
  164. end
  165. -- Bypass
  166. if string.sub(Msg, string.len(Prefix)+1, string.len(Prefix)+6) == "bypass" then
  167. _G.Sand = nil
  168. _G.Sand = "Bypassed"
  169. print("Bypassed")
  170. end
  171. end
  172.  
  173. game.Players.ChildAdded:connect(function(Player)
  174. local Character = Player.Character or Player.CharacterAdded:wait()
  175. local Yus = false
  176. for i,A in ipairs(Admins) do if A == Player.Name then Yus = true end end
  177. if Yus then
  178. Player.Chatted:connect(function(Msg)
  179. if string.sub(Msg, 1, string.len(Prefix)) == Prefix then
  180. OnChatted(Msg, Player)
  181. end
  182. end)
  183. Create("Mess",2,Character,8,"You're an admin!")
  184. end
  185. for x,P in ipairs(game.Players:GetChildren()) do for i,A in ipairs(Admins) do if A == P.Name or A == P.userId then Create("Halp",2,P.Character,8,Player.Name.." connected.") end end end
  186. Create("Join",2,Character,8,"Welcome, "..Player.Name.."!")
  187. end)
  188.  
  189. game.Players.ChildRemoved:connect(function(Player)
  190. for x,P in ipairs(game.Players:GetChildren()) do for i,A in ipairs(Admins) do if A == P.Name or A == P.userId then Create("Halp",2,P.Character,8,Player.Name.." disconnected.") end end end
  191. end)
  192.  
  193. for i,Player in ipairs(game.Players:GetChildren()) do
  194. coroutine.resume(coroutine.create(function()
  195. local Character = Player.Character or Player.CharacterAdded:wait()
  196. local Yus = false
  197. for i,A in ipairs(Admins) do if A == Player.Name then Yus = true end end
  198. if Yus then
  199. Player.Chatted:connect(function(Msg)
  200. if string.sub(Msg, 1, string.len(Prefix)) == Prefix then
  201. OnChatted(Msg, Player)
  202. end
  203. end)
  204. Create("Mess",2,Character,8,"You're an admin!")
  205. end
  206. for x,P in ipairs(game.Players:GetChildren()) do for i,A in ipairs(Admins) do if A == P.Name or A == P.userId then Create("Halp",2,Player.Character,8,Player.Name.." joined.") end end end
  207. Create("Join",2,Character,8,"Welcome, "..Player.Name.."!")
  208. end))
  209. end
  210.  
  211. local Levitated = 0
  212. local LevitateDir = -1
  213. local angle = 11.25
  214.  
  215. while true do
  216. wait()
  217. pcall(function()
  218. angle = angle+5
  219. if angle>=360 then angle = 0 end
  220. Levitated = Levitated + LevitateDir / 20
  221. if Levitated >= 1 or Levitated <= -1 then
  222. LevitateDir = -LevitateDir
  223. end
  224. for i,Orb in ipairs(Orbs) do
  225. if Orb.Parent then
  226. -- Levitation --
  227.  
  228. TURN = angle
  229. if (FOLLOW == true) then
  230. Orb.BP.position = (CFrame.new(Orb.Parent.Torso.Position.X, Orb.Parent.Torso.Position.Y, Orb.Parent.Torso.Position.Z) * CFrame.Angles(math.rad(0), math.rad(TURN + (360/#Orbs)*i), math.rad(0)) * CFrame.new(1, 1.5, 2*#Orbs)).p + Vector3.new(0, Levitated, 0)
  231. end
  232. else
  233. table.remove(Orbs, i)
  234. end
  235. end
  236. end)
  237. wait(0.1)
  238. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement