Advertisement
fsxboy3

Untitled

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