TEXT 527
Ore Smelting Tycoon Script By venuslock on 26th November 2022 10:15:18 PM
  1. --Start Args
  2. print("Instantce Ran")
  3.  
  4. --Variables
  5. getgenv().AutoSmelt = false
  6. getgenv().AutoCollect = false
  7. getgenv().IntervalTime = 5
  8.  
  9. --Functions
  10. function GetTycoon()
  11.     local PlayerName = game.Players.LocalPlayer.Name
  12.     local tycoons = game.Workspace.Tycoons:GetDescendants()
  13.         for index, value in ipairs(tycoons) do
  14.             if value.Name == "Owner" then
  15.                 if tostring(value.Value) == tostring(PlayerName) then
  16.                     if tostring(value.Parent.ClassName) == "Model" then
  17.                    local TycoonName = value.Parent.Name
  18.                    return game:GetService("Workspace"):WaitForChild("Tycoons"):FindFirstChild(TycoonName)
  19.                end
  20.                 end
  21.             end
  22.     end
  23. end
  24.  
  25. function FireServer(arg)
  26.     game:GetService("Players").LocalPlayer.Backpack:FindFirstChild("Pick Ores").Collect:FireServer(arg)
  27. end
  28.  
  29. function CollectOres()
  30.     local Tycoon = GetTycoon()
  31.     local Drops = Tycoon.Drops:GetChildren()
  32.         for index, value in ipairs(Drops) do
  33.             FireServer(value)
  34.     end
  35. end
  36.  
  37. function AutoSmelt()
  38.     local Tycoon = GetTycoon()
  39.     local ClickDetector = Tycoon.Smelter.Smelt.ClickDetector
  40.     fireclickdetector(ClickDetector)
  41. end
  42.  
  43. function FireObby(dif)
  44. local Part = game.Players.LocalPlayer.Character.LeftFoot
  45. local ObbyEasy = game:GetService("Workspace").EasyObby.Reward
  46. local ObbyHard = game:GetService("Workspace").HardObby.Reward
  47.     if dif == "Hard" then
  48.         firetouchinterest(Part, ObbyHard, 1)
  49.         wait()
  50.         firetouchinterest(Part, ObbyHard, 0)
  51.     else
  52.         firetouchinterest(Part, ObbyEasy, 1)
  53.         wait()
  54.         firetouchinterest(Part, ObbyEasy, 0)
  55.     end
  56. end
  57. --Main
  58. coroutine.wrap(function()
  59.     while true do
  60.         if getgenv().AutoCollect == true then
  61.             CollectOres()
  62.         end
  63.         if getgenv().AutoSmelt == true then
  64.             AutoSmelt()
  65.         end
  66.         wait(getgenv().IntervalTime)
  67.     end
  68. end)()
  69.  
  70. --Gui
  71. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/wall%20v3')))()
  72.  
  73. local w = library:CreateWindow("OreTycoon") -- Creates the window
  74.  
  75. local b = w:CreateFolder("Actions")
  76.  
  77. b:Toggle("AutoCollect",function(bool)
  78.     getgenv().AutoCollect = bool
  79. end)
  80.  
  81. b:Toggle("AutoSmelt",function(bool)
  82.     getgenv().AutoSmelt = bool
  83. end)
  84.  
  85. b:Box("Wait Time","number",function(value)
  86.     if value < 1 then
  87.         getgenv().IntervalTime = 1
  88.         value = 1
  89.         print(value)
  90.     else
  91.         if value >5 then
  92.             getgenv().IntervalTime = 5
  93.             value = 5
  94.             print(value)
  95.         else
  96.             getgenv().IntervalTime = value
  97.             print(value)
  98.         end
  99.     end
  100. end)
  101.  
  102. b:Button("Easy Obby Reward",function()
  103.     FireObby("Easy")
  104. end)
  105.  
  106. b:Button("Hard Obby Reward",function()
  107.     FireObby("Hard")
  108. end)
  109.  
  110. b:Button("Rebirth (Broken)",function()
  111. print("Error, feature broken")
  112. end)

Texbin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.