Advertisement
nguyenjimbo

Untitled

Jul 15th, 2015
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. p=game.Players.LocalPlayer
  2. t=p.Character.Torso
  3. m=p:GetMouse()
  4. m.Button1Down:connect(function()
  5. pcall(function()
  6. if m.Target.Name == 'Base' then return end
  7. local part=m.Target
  8. part.Anchored = true
  9. local sl=Instance.new('SelectionPartLasso',t)
  10. sl.Humanoid=p.Character.Humanoid
  11. sl.Part=part
  12. sl.Color=BrickColor.Random()
  13. local int=math.random(0,360)
  14. local s=0
  15. local u=10
  16. local dir=true
  17. game:service'RunService'.Stepped:connect(function()
  18. part.CFrame=t.CFrame*CFrame.Angles(0,math.rad(int+s),0)*CFrame.new(0,0,-u)
  19. s=s+1
  20. if dir==true then
  21. u=u+.5
  22. elseif dir==false then
  23. u=u-.5
  24. end
  25. if u==12 or u==8 then
  26. dir=not dir
  27. end
  28. if s==360 then s=0 end
  29. end)
  30. end)
  31. end)
  32. m.KeyDown:connect(function(k)
  33. if k=='e' then
  34. for i,v in pairs(t:children()) do
  35. if v:IsA'SelectionPartLasso' then
  36. coroutine.resume(coroutine.create(function()
  37. v.Part:Destroy()
  38. v:Destroy()
  39. end))
  40. end
  41. end
  42. end
  43. end)
  44. print'Grab tool'
  45. print'Press "e" to clear selection'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement