Advertisement
VoidSB_Admin

Hobos

Sep 18th, 2018
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. local client = NLS ([=[
  2. local remotes = script:WaitForChild ('Remotes');
  3. remotes.Function:InvokeServer();
  4.  
  5. local mouse = owner:GetMouse();
  6. local parts = remotes.Function:InvokeServer(1, 30);
  7.  
  8. mouse.Button1Down:Connect (function ()
  9. local p = table.remove (parts, 1);
  10.  
  11. if (p and mouse.Hit) then
  12. p.BodyPosition.position = mouse.Hit.p;
  13.  
  14. remotes.Function:InvokeServer (2, p);
  15. end;
  16. end);
  17.  
  18. while true do
  19. local _, t = wait(); t = t * 30;
  20. local root = CFrame.new (owner.Character.HumanoidRootPart.Position);
  21. local n = (360 / #parts);
  22.  
  23. for i = 1, #parts do
  24. parts [i].BodyPosition.position = (root * CFrame.Angles (0, math.rad (n * i + t), 0) * CFrame.new (0, 0, -(#parts))).p
  25. end;
  26. end;
  27. ]=], owner.Character);
  28.  
  29. local remotes = Instance.new ('Folder');
  30. remotes.Name = 'Remotes';
  31. local remoteEvent = Instance.new ('RemoteEvent', remotes);
  32. remoteEvent.Name = 'Event';
  33. local remoteFunction = Instance.new ('RemoteFunction', remotes);
  34. remoteFunction.Name = 'Function';
  35. remoteFunction.OnServerInvoke = function (player, request, ...)
  36. if (player ~= owner) then
  37. return;
  38. end;
  39.  
  40. if (request == 1) then
  41. local res = { };
  42.  
  43. for i = 1, (... or 1) do
  44. local p = Instance.new ('Part', player.Character);
  45. p.CFrame = CFrame.new (0, 5, 0);
  46. p.Shape = 'Ball';
  47. p.TopSurface = 'Smooth';
  48. p.BottomSurface = 'Smooth';
  49. p.CanCollide = false;
  50. p.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new (0, 5, 0);
  51. p:SetNetworkOwner (player);
  52.  
  53. local pos = Instance.new ('BodyPosition', p);
  54. pos.maxForce = Vector3.new (10000, 10000, 10000);
  55.  
  56. res [i] = p;
  57. end;
  58.  
  59. return ... and res or unpack (res);
  60. elseif (request == 2 and ...) then
  61. local t = ...;
  62. delay (60, function()
  63. t:Destroy();
  64. end);
  65. end;
  66. end;
  67.  
  68. remotes.Parent = client;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement