Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local client = NLS ([=[
- local remotes = script:WaitForChild ('Remotes');
- remotes.Function:InvokeServer();
- local mouse = owner:GetMouse();
- local parts = remotes.Function:InvokeServer(1, 30);
- mouse.Button1Down:Connect (function ()
- local p = table.remove (parts, 1);
- if (p and mouse.Hit) then
- p.BodyPosition.position = mouse.Hit.p;
- remotes.Function:InvokeServer (2, p);
- end;
- end);
- while true do
- local _, t = wait(); t = t * 30;
- local root = CFrame.new (owner.Character.HumanoidRootPart.Position);
- local n = (360 / #parts);
- for i = 1, #parts do
- parts [i].BodyPosition.position = (root * CFrame.Angles (0, math.rad (n * i + t), 0) * CFrame.new (0, 0, -(#parts))).p
- end;
- end;
- ]=], owner.Character);
- local remotes = Instance.new ('Folder');
- remotes.Name = 'Remotes';
- local remoteEvent = Instance.new ('RemoteEvent', remotes);
- remoteEvent.Name = 'Event';
- local remoteFunction = Instance.new ('RemoteFunction', remotes);
- remoteFunction.Name = 'Function';
- remoteFunction.OnServerInvoke = function (player, request, ...)
- if (player ~= owner) then
- return;
- end;
- if (request == 1) then
- local res = { };
- for i = 1, (... or 1) do
- local p = Instance.new ('Part', player.Character);
- p.CFrame = CFrame.new (0, 5, 0);
- p.Shape = 'Ball';
- p.TopSurface = 'Smooth';
- p.BottomSurface = 'Smooth';
- p.CanCollide = false;
- p.CFrame = player.Character.HumanoidRootPart.CFrame * CFrame.new (0, 5, 0);
- p:SetNetworkOwner (player);
- local pos = Instance.new ('BodyPosition', p);
- pos.maxForce = Vector3.new (10000, 10000, 10000);
- res [i] = p;
- end;
- return ... and res or unpack (res);
- elseif (request == 2 and ...) then
- local t = ...;
- delay (60, function()
- t:Destroy();
- end);
- end;
- end;
- remotes.Parent = client;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement