Advertisement
V3rmLua33

Launcher

Mar 10th, 2015
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.65 KB | None | 0 0
  1. local Player=game.Players.LocalPlayer
  2. local Char=Player.Character
  3. local Mouse=Player:GetMouse()
  4.  
  5.  
  6.  
  7. local Explode=function(Obj)
  8. local Exp=Instance.new("Explosion",Workspace)
  9. Exp.Position=Obj.Position
  10. end
  11.  
  12.  
  13.  
  14.  
  15. local Surround=function(Pos,Cha)
  16.  
  17. local Mod=Instance.new("Model",Cha or Char)
  18. Mod.Name='Surrounder'
  19.  
  20. for i=1,360,(360/100) do
  21. local part=Instance.new("Part",Mod)
  22. part.Size=Vector3.new(2,2,2)
  23. part.BrickColor=BrickColor.Random()
  24. part.Shape='Ball'
  25. part.TopSurface='Smooth'
  26. part.BottomSurface='Smooth'
  27. part.Anchored=true
  28. part.CFrame = CFrame.new(Pos)*CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-4)
  29. part.Name = i
  30. end
  31.  
  32. game.Debris:AddItem(Mod,5)
  33.  
  34. local nw=coroutine.wrap(function()
  35.  
  36. while wait(0) and Mod and Mod.Parent~=nil do
  37. for i=1,360,(360/100) do
  38.   local diff=1
  39.   for _=1,360,(360/100) do
  40.     if Mod then
  41. local N=Mod:findFirstChild(tostring(_))
  42.   diff=diff+(360/100)
  43. if Cha then Pos=Cha.Position end
  44. if N then
  45. N.CFrame = CFrame.new(Pos)*CFrame.Angles(0,math.rad(i+diff),0)*CFrame.new(0,0,-4)
  46. end
  47. end
  48. end
  49.  
  50. wait(0)
  51. end
  52.  
  53. end
  54.  
  55. end)
  56.  
  57.  
  58. nw()
  59. wait(4.5)
  60. if Cha then Cha:BreakJoints() end
  61.  
  62. for i,v in pairs(Mod:children()) do
  63. Explode(v)
  64. end
  65. end
  66.  
  67.  
  68. Mouse.Button1Down:connect(function()
  69. local pos=Mouse.Hit.p
  70. local t=Mouse.Target
  71. if not t.Parent:findFirstChild'Humanoid' then t=nil end
  72. local raypart=Instance.new("Part",Char)
  73. raypart.Size=Vector3.new(1,1,4)
  74. raypart.Anchored=true
  75. raypart.CFrame=CFrame.new(Char.Torso.Position,pos)
  76. for i=4,((pos-Char.Torso.Position).magnitude)-3, 4 do
  77. wait(0)
  78. r=raypart:clone()
  79. r.CFrame=raypart.CFrame*CFrame.new(0,0,-4)
  80. raypart=r
  81. raypart.Parent=Char
  82. end
  83. Surround(pos,t)
  84. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement