Advertisement
Runixer

Untitled

Feb 20th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.71 KB | None | 0 0
  1. --[[
  2. Requires 2 devices
  3. How to use:
  4. You need another device
  5.  
  6. Open Roblox on another account on that device
  7. Join the same game
  8. Change "Admin" to the other device's Roblox account.
  9. Change "Username" to the device you executed this script in.
  10. ]]
  11. Admin = "Uctron" -- Admin
  12. Username = "bombasticobiggie" -- Your Roblox username
  13. Prefix = ";"
  14.  
  15. for v,i in pairs(game.Players:GetChildren()) do
  16. i.Chatted:connect(function(msg)
  17. if msg == Prefix.."respawn "..Username then
  18. randomInteger = 1
  19. function generateSpawns()
  20. Generated = {}
  21. for Idx, Val in pairs(workspace:GetDescendants()) do
  22. if Val:IsA("SpawnLocation") then
  23. table.insert(Generated, Val)
  24. end
  25. end
  26. return Generated
  27. end
  28.  
  29. randomInteger = randomInteger + 1
  30. math.randomseed(os.time() + randomInteger)
  31.  
  32. generatedTable = generateSpawns()
  33. randomSpawn = generatedTable[math.random(1, #generatedTable)]
  34. game:GetService("Players").LocalPlayer.Character["HumanoidRootPart"].CFrame = randomSpawn.CFrame
  35. end
  36. end)
  37. end
  38.  
  39. for v,i in pairs(game.Players:GetChildren()) do
  40. i.Chatted:connect(function(msg)
  41. if msg == Prefix.."bring "..Username then
  42. local me = game.Players.LocalPlayer.Character
  43.  
  44. local targetplayer = game.Workspace[Admin].HumanoidRootPart
  45.  
  46. me.HumanoidRootPart.CFrame = CFrame.new(targetplayer.Position.X, targetplayer.Position.Y, targetplayer.Position.Z)
  47. end
  48. end)
  49. end
  50.  
  51. for v,i in pairs(game.Players:GetChildren()) do
  52. i.Chatted:connect(function(msg)
  53. if msg == Prefix.."kill "..Username then
  54. workspace[Username].Humanoid.Health = 0
  55. end
  56. end)
  57. end
  58.  
  59. for v,i in pairs(game.Players:GetChildren()) do
  60. i.Chatted:connect(function(msg)
  61. if msg == Prefix.."kick "..Username then
  62. game.Players[Username]:Kick()
  63. end
  64. end)
  65. end
  66.  
  67. for v,i in pairs(game.Players:GetChildren()) do
  68. i.Chatted:connect(function(msg)
  69. if msg == Prefix.."sit "..Username then
  70. workspace[Username].Humanoid.Sit = true
  71. end
  72. end)
  73. end
  74.  
  75. for v,i in pairs(game.Players:GetChildren()) do
  76. i.Chatted:connect(function(msg)
  77. if msg == Prefix.."jump "..Username then
  78. workspace[Username].Humanoid.Jump = true
  79. end
  80. end)
  81. end
  82.  
  83. for v,i in pairs(game.Players:GetChildren()) do
  84. i.Chatted:connect(function(msg)
  85. if msg == Prefix.."particle trump "..Username then
  86. local a = Instance.new("ParticleEmitter")
  87. a.Texture = "http://www.roblox.com/asset/?id=378919754"
  88. a.VelocitySpread = 100
  89. a.Parent = game.Workspace[Username].Humanoid.Torso
  90.  
  91. end
  92. end)
  93. end
  94.  
  95. for v,i in pairs(game.Players:GetChildren()) do
  96. i.Chatted:connect(function(msg)
  97. if msg == Prefix.."loopkill "..Username then
  98. while wait() do
  99. workspace[Username]:BreakJoints()
  100. end
  101. end
  102. end)
  103. end
  104.  
  105. for v,i in pairs(game.Players:GetChildren()) do
  106. i.Chatted:connect(function(msg)
  107. if msg == Prefix.."faceless "..Username then
  108. workspace[Username].Head.face:Remove()
  109. end
  110. end)
  111. end
  112.  
  113. for v,i in pairs(game.Players:GetChildren()) do
  114. i.Chatted:connect(function(msg)
  115. if msg == Prefix.."fly "..Username then
  116. repeat wait()
  117. until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
  118. local mouse = game.Players.LocalPlayer:GetMouse()
  119. repeat wait() until mouse
  120. local plr = game.Players.LocalPlayer
  121. local torso = plr.Character.Torso
  122. local flying = true
  123. local deb = true
  124. local ctrl = {f = 0, b = 0, l = 0, r = 0}
  125. local lastctrl = {f = 0, b = 0, l = 0, r = 0}
  126. local maxspeed = 50
  127. local speed = 0
  128.  
  129. function Fly()
  130. local bg = Instance.new("BodyGyro", torso)
  131. bg.P = 9e4
  132. bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
  133. bg.cframe = torso.CFrame
  134. local bv = Instance.new("BodyVelocity", torso)
  135. bv.velocity = Vector3.new(0,0.1,0)
  136. bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
  137. repeat wait()
  138. plr.Character.Humanoid.PlatformStand = true
  139. if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
  140. speed = speed+.5+(speed/maxspeed)
  141. if speed > maxspeed then
  142. speed = maxspeed
  143. end
  144. elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
  145. speed = speed-1
  146. if speed < 0 then
  147. speed = 0
  148. end
  149. end
  150. if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
  151. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  152. lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
  153. elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
  154. bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
  155. else
  156. bv.velocity = Vector3.new(0,0.1,0)
  157. end
  158. bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
  159. until not flying
  160. ctrl = {f = 0, b = 0, l = 0, r = 0}
  161. lastctrl = {f = 0, b = 0, l = 0, r = 0}
  162. speed = 0
  163. bg:Destroy()
  164. bv:Destroy()
  165. plr.Character.Humanoid.PlatformStand = false
  166. end
  167. mouse.KeyDown:connect(function(key)
  168. if key:lower() == "e" then
  169. if flying then flying = false
  170. else
  171. flying = true
  172. Fly()
  173. end
  174. elseif key:lower() == "w" then
  175. ctrl.f = 1
  176. elseif key:lower() == "s" then
  177. ctrl.b = -1
  178. elseif key:lower() == "a" then
  179. ctrl.l = -1
  180. elseif key:lower() == "d" then
  181. ctrl.r = 1
  182. end
  183. end)
  184. mouse.KeyUp:connect(function(key)
  185. if key:lower() == "w" then
  186. ctrl.f = 0
  187. elseif key:lower() == "s" then
  188. ctrl.b = 0
  189. elseif key:lower() == "a" then
  190. ctrl.l = 0
  191. elseif key:lower() == "d" then
  192. ctrl.r = 0
  193. end
  194. end)
  195. Fly()
  196. end
  197. end)
  198. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement