SHARE
TWEET

Untitled

East_Arctica May 21st, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Character = game.Players.LocalPlayer.Character
  2. local Mouse = game.Players.LocalPlayer:GetMouse()
  3. local Land = nil
  4.  
  5. for i,v in pairs(game.Workspace.Properties:GetChildren()) do
  6. if v.Owner.Value == game.Players.LocalPlayer or v.Owner.Value == nil then
  7. game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v)
  8. break
  9. end
  10. end
  11.  
  12. for i,v in pairs(game.Workspace.Properties:GetChildren()) do
  13. if v.Owner.Value == game.Players.LocalPlayer then
  14. Land = v
  15. break
  16. end
  17. end
  18.  
  19. function Clone(Item)
  20. local Info = {}
  21. Info.Name = "Wire"
  22. Info.Type = Item
  23. Info.OtherInfo = game.ReplicatedStorage.Purchasables.WireObjects.Wire.OtherInfo
  24.  
  25. local Points = {Land.OriginSquare.Position - Vector3.new(0,100,0), Land.OriginSquare.Position - Vector3.new(0,100,0)}
  26. game.ReplicatedStorage.PlaceStructure.ClientPlacedWire:FireServer(Info, Points)
  27. end
  28.  
  29. local Tool = Instance.new("Tool")
  30. Tool.Name = "Clone"
  31. Tool.RequiresHandle = false
  32. Tool.Parent = game.Players.LocalPlayer.Backpack
  33.  
  34. Tool.Activated:Connect(function()
  35. if Mouse.Target and Land then
  36. local Target = Mouse.Target
  37.  
  38. if Target.Parent:IsA("Model") and Target.Parent:FindFirstChild("Main") then
  39. Target = Target.Parent
  40. elseif Target.Parent.Parent:IsA("Model") and Target.Parent.Parent:FindFirstChild("Main") then
  41. Target = Target.Parent.Parent
  42. elseif Target.Parent:IsA("Model") and Target.Parent:FindFirstChild("CutEvent") then
  43. Target = Target.Parent
  44. end
  45.  
  46. Clone(Target)
  47. else
  48. for i,v in pairs(game.Workspace.Properties:GetChildren()) do
  49. if v.Owner.Value == game.Players.LocalPlayer or v.Owner.Value == nil then
  50. game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(v)
  51. break
  52. end
  53. end
  54.  
  55. for i,v in pairs(game.Workspace.Properties:GetChildren()) do
  56. if v.Owner.Value == game.Players.LocalPlayer then
  57. Land = v
  58. break
  59. end
  60. end
  61. end
  62. end)
  63. local Imput = game:GetService("UserInputService")
  64. local Plr = game.Players.LocalPlayer
  65. local Mouse = Plr:GetMouse()
  66.  
  67. function To(position)
  68.     local Chr = Plr.Character
  69.     if Chr ~= nil then
  70.         Chr:MoveTo(position)
  71.     end
  72. end
  73.  
  74. Imput.InputBegan:Connect(function(input)
  75.     if input.UserInputType == Enum.UserInputType.MouseButton1 and Imput:IsKeyDown(Enum.KeyCode.LeftControl) then
  76.         To(Mouse.Hit.p)
  77.     end
  78. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top