Advertisement
Chxp

Untitled

Aug 10th, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. Player = game.Players.Chxp
  2. function onchatted(msg)
  3. if msg == "-orb" then
  4.  
  5. P = Instance.new("Part", Workspace)
  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.Parent = Object.Parent
  24. objC.Anchored = true
  25. objC.Shape = "Block"
  26. --objC.BrickColor = BrickColor.new("Really blue")
  27. objC.TopSurface,objC.BottomSurface=0,0
  28. local distance = (lastPos- Object.CFrame.p).magnitude
  29. objC.Size = Vector3.new(0.8,0.8,distance)
  30. objC.CFrame = CFrame.new(lastPos,Object.Position)*CFrame.new(0,0,-distance/2)
  31. coroutine.wrap(function()
  32. for i = 0,0.8,0.1 do
  33. wait()
  34. objC.Transparency = i
  35. pcall(function()
  36. objC.Size = objC.Size - Vector3.new(0.1,0.1,0)
  37. end)
  38. end
  39. objC:Destroy()
  40. end)()
  41. lastPos = Object.CFrame.p
  42. end
  43. end)()
  44. end
  45. StartTrail(Torso)
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. RP = Instance.new("RocketPropulsion", P)
  53. RP.MaxThrust = 1000000
  54. RP.MaxSpeed = 20
  55. RP.Target = Player.Character.Head
  56. RP:Fire()
  57. end
  58. end
  59. Player.Chatted:connect(onchatted)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement