George148

superman

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