Advertisement
BobMe

lumber tycoon 2 scrip thing mone doop (but u can doop limit)

Apr 25th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.96 KB | None | 0 0
  1.  
  2. -- Objects
  3.  
  4. local ScreenGui = Instance.new("ScreenGui")
  5. local MainFrame = Instance.new("Frame")
  6. local SaveSlot = Instance.new("TextButton")
  7. local DMoney = Instance.new("TextButton")
  8. local Store = Instance.new("TextButton")
  9. local Restore = Instance.new("TextButton")
  10. local DropAxes = Instance.new("TextButton")
  11. local Load = Instance.new("TextButton")
  12. local CountAxes = Instance.new("TextButton")
  13. local Slot = Instance.new("TextBox")
  14.  
  15. -- Properties
  16.  
  17. ScreenGui.Parent = game.CoreGui
  18. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  19.  
  20. MainFrame.Name = "LT2DupeGui"
  21. MainFrame.Parent = ScreenGui
  22. MainFrame.BackgroundColor3 = Color3.new(0.282353, 0.278431, 0.278431)
  23. MainFrame.BorderColor3 = Color3.new(0.588235, 0.588235, 0.588235)
  24. MainFrame.BorderSizePixel = 3
  25. MainFrame.Position = UDim2.new(0.111687116, 0, 0.167118713, 0)
  26. MainFrame.Size = UDim2.new(0, 230, 0, 258)
  27. MainFrame.Active = true
  28. MainFrame.Draggable = true
  29.  
  30. SaveSlot.Name = "SaveSlot"
  31. SaveSlot.Parent = MainFrame
  32. SaveSlot.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  33. SaveSlot.BorderSizePixel = 2
  34. SaveSlot.Position = UDim2.new(0.040079806, 0, 0.302941561, 0)
  35. SaveSlot.Size = UDim2.new(0, 95, 0, 40)
  36. SaveSlot.Font = Enum.Font.SourceSans
  37. SaveSlot.Text = "Save Slot"
  38. SaveSlot.TextColor3 = Color3.new(0, 0, 0)
  39. SaveSlot.TextSize = 14
  40.  
  41. DMoney.Name = "DMoney"
  42. DMoney.Parent = MainFrame
  43. DMoney.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  44. DMoney.BorderSizePixel = 2
  45. DMoney.Position = UDim2.new(0.0410686359, 0, 0.774269283, 0)
  46. DMoney.Size = UDim2.new(0, 95, 0, 40)
  47. DMoney.Font = Enum.Font.SourceSans
  48. DMoney.Text = "Dupe Money"
  49. DMoney.TextColor3 = Color3.new(0, 0, 0)
  50. DMoney.TextSize = 14
  51.  
  52. Store.Name = "Store"
  53. Store.Parent = MainFrame
  54. Store.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  55. Store.BorderSizePixel = 2
  56. Store.Position = UDim2.new(0.514908552, 0, 0.299316287, 0)
  57. Store.Size = UDim2.new(0, 95, 0, 40)
  58. Store.Font = Enum.Font.SourceSans
  59. Store.Text = "Store Axe"
  60. Store.TextColor3 = Color3.new(0, 0, 0)
  61. Store.TextSize = 14
  62.  
  63. Restore.Name = "Restore"
  64. Restore.Parent = MainFrame
  65. Restore.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  66. Restore.BorderSizePixel = 2
  67. Restore.Position = UDim2.new(0.51270771, 0, 0.528562546, 0)
  68. Restore.Size = UDim2.new(0, 95, 0, 40)
  69. Restore.Font = Enum.Font.SourceSans
  70. Restore.Text = "Restore Axe"
  71. Restore.TextColor3 = Color3.new(0, 0, 0)
  72. Restore.TextSize = 14
  73.  
  74. DropAxes.Name = "Drop Axes"
  75. DropAxes.Parent = MainFrame
  76. DropAxes.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  77. DropAxes.BorderSizePixel = 2
  78. DropAxes.Position = UDim2.new(0.514981687, 0, 0.774269283, 0)
  79. DropAxes.Size = UDim2.new(0, 95, 0, 40)
  80. DropAxes.Font = Enum.Font.SourceSans
  81. DropAxes.Text = "Drop Axes"
  82. DropAxes.TextColor3 = Color3.new(0, 0, 0)
  83. DropAxes.TextSize = 14
  84.  
  85. Load.Name = "Load"
  86. Load.Parent = MainFrame
  87. Load.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  88. Load.BorderSizePixel = 2
  89. Load.Position = UDim2.new(0.0410686135, 0, 0.530083239, 0)
  90. Load.Size = UDim2.new(0, 95, 0, 40)
  91. Load.Font = Enum.Font.SourceSans
  92. Load.Text = "Load Slot"
  93. Load.TextColor3 = Color3.new(0, 0, 0)
  94. Load.TextSize = 14
  95.  
  96. CountAxes.Name = "Count Axes"
  97. CountAxes.Parent = MainFrame
  98. CountAxes.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  99. CountAxes.BorderSizePixel = 2
  100. CountAxes.Position = UDim2.new(0.510633886, 0, 0.0688429475, 0)
  101. CountAxes.Size = UDim2.new(0, 95, 0, 40)
  102. CountAxes.Font = Enum.Font.SourceSans
  103. CountAxes.Text = "Count Axes"
  104. CountAxes.TextColor3 = Color3.new(0, 0, 0)
  105. CountAxes.TextSize = 14
  106.  
  107. Slot.Name = "Slot"
  108. Slot.Parent = MainFrame
  109. Slot.BackgroundColor3 = Color3.new(0.411765, 0.411765, 0.411765)
  110. Slot.BorderSizePixel = 2
  111. Slot.Position = UDim2.new(0.0410686322, 0, 0.0697674453, 0)
  112. Slot.Size = UDim2.new(0, 94, 0, 39)
  113. Slot.Font = Enum.Font.SourceSans
  114. Slot.Text = "Slot Number"
  115. Slot.TextColor3 = Color3.new(0, 0, 0)
  116. Slot.TextSize = 14
  117.  
  118. --Locals
  119. local MoneyCooldown = false
  120. local CurrentSlot = game.Players.LocalPlayer:WaitForChild("CurrentSaveSlot").Value
  121. local ScriptLoadOrSave = false
  122. local CurrentlySavingOrLoading = game.Players.LocalPlayer:WaitForChild("CurrentlySavingOrLoading")
  123. local howmoney = false
  124.  
  125. --Functions
  126. local function CheckIfSlotAvailable(Slot)
  127. for a,b in pairs(game.ReplicatedStorage.LoadSaveRequests.GetMetaData:InvokeServer(game.Players.LocalPlayer)) do
  128. if a == Slot then
  129. for c,d in pairs(b) do
  130. if c == "NumSaves" and d ~= 0 then
  131. return true
  132. else
  133. return false
  134. end
  135. end
  136. end
  137. end
  138. end
  139.  
  140. local function CheckSlotNumber() --Checks if the slot number is right
  141. if Slot.Text == "1" or Slot.Text == "2" or Slot.Text == "3" or Slot.Text == "4" or Slot.Text == "5" or Slot.Text == "6" then
  142. local SlotNumber = tonumber(Slot.Text)
  143. return SlotNumber
  144. else return false
  145. end
  146. end
  147.  
  148. local function SendNotification(Title,Text,Duration) -- Sends Notification in the bottom right of the screen
  149. game.StarterGui:SetCore("SendNotification", {
  150. Title = Title;
  151. Text = Text;
  152. Icon = nil;
  153. Duration = Duration
  154. })
  155. end
  156.  
  157. SaveSlot.MouseButton1Down:connect(function() --Saves the slot that you want
  158. local CheckSlot = CheckSlotNumber()
  159. if CheckSlot ~= false then
  160. if CurrentSlot ~= -1 then
  161. ScriptLoadOrSave = true
  162. local SaveSlot = game.ReplicatedStorage.LoadSaveRequests.RequestSave:InvokeServer(CheckSlot)
  163. if SaveSlot == true then
  164. SendNotification("Save Notification", "Saved your Slot", 2)
  165. wait(.5)
  166. ScriptLoadOrSave = false
  167. elseif SaveSlot == false then
  168. SendNotification("Already Saving", "Saving/Loading is currently in Progress", 1)
  169. wait(.5)
  170. ScriptLoadOrSave = false
  171. end
  172. else
  173. SendNotification("Error", "Load Your Slot First before saving", 1)
  174. end
  175. else
  176. SendNotification("Incorrect Slot", "Enter a number in the upper field", 1)
  177. end
  178. end)
  179.  
  180. Load.MouseButton1Down:connect(function() --Loads the slot you want
  181. ScriptLoadOrSave = true
  182. local CheckSlot = CheckSlotNumber()
  183. if CheckSlot ~= false then
  184. if CheckIfSlotAvailable(CheckSlot) == true then
  185. local LoadSlot = game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(CheckSlot)
  186. if LoadSlot == false then
  187. SendNotification("Cooldown Notification", "You aren't abled to load now", 1)
  188. end
  189. if LoadSlot == true then
  190. SendNotification("Reload Notification", "Loaded Your Slot", 2)
  191. CurrentSlot = CheckSlot
  192. end
  193. else
  194. SendNotification("Slot not Available", "This Slot is not Available, please choose another slot", 2)
  195. end
  196. else
  197. SendNotification("Incorrect Slot", "Enter a Valid number in the upper field", 1)
  198. end
  199. ScriptLoadOrSave = false
  200. end)
  201.  
  202. Store.MouseButton1Down:connect(function() --Stores the Axes somewhere so you can restore them later
  203. Amount = 0
  204. for a,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren())do
  205. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  206. b.Parent = game.Players.LocalPlayer
  207. Amount = Amount + 1
  208. end
  209. end
  210. SendNotification("Store Notification", "Stored "..Amount.." Axes, you can restore them later", 2)
  211. end)
  212.  
  213. Restore.MouseButton1Down:connect(function() --Restores the axes that you stored with the Store function
  214. Amount = 0
  215. for a,b in pairs(game.Players.LocalPlayer:GetChildren()) do
  216. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  217. b.Parent = game.Players.LocalPlayer.Backpack
  218. Amount = Amount + 1
  219. end
  220. end
  221. SendNotification("Restore Notification", "Restored "..Amount.." Axes that you Stored", 2)
  222. end)
  223.  
  224. CountAxes.MouseButton1Down:connect(function() --Counts Axes in your Backpack (Equiped Axes dont Count)
  225. Amount = 0
  226. for a,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  227. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  228. Amount = Amount + 1
  229. end
  230. end
  231. SendNotification("Axe Amount", "You have "..Amount.." Axes in your Backpack",2)
  232. end)
  233.  
  234. DropAxes.MouseButton1Down:connect(function() --Drops all your Axes
  235. Amount = 0
  236. for a,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  237. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  238. game.ReplicatedStorage.Interaction.ClientInteracted:FireServer(b, "Drop tool", game.Players.LocalPlayer.Character.Head.CFrame)
  239. Amount = Amount + 1
  240. end
  241. end
  242. SendNotification("Axe Dropped", "Dropped "..Amount.." Axes from your Backpack",5)
  243. end)
  244.  
  245. function chat(sub,from,to)
  246. local kek = false
  247. local boop = nil
  248. game.Players.LocalPlayer.Chatted:Connect(function(msg)
  249. if kek == false then
  250. kek = true
  251. if msg:sub(from,to):lower() == sub:lower() then
  252. boop = msg:sub(to+1)
  253. end
  254. end
  255. end)
  256. repeat wait(1) until boop ~= nil
  257. return boop
  258. end
  259.  
  260. function howmany()
  261. SendNotification("Amount of Money", "How much money do you want to duplicate?", 4)
  262. local jek = chat("/e ",1,3)
  263. local num = tonumber(jek)
  264. return num
  265. end
  266.  
  267. DMoney.MouseButton1Down:connect(function() --Sends the money and will come back after around 2 mins
  268. if MoneyCooldown == true then
  269. SendNotification("Cooldown Notification", "Wait for your Money to come back",2)
  270. return
  271. elseif MoneyCooldown == false then
  272. MoneyCooldown = true
  273. howmoney = false
  274. local amount = howmany()
  275. SendNotification("Money Sent: "..amount, "Wait about 2 minutes for your Money to come back", 5)
  276. game.ReplicatedStorage.Transactions.ClientToServer.Donate:InvokeServer(game.Players.LocalPlayer, amount, 1)
  277. SendNotification("Money Received", "You received your money that you have sent earlier", 5)
  278. MoneyCooldown = false
  279. end
  280. end)
  281.  
  282. game.Players.LocalPlayer.Chatted:Connect(function(msg)
  283. if msg:lower() == "/e stop" then
  284. ScreenGui.Enabled = false
  285. end
  286. end)
  287.  
  288. --Anti Overwrite Slot (Sub-Function)
  289. while wait(.15) do
  290. if CurrentlySavingOrLoading.Value == true and ScriptLoadOrSave == false then
  291. repeat
  292. wait(1)
  293. until CurrentlySavingOrLoading.Value == false
  294. wait(1)
  295. CurrentSlot = game.Players.LocalPlayer.CurrentSaveSlot.Value
  296. print(CurrentSlot)
  297. end
  298. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement