Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NLS([[
- local plr = game:GetService("Players").LocalPlayer
- local remote = plr.Character:WaitForChild("Tabby_Cxt")
- local mouse = plr:GetMouse()
- mouse.KeyDown:connect(function(key)
- key = key:lower()
- if key == "z" then
- remote:FireServer("Place", mouse.hit.p)
- elseif key == "x" then
- remote:FireServer("Grab", mouse.Target)
- end
- end)
- ]],owner.Character)
- local remote = Instance.new("RemoteEvent", owner.Character)
- remote.Name = "Tabby_Cxt"
- AmountOfParts=0
- --[[for i=0,5 do
- MagicPart=Instance.new("Part",owner.Character.Humanoid)
- MagicPart.CanCollide=false
- MagicPart.Anchored=true
- MagicPart.Size=Vector3.new(1,1,1)
- MagicPart.Name=i
- AmountOfParts=AmountOfParts+1
- end
- --]]
- Mode="None"
- sine=0
- remote.OnServerEvent:connect(function(owner, Modet, Mousehit)
- if Modet then
- Mode=Modet
- Mousehitt=Mousehit
- if Mode=="Grab" then
- if Mousehitt then
- if Mousehitt:IsA("Part") and Mousehitt.Name~="Base" then
- PartToEdit=Mousehitt
- for i=1,25 do
- game:service("RunService").Stepped:wait()
- PartToEdit.Size=Vector3.new(PartToEdit.Size.x/i+1,PartToEdit.Size.y/i+1,PartToEdit.Size.z/i+1)
- end
- PartToEdit:Destroy()
- AmountOfParts=AmountOfParts+1
- MagicPart=Instance.new("Part",owner.Character.Humanoid)
- MagicPart.Position=PartToEdit.Position
- MagicPart.CanCollide=false
- MagicPart.Anchored=true
- MagicPart.Size=Vector3.new(1,1,1)
- MagicPart.Name=AmountOfParts
- end
- end
- Mode="None"
- elseif Mode=="Place" then
- nextBlock=0
- for i,v in pairs(owner.Character.Humanoid:GetChildren()) do
- if v:IsA("Part") then
- nextBlock=nextBlock+1
- if nextBlock==AmountOfParts-1 then
- AmountOfParts=AmountOfParts-1
- for i=1,25 do
- nextBlock=0
- wait()
- DestinationForBlock=(Mousehit)
- NewPositionForBlock=v.Position:Lerp(DestinationForBlock,0.15)
- v.Position=NewPositionForBlock
- v.Orientation=Vector3.new(0,0,0)
- end
- MagicPart=Instance.new("Part",workspace)
- MagicPart.Position=DestinationForBlock
- MagicPart.CanCollide=true
- MagicPart.Anchored=true
- MagicPart.Size=Vector3.new(1,1,1)
- MagicPart.Name="FakePart"
- v:Destroy()
- end
- end
- end
- Mode="None"
- end
- end
- end)
- while true do
- game:service("RunService").Stepped:wait(0)
- sine=sine+1/100
- if Mode=="None" or Mode=="Grab" then
- for i,v in pairs(owner.Character.Humanoid:GetChildren()) do
- if v:IsA("Part") then
- Destination=(owner.Character.Torso.Position+Vector3.new(math.cos(sine-tonumber(v.Name))*5*AmountOfParts/10,0,math.sin(sine-tonumber(v.Name))*5*AmountOfParts/10))
- NewPosition=v.Position:Lerp(Destination,0.15)
- v.Position=NewPosition
- v.Orientation=Vector3.new(0,0,0)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement