Advertisement
HenloMyDude

tron bike

Aug 23rd, 2019
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1.  
  2.  
  3. plr = owner
  4. char = plr.Character
  5.  
  6. char.Animate.idle.Animation1.AnimationId = "rbxassetid://180270832"
  7. char.Animate.idle.Animation2.AnimationId = "rbxassetid://180270832"
  8. char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://180270832"
  9. char.Animate.jump.JumpAnim.AnimationId = "rbxassetid://180270832"
  10. char.Animate.fall.FallAnim.AnimationId = "rbxassetid://180270832"
  11.  
  12. bike = Instance.new("Part",char)
  13. bike.CanCollide = false
  14. weld = Instance.new("Weld",bike)
  15. weld.Part0 = bike
  16. weld.Part1 = char.HumanoidRootPart
  17. mesh = Instance.new("SpecialMesh",bike)
  18. mesh.MeshId = "rbxassetid://130087381"
  19. mesh.TextureId = "rbxassetid://130087211"
  20. mesh.Scale = Vector3.new(2.5, 2.5, 2.5)
  21. mesh.Offset = Vector3.new(0, -1, -1.5)
  22.  
  23. torso = Instance.new("Weld",char.Torso)
  24. torso.Part0 = char.Torso
  25. torso.Part1 = char.HumanoidRootPart
  26. torso.C0 = CFrame.new(0, -0.6, 0) * CFrame.Angles(-25, 0, 0)
  27.  
  28. sine = 0
  29. anim = "Idle"
  30. trailer = false
  31. smashthem = false
  32.  
  33. char.Torso.Touched:connect(function(hit)
  34. if smashthem == true then
  35. if hit.Parent ~= char then
  36. if hit.Parent:IsA("Model") then
  37. for _,v in pairs (hit.Parent:children()) do
  38. if v:IsA("Humanoid") then
  39. v.MaxHealth = 0
  40. v.Health = 0
  41. local fx = Instance.new("Part",bike)
  42. fx.CFrame = char.Torso.CFrame
  43. fx.Size = Vector3.new(1, 1, 1)
  44. fx.CanCollide = false
  45. fx.Anchored = true
  46. fx.Transparency = 0.5
  47. fx.BrickColor = BrickColor.new("Bright blue")
  48. fx.Material = "Neon"
  49. fx.Shape = "Ball"
  50. if hit.Parent:FindFirstChild("Torso") then
  51. fx.Position = hit.Parent:FindFirstChild("Torso").Position
  52. end
  53. for i = 1,15 do
  54. wait()
  55. fx.Size = fx.Size + Vector3.new(1, 1, 1)
  56. fx.Transparency = fx.Transparency + 0.01
  57. end
  58. for i = 1,15 do
  59. wait()
  60. fx.Size = fx.Size + Vector3.new(1, 1, 1)
  61. fx.Transparency = fx.Transparency + 0.01
  62. end
  63. for i = 1,25 do
  64. wait()
  65. fx.Size = fx.Size + Vector3.new(1, 1, 1)
  66. fx.Transparency = fx.Transparency + 0.01
  67. end
  68. fx:Destroy()
  69. end
  70. end
  71. end
  72. end
  73. end
  74. end)
  75.  
  76. cycle = Instance.new("Sound",bike)
  77. cycle.Volume = 2
  78. cycle.SoundId = "rbxassetid://130091914"
  79. cycle.Pitch = 1
  80. cycle.Looped = true
  81. cycle:Play()
  82.  
  83. while true do
  84. wait(.1)
  85. sine = sine + 1
  86. local torvel = (char.HumanoidRootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  87. if char.HumanoidRootPart.Velocity.magnitude < 1000000 then
  88. anim = "Walk"
  89. end
  90. if torvel < 1 then
  91. anim = "Idle"
  92. end
  93.  
  94. if anim == "Idle" then
  95. trailer = false
  96. smashthem = false
  97. char.Humanoid.WalkSpeed = 10
  98. if cycle.Pitch > 1 then
  99. cycle.Pitch = cycle.Pitch - 0.1
  100. end
  101. if cycle.Pitch < 1 then
  102. cycle.Pitch = 1
  103. end
  104. elseif anim == "Walk" then
  105. trailer = true
  106. smashthem = false
  107. char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 1
  108. if trailer == true then
  109. local trail = Instance.new("Part",char.Humanoid)
  110. trail.BrickColor = BrickColor.new("Bright blue")
  111. trail.CanCollide = false
  112. trail.Anchored = true
  113. trail.Material = "Neon"
  114. trail.Size = Vector3.new(0.5, 2.5, 7)
  115. trail.Transparency = 0.5
  116. trail.Position = bike.Position
  117. trail.Name = "Trail"
  118. trail.Orientation = bike.Orientation
  119. if char.Humanoid.WalkSpeed > 25 then
  120. smashthem = true
  121. trail.Size = Vector3.new(0.5, 2.5, 7)
  122. end
  123. if char.Humanoid.WalkSpeed > 75 then
  124. trail.Size = Vector3.new(0.5, 2.5, 15)
  125. end
  126. coroutine.resume(coroutine.create(function()
  127. wait(2)
  128. trail:Destroy()
  129. end))
  130. cycle.Pitch = cycle.Pitch + 0.01
  131. end
  132. end
  133. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement