Advertisement
notsalty999

lumber tycoon 2 not very good

Apr 1st, 2023
533
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.41 KB | Source Code | 2 1
  1. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  2. local Window = Library.CreateLib("lt2end", "Synapse")
  3.  
  4. local Main = Window:NewTab("Main")
  5. local MainSection = Main:NewSection("Main")
  6.  
  7.  MainSection:NewButton("FREECAM", "FREECAM", function()
  8.     -- Basic Freecam Script
  9.     -- You can move faster by holding the click button [setting below ! :) ]
  10. local allowspeedmove = true
  11. wait(1)
  12.  
  13. local c = workspace.CurrentCamera
  14. local player = game.Players.LocalPlayer
  15. local userInput = game:GetService("UserInputService")
  16. local rs = game:GetService("RunService")
  17. local starterPlayer = game:GetService("StarterPlayer")
  18. --local util = LoadLibrary("RbxUtility")
  19. --local camSync = util.CreateSignal()
  20.  
  21. local selected = false
  22. local speed = 60
  23. local lastUpdate = 0
  24.  
  25. local camera = Instance.new('Part', workspace)
  26. camera.CanCollide = false
  27. camera.Anchored = true
  28. camera.Transparency = 1
  29. camera.Name = 'FreeCam'
  30. camera.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0,5,0)
  31. --rs:BindToRenderStep("CamSync",190,function ()
  32. --  camSync:fire()
  33. --end)
  34.  
  35. c.Changed:connect(function (property)
  36.     if property == "CoordinateFrame" then
  37. --      camSync:fire()
  38.     end
  39. end)
  40.  
  41. function getNextMovement(deltaTime)
  42.     local nextMove = Vector3.new()
  43.     -- Left/Right
  44.     if userInput:IsKeyDown("A") or userInput:IsKeyDown("Left") then
  45.         nextMove = nextMove + Vector3.new(-1,0,0)
  46.     end
  47.     if userInput:IsKeyDown("D") or userInput:IsKeyDown("Right") then
  48.         nextMove = nextMove + Vector3.new(1,0,0)
  49.     end
  50.     -- Forward/Back
  51.     if userInput:IsKeyDown("W") or userInput:IsKeyDown("Up") then
  52.         nextMove = nextMove + Vector3.new(0,0,-1)
  53.     end
  54.     if userInput:IsKeyDown("S") or userInput:IsKeyDown("Down") then
  55.         nextMove = nextMove + Vector3.new(0,0,1)
  56.     end
  57.     -- Up/Down
  58.     if userInput:IsKeyDown("Space") or userInput:IsKeyDown("Q") then
  59.         nextMove = nextMove + Vector3.new(0,1,0)
  60.     end
  61.     if userInput:IsKeyDown("LeftControl") or userInput:IsKeyDown("E") then
  62.         nextMove = nextMove + Vector3.new(0,-1,0)
  63.     end
  64.     return CFrame.new( nextMove * (speed * deltaTime) )
  65. end
  66.  
  67. function onSelected()
  68.     local char = player.Character
  69.     if char then
  70.         local root = camera
  71.         currentPos = root.Position
  72.         selected = true
  73.         lastUpdate = tick()
  74.         c.CameraSubject = root
  75.         player.Character.HumanoidRootPart.Anchored = true
  76.         while selected do
  77.             local delta = tick()-lastUpdate
  78.             local look = (c.Focus.p-c.CoordinateFrame.p).unit
  79.             local move = getNextMovement(delta)
  80.             local pos = root.Position
  81.             root.CFrame = CFrame.new(pos,pos+look) * move
  82.             lastUpdate = tick()
  83.             wait(0.01)
  84.         --  camSync:wait()
  85.         end
  86.         player.Character.HumanoidRootPart.Anchored = false
  87.         c.CameraSubject = player.Character.Humanoid
  88.         root.Velocity = Vector3.new()
  89.     end
  90. end
  91.  
  92. function onDeselected()
  93.     selected = false
  94. end
  95.  
  96. local isOn = true
  97. spawn(onSelected)
  98.  
  99. function onKeyPressed(_,state)
  100.     if state == Enum.UserInputState.Begin then
  101.         isOn = not isOn
  102.         if isOn then
  103.             onSelected()
  104.         else
  105.             onDeselected()
  106.         end
  107.     end
  108. end
  109.  
  110. local mouse = player:GetMouse()
  111. mouse.Button1Down:Connect(function()
  112.     if allowspeedmove then speed = 120 end
  113. end)
  114. mouse.Button1Up:Connect(function()
  115.     speed = 60
  116. end)
  117.  
  118. function ResetCamera()
  119.     camera.Position = player.Character.HumanoidRootPart.Position + Vector3.new(0,5,0)
  120. end
  121.  
  122. game:GetService("ContextActionService"):BindAction("Noclip Toggle",onKeyPressed,false,"r")
  123. game:GetService("ContextActionService"):BindAction("Reset Camera Position",ResetCamera,false,"z")
  124. end)
  125.  
  126. MainSection:NewButton("get wood", "wood", function()
  127.         loadstring(game:HttpGet("https://raw.githubusercontent.com/NOOBARMYSCRIPTER/NOOBARMYSCRIPTER/main/AXE%20LOOP%20SCRIPT", true))();
  128.     end)
  129.  
  130. MainSection:NewButton("serverhop", "tp low ppl server", function()
  131.         local PlaceID = game.PlaceId
  132. local AllIDs = {}
  133. local foundAnything = ""
  134. local actualHour = os.date("!*t").hour
  135. local Deleted = false
  136. local File = pcall(function()
  137.     AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  138. end)
  139. if not File then
  140.     table.insert(AllIDs, actualHour)
  141.     writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  142. end
  143. function TPReturner()
  144.     local Site;
  145.     if foundAnything == "" then
  146.         Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  147.     else
  148.         Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  149.     end
  150.     local ID = ""
  151.     if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  152.         foundAnything = Site.nextPageCursor
  153.     end
  154.     local num = 0;
  155.     for i,v in pairs(Site.data) do
  156.         local Possible = true
  157.         ID = tostring(v.id)
  158.         if tonumber(v.maxPlayers) > tonumber(v.playing) then
  159.             for _,Existing in pairs(AllIDs) do
  160.                 if num ~= 0 then
  161.                     if ID == tostring(Existing) then
  162.                         Possible = false
  163.                     end
  164.                 else
  165.                     if tonumber(actualHour) ~= tonumber(Existing) then
  166.                         local delFile = pcall(function()
  167.                             delfile("NotSameServers.json")
  168.                             AllIDs = {}
  169.                             table.insert(AllIDs, actualHour)
  170.                         end)
  171.                     end
  172.                 end
  173.                 num = num + 1
  174.             end
  175.             if Possible == true then
  176.                 table.insert(AllIDs, ID)
  177.                 wait()
  178.                 pcall(function()
  179.                     writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  180.                     wait()
  181.                     game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  182.                 end)
  183.                 wait(4)
  184.             end
  185.         end
  186.     end
  187. end
  188.  
  189. function Teleport()
  190.     while wait() do
  191.         pcall(function()
  192.             TPReturner()
  193.             if foundAnything ~= "" then
  194.                 TPReturner()
  195.             end
  196.         end)
  197.     end
  198. end
  199.  
  200. -- If you'd like to use a script before server hopping (Like a Automatic Chest collector you can put the Teleport() after it collected everything.
  201. Teleport()
  202.     end)   
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement