Advertisement
cat568

Untitled

Jul 15th, 2020
1,287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.17 KB | None | 0 0
  1. NLS([[
  2.  
  3. local plr = game:GetService("Players").LocalPlayer
  4. local remote = plr.Character:WaitForChild("Tabby_Cxt")
  5. local mouse = plr:GetMouse()
  6.  
  7. mouse.KeyDown:connect(function(key)
  8.     key = key:lower()
  9.     if key == "z" then
  10.         remote:FireServer("Place", mouse.hit.p)
  11.     elseif key == "x" then
  12.         remote:FireServer("Grab", mouse.Target)
  13. end
  14. end)
  15.  
  16. ]],owner.Character)
  17. local remote = Instance.new("RemoteEvent", owner.Character)
  18. remote.Name = "Tabby_Cxt"
  19. AmountOfParts=0
  20. --[[for i=0,5 do
  21. MagicPart=Instance.new("Part",owner.Character.Humanoid)
  22. MagicPart.CanCollide=false
  23. MagicPart.Anchored=true
  24. MagicPart.Size=Vector3.new(1,1,1)
  25. MagicPart.Name=i
  26. AmountOfParts=AmountOfParts+1
  27. end
  28. --]]
  29. Mode="None"
  30. sine=0
  31.  
  32.  
  33.  
  34.  
  35.  
  36. remote.OnServerEvent:connect(function(owner, Modet, Mousehit)
  37.     if Modet then
  38.         Mode=Modet
  39.         Mousehitt=Mousehit
  40.        
  41.         if Mode=="Grab" then
  42.            
  43.         if Mousehitt then
  44.             if Mousehitt:IsA("Part") and Mousehitt.Name~="Base" then
  45.                 PartToEdit=Mousehitt
  46.                 for i=1,25 do
  47.                     game:service("RunService").Stepped:wait()
  48.                     PartToEdit.Size=Vector3.new(PartToEdit.Size.x/i+1,PartToEdit.Size.y/i+1,PartToEdit.Size.z/i+1)
  49.                 end
  50.                 PartToEdit:Destroy()
  51.                 AmountOfParts=AmountOfParts+1
  52.                 MagicPart=Instance.new("Part",owner.Character.Humanoid)
  53.                 MagicPart.Position=PartToEdit.Position
  54.                 MagicPart.CanCollide=false
  55.                 MagicPart.Anchored=true
  56.                 MagicPart.Size=Vector3.new(1,1,1)
  57.                 MagicPart.Name=AmountOfParts
  58.                 end
  59.  
  60.  
  61.         end
  62.     Mode="None"
  63.    
  64. elseif Mode=="Place" then
  65. nextBlock=0
  66.     for i,v in pairs(owner.Character.Humanoid:GetChildren()) do
  67.  
  68.  
  69.         if v:IsA("Part") then
  70.             nextBlock=nextBlock+1
  71.             if nextBlock==AmountOfParts-1 then
  72.                 AmountOfParts=AmountOfParts-1
  73. for i=1,25 do
  74.     nextBlock=0
  75.              wait()
  76.                 DestinationForBlock=(Mousehit)
  77.                 NewPositionForBlock=v.Position:Lerp(DestinationForBlock,0.15)
  78.                 v.Position=NewPositionForBlock
  79.                 v.Orientation=Vector3.new(0,0,0)
  80. end
  81.             MagicPart=Instance.new("Part",workspace)
  82.             MagicPart.Position=DestinationForBlock
  83.             MagicPart.CanCollide=true
  84.             MagicPart.Anchored=true
  85.             MagicPart.Size=Vector3.new(1,1,1)
  86.             MagicPart.Name="FakePart"
  87.             v:Destroy()
  88.             end
  89.         end
  90.     end
  91.     Mode="None"
  92. end
  93. end
  94. end)
  95. while true do
  96.    
  97.     game:service("RunService").Stepped:wait(0)
  98.     sine=sine+1/100
  99.     if Mode=="None" or Mode=="Grab" then
  100.     for i,v in pairs(owner.Character.Humanoid:GetChildren()) do
  101.         if v:IsA("Part") then
  102.             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))
  103.             NewPosition=v.Position:Lerp(Destination,0.15)
  104.             v.Position=NewPosition
  105.             v.Orientation=Vector3.new(0,0,0)
  106.         end
  107. end
  108. end
  109. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement