MrWiggles1029

ROBLOX Super Robloxian

Sep 4th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.30 KB | None | 0 0
  1. --"Super Robloxian" by MUDDMUTT
  2. player = game.Players.LocalPlayer
  3. mouse = player:GetMouse()
  4. character = player.Character
  5. camera = game.Workspace.CurrentCamera
  6. debris = game:GetService("Debris")
  7. lasersound = "http://www.roblox.com/asset?id=137463716" --sound by Aurarus
  8. firesound = "http://www.roblox.com/asset?id=131382140" --sound by cjcool12345
  9. speed = 0
  10. tilt = 0
  11. script.Parent = player
  12. player.CharacterAdded:connect(function()
  13. character = player.Character
  14. end)
  15. mouse.KeyDown:connect(function(key)
  16. if string.lower(key) == "e" then
  17. if not flying then
  18. flying = true
  19. character.Humanoid.PlatformStand = true
  20. velocity = Instance.new("BodyVelocity", character.HumanoidRootPart)
  21. velocity.velocity = Vector3.new(0, 0, 0)
  22. velocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  23. direction = Instance.new("BodyGyro", character.HumanoidRootPart)
  24. direction.cframe = camera.CoordinateFrame
  25. direction.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  26. else
  27. flying = false
  28. if speed == 64 then
  29. speed = 0
  30. while tilt > 1 and speed == 0 do
  31. tilt = tilt - 1
  32. character.HumanoidRootPart.RootJoint.C1 = CFrame.Angles(math.pi / 2 + (math.pi / 64) * tilt, math.pi, 0)
  33. wait()
  34. end
  35. elseif speed == -64 then
  36. speed = 0
  37. while tilt < -1 and speed == 0 do
  38. tilt = tilt + 1
  39. character.HumanoidRootPart.RootJoint.C1 = CFrame.Angles(math.pi / 2 + (math.pi / 64) * tilt, math.pi, 0)
  40. wait()
  41. end
  42. end
  43. character.Humanoid.PlatformStand = false
  44. velocity:Destroy()
  45. direction.maxTorque = Vector3.new(math.huge, 0, math.huge)
  46. direction.cframe = CFrame.Angles(0, 0, 0)
  47. wait(1)
  48. direction:Destroy()
  49. end
  50. elseif string.lower(key) == "w" and speed == 0 and flying then
  51. speed = 64
  52. while tilt < 16 and speed == 64 do
  53. tilt = tilt + 1
  54. character.HumanoidRootPart.RootJoint.C1 = CFrame.Angles(math.pi / 2 + (math.pi / 64) * tilt, math.pi, 0)
  55. wait()
  56. end
  57. elseif string.lower(key) == "s" and speed == 0 and flying then
  58. speed = -64
  59. while tilt > -15 and speed == -64 do
  60. tilt = tilt - 1
  61. character.HumanoidRootPart.RootJoint.C1 = CFrame.Angles(math.pi / 2 + (math.pi / 64) * tilt, math.pi, 0)
  62. wait()
  63. end
  64. elseif string.byte(key) == 48 then
  65. shift = true
  66. end
  67. end)
  68. mouse.KeyUp:connect(function(key)
  69. if string.lower(key) == "w" and speed == 64 and flying then
  70. speed = 0
  71. while tilt > 1 and speed == 0 do
  72. tilt = tilt - 1
  73. character.HumanoidRootPart.RootJoint.C1 = CFrame.Angles(math.pi / 2 + (math.pi / 64) * tilt, math.pi, 0)
  74. wait()
  75. end
  76. elseif string.lower(key) == "s" and speed == -64 and flying then
  77. speed = 0
  78. while tilt < -1 and speed == 0 do
  79. tilt = tilt + 1
  80. character.HumanoidRootPart.RootJoint.C1 = CFrame.Angles(math.pi / 2 + (math.pi / 64) * tilt, math.pi, 0)
  81. wait()
  82. end
  83. elseif string.byte(key) == 48 then
  84. shift = false
  85. end
  86. end)
  87. mouse.Button1Down:connect(function()
  88. if not shift then
  89. beam = Instance.new("Part", game.Workspace)
  90. beam.BrickColor = BrickColor.new("Really red")
  91. beam.Reflectance = 0.5
  92. beam.Transparency = 0.5
  93. beam.Anchored = true
  94. beam.CanCollide = false
  95. beam.Locked = true
  96. beam.FormFactor = "Custom"
  97. beam.BottomSurface = "Smooth"
  98. beam.TopSurface = "Smooth"
  99. Instance.new("CylinderMesh", beam)
  100. mouse.TargetFilter = beam
  101. beam.Size = Vector3.new(0.2, (character.Head.Position - mouse.Hit.p).magnitude, 0.2)
  102. beam.CFrame = CFrame.new(character.Head.Position:Lerp(mouse.Hit.p, 0.5), mouse.Hit.p) * CFrame.Angles(math.pi / 2, 0, 0)
  103. hit = Instance.new("Part", beam)
  104. Instance.new("Fire", hit)
  105. hit.Transparency = 1
  106. hit.Anchored = true
  107. hit.CanCollide = false
  108. hit.Locked = true
  109. hit.FormFactor = "Custom"
  110. hit.BottomSurface = "Smooth"
  111. hit.TopSurface = "Smooth"
  112. hit.Size = Vector3.new(0.2, 0.2, 0.2)
  113. hit.CFrame = mouse.Hit
  114. sound = Instance.new("Sound", hit)
  115. sound.SoundId = lasersound
  116. sound:Play()
  117. sound.SoundId = firesound
  118. sound.Looped = true
  119. sound:Play()
  120. beam.Touched:connect(function(part)
  121. if part.Parent:findFirstChild("Humanoid") and part.Parent ~= character then
  122. Instance.new("Fire", part)
  123. sound:Clone().Parent = part
  124. part.Parent.Humanoid.Health = 0
  125. end
  126. end)
  127. hit.Touched:connect(function(part)
  128. if part.Parent:findFirstChild("Humanoid") and part.Parent ~= character then
  129. Instance.new("Fire", part)
  130. sound:Clone().Parent = part
  131. part.Parent.Humanoid.Health = 0
  132. end
  133. end)
  134. else
  135. fireball = Instance.new("Part", game.Workspace)
  136. fireball.BrickColor = BrickColor.new("Bright orange")
  137. Instance.new("Fire", fireball).Size = 10
  138. fireball.Reflectance = 0.5
  139. fireball.Transparency = 0.5
  140. fireball.CanCollide = false
  141. fireball.Locked = true
  142. fireball.Shape = "Ball"
  143. fireball.FormFactor = "Custom"
  144. fireball.BottomSurface = "Smooth"
  145. fireball.TopSurface = "Smooth"
  146. fireball.Size = Vector3.new(4, 4, 4)
  147. fireball.CFrame = character.Head.CFrame
  148. mouse.TargetFilter = fireball
  149. sound = Instance.new("Sound", fireball)
  150. sound.SoundId = firesound
  151. sound.Looped = true
  152. sound:Play()
  153. throw = Instance.new("BodyVelocity", fireball)
  154. throw.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  155. throw.velocity = CFrame.new(character.Head.Position, mouse.Hit.p).lookVector.unit * 128
  156. fireball.Touched:connect(function(part)
  157. if part.Parent:findFirstChild("Humanoid") and part.Parent ~= character then
  158. Instance.new("Fire", part)
  159. sound:Clone().Parent = part
  160. part.Parent.Humanoid.Health = 0
  161. end
  162. end)
  163. debris:AddItem(fireball, 20)
  164. end
  165. end)
  166. mouse.Button1Up:connect(function()
  167. if beam and hit then
  168. beam:Destroy()
  169. hit:Destroy()
  170. end
  171. end)
  172. character.Humanoid.Died:connect(function()
  173. if beam and hit then
  174. beam:Destroy()
  175. hit:Destroy()
  176. end
  177. end)
  178. while wait() do
  179. if flying then
  180. direction.cframe = camera.CoordinateFrame
  181. velocity.velocity = direction.cframe.lookVector.unit * speed
  182. end
  183. if beam and hit then
  184. beam.Size = Vector3.new(0.2, (character.Head.Position - mouse.Hit.p).magnitude, 0.2)
  185. beam.CFrame = CFrame.new(character.Head.Position:Lerp(mouse.Hit.p, 0.5), mouse.Hit.p) * CFrame.Angles(math.pi / 2, 0, 0)
  186. hit.CFrame = mouse.Hit
  187. end
  188. end
Add Comment
Please, Sign In to add comment