Pastebloxian

Lumber Tycoon Auto mod

Mar 2nd, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. SawmillC = false
  2. Mouse = game.Players.LocalPlayer:GetMouse()
  3. _G.MAIN=Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
  4. Instruction = Instance.new("TextLabel",_G.MAIN)
  5. Instruction.Position = UDim2.new(0,200,0,400)
  6. Instruction.Size = UDim2.new(0,100,0,50)
  7. Instruction.TextWrapped = true
  8. Instruction.TextScaled = true
  9. Instruction.Text = "'Q' to select a tree, Press P to select a sawmill, press Z to activate!"
  10. Instruction.Active = true
  11. Instruction.Draggable = true
  12. Instruction.ZIndex = 2
  13. Exit = Instance.new("TextButton",Instruction)
  14. Exit.Position=UDim2.new(1,0,0,0)
  15. Exit.Size = UDim2.new(0,30,0,30)
  16. Exit.Text = "Exit"
  17. Exit.MouseButton1Click:connect(function()
  18. _G.MAIN:Destroy()
  19. end)
  20.  
  21. Mouse.KeyDown:connect(function(key)
  22. if key:lower() == "q" then
  23. Treee = Mouse.Target
  24. elseif key:lower() == "p" then
  25. if Mouse.Target.Parent:FindFirstChild("BlockageAlert") then
  26. Sawmill = Mouse.Target.Parent
  27. else
  28. Sawmill=Mouse.Target.Parent.Parent
  29. end
  30. if Sawmill:FindFirstChild("BlockageAlert") and Sawmill:FindFirstChild("Owner") then
  31. SawmillC = true
  32. else
  33. SawmillC = false
  34. print"Something went wrong while setting the sawmill!"
  35. end
  36. elseif key:lower() == "z" then
  37. if Treee ~= nil then
  38. Mod(Treee)
  39. else
  40. print("Select tree with 'Q'!")
  41. end
  42. end
  43. end)
  44.  
  45. function Mod(SelectedPart)
  46. if SawmillC ~= true then
  47. print'Set the sawmill with "P"!'
  48. return
  49. end
  50. if SelectedPart.Parent:FindFirstChild("TreeClass") and SelectedPart.Parent:FindFirstChild("Owner") then
  51. print("Tree: "..SelectedPart.Parent.TreeClass.Value)
  52. Tree = SelectedPart.Parent
  53. Tree.PrimaryPart = SelectedPart
  54. game.ReplicatedStorage.Interaction.Verify:FireServer('Item owned by player',Tree)
  55. Tree:SetPrimaryPartCFrame(Sawmill.Particles.CFrame)
  56. game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(Tree)
  57. end
  58. end
Add Comment
Please, Sign In to add comment