Advertisement
Guest User

Untitled

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