Advertisement
Chxp

Untitled

Aug 8th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. Player = game.Players.Chxp
  2. function onchatted(msg)
  3. if msg == "-orb" then
  4.  
  5. P = Instance.new("Part", Player.Character)
  6. P.Shape = "Ball"
  7. P.CanCollide = false
  8. P.Size = Vector3.new(1.4,1.4,1.4)
  9.  
  10.  
  11. Character = Player.Character
  12. Torso = P--Character['Torso']
  13.  
  14. function StartTrail(Object)
  15. local lastPos = Object.CFrame.p
  16. coroutine.wrap(function()
  17. while Object ~= nil do
  18. wait(0.01)
  19. local objC = Instance.new('Part', Object)
  20. objC.CanCollide = false
  21. objC.Locked = true
  22. objC.FormFactor = 'Custom'
  23. objC.BrickColor = BrickColor.new("Black")
  24. objC.Parent = Object.Parent
  25. objC.Anchored = true
  26. objC.Shape = "Block"
  27. --objC.BrickColor = BrickColor.new("Really blue")
  28. objC.TopSurface,objC.BottomSurface=0,0
  29. local distance = (lastPos- Object.CFrame.p).magnitude
  30. objC.Size = Vector3.new(0.8,0.8,distance)
  31. objC.CFrame = CFrame.new(lastPos,Object.Position)*CFrame.new(0,0,-distance/2)
  32. coroutine.wrap(function()
  33. for i = 0,0.8,0.1 do
  34. wait()
  35. objC.Transparency = i
  36. pcall(function()
  37. objC.Size = objC.Size - Vector3.new(0.1,0.1,0)
  38. end)
  39. end
  40. objC:Destroy()
  41. end)()
  42. lastPos = Object.CFrame.p
  43. end
  44. end)()
  45. end
  46. StartTrail(Torso)
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. RP = Instance.new("RocketPropulsion", P)
  54. RP.MaxThrust = 1000000
  55. RP.MaxSpeed = 5
  56. RP.Target = Player.Character.Head
  57. RP:Fire()
  58. end
  59. end
  60. Player.Chatted:connect(onchatted)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement