Advertisement
Guest User

Victory

a guest
Feb 20th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.90 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.  
  124. --Functions
  125. local function CheckIfSlotAvailable(Slot)
  126. for a,b in pairs(game.ReplicatedStorage.LoadSaveRequests.GetMetaData:InvokeServer(game.Players.LocalPlayer)) do
  127. if a == Slot then
  128. for c,d in pairs(b) do
  129. if c == "NumSaves" and d ~= 0 then
  130. return true
  131. else
  132. return false
  133. end
  134. end
  135. end
  136. end
  137. end
  138.  
  139. local function CheckSlotNumber() --Checks if the slot number is right
  140. 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
  141. local SlotNumber = tonumber(Slot.Text)
  142. return SlotNumber
  143. else return false
  144. end
  145. end
  146.  
  147. local function SendNotification(Title,Text,Duration) -- Sends Notification in the bottom right of the screen
  148. game.StarterGui:SetCore("SendNotification", {
  149. Title = Title;
  150. Text = Text;
  151. Icon = nil;
  152. Duration = Duration
  153. })
  154. end
  155.  
  156. SaveSlot.MouseButton1Down:connect(function() --Saves the slot that you want
  157. local CheckSlot = CheckSlotNumber()
  158. if CheckSlot ~= false then
  159. if CurrentSlot ~= -1 then
  160. ScriptLoadOrSave = true
  161. local SaveSlot = game.ReplicatedStorage.LoadSaveRequests.RequestSave:InvokeServer(CheckSlot)
  162. if SaveSlot == true then
  163. SendNotification("Save Notification", "Saved your Slot", 2)
  164. wait(.5)
  165. ScriptLoadOrSave = false
  166. elseif SaveSlot == false then
  167. SendNotification("Already Saving", "Saving/Loading is currently in Progress", 1)
  168. wait(.5)
  169. ScriptLoadOrSave = false
  170. end
  171. else
  172. SendNotification("Error", "Load Your Slot First before saving", 1)
  173. end
  174. else
  175. SendNotification("Incorrect Slot", "Enter a number in the upper field", 1)
  176. end
  177. end)
  178.  
  179. Load.MouseButton1Down:connect(function() --Loads the slot you want
  180. ScriptLoadOrSave = true
  181. local CheckSlot = CheckSlotNumber()
  182. if CheckSlot ~= false then
  183. if CheckIfSlotAvailable(CheckSlot) == true then
  184. local LoadSlot = game.ReplicatedStorage.LoadSaveRequests.RequestLoad:InvokeServer(CheckSlot)
  185. if LoadSlot == false then
  186. SendNotification("Cooldown Notification", "You aren't abled to load now", 1)
  187. end
  188. if LoadSlot == true then
  189. SendNotification("Reload Notification", "Loaded Your Slot", 2)
  190. CurrentSlot = CheckSlot
  191. end
  192. else
  193. SendNotification("Slot not Available", "This Slot is not Available, please choose another slot", 2)
  194. end
  195. else
  196. SendNotification("Incorrect Slot", "Enter a Valid number in the upper field", 1)
  197. end
  198. ScriptLoadOrSave = false
  199. end)
  200.  
  201. Store.MouseButton1Down:connect(function() --Stores the Axes somewhere so you can restore them later
  202. Amount = 0
  203. for a,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren())do
  204. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  205. b.Parent = game.Players.LocalPlayer
  206. Amount = Amount + 1
  207. end
  208. end
  209. SendNotification("Store Notification", "Stored "..Amount.." Axes, you can restore them later", 2)
  210. end)
  211.  
  212. Restore.MouseButton1Down:connect(function() --Restores the axes that you stored with the Store function
  213. Amount = 0
  214. for a,b in pairs(game.Players.LocalPlayer:GetChildren()) do
  215. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  216. b.Parent = game.Players.LocalPlayer.Backpack
  217. Amount = Amount + 1
  218. end
  219. end
  220. SendNotification("Restore Notification", "Restored "..Amount.." Axes that you Stored", 2)
  221. end)
  222.  
  223. CountAxes.MouseButton1Down:connect(function() --Counts Axes in your Backpack (Equiped Axes dont Count)
  224. Amount = 0
  225. for a,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  226. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  227. Amount = Amount + 1
  228. end
  229. end
  230. SendNotification("Axe Amount", "You have "..Amount.." Axes in your Backpack",2)
  231. end)
  232.  
  233. DropAxes.MouseButton1Down:connect(function() --Drops all your Axes
  234. Amount = 0
  235. for a,b in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  236. if b.Name ~= "BlueprintTool" and b.Name == "Tool" then
  237. game.ReplicatedStorage.Interaction.ClientInteracted:FireServer(b, "Drop tool", game.Players.LocalPlayer.Character.Head.CFrame)
  238. Amount = Amount + 1
  239. end
  240. end
  241. SendNotification("Axe Dropped", "Dropped "..Amount.." Axes from your Backpack",5)
  242. end)
  243.  
  244. DMoney.MouseButton1Down:connect(function() --Sends the money and will come back after around 2 mins
  245. if MoneyCooldown == true then
  246. SendNotification("Cooldown Notification", "Wait for your Money to come back",2)
  247. return
  248. elseif MoneyCooldown == false then
  249. MoneyCooldown = true
  250. SendNotification("Money Sent", "Wait about 2 minutes for your Money to come back", 5)
  251. game.ReplicatedStorage.Transactions.ClientToServer.Donate:InvokeServer(game.Players.LocalPlayer, game.Players.LocalPlayer.leaderstats.Money.Value, 1)
  252. SendNotification("Money Received", "You received your money that you have sent earlier", 5)
  253. MoneyCooldown = false
  254. end
  255. end)
  256.  
  257. --Anti Overwrite Slot (Sub-Function)
  258. while wait(.15) do
  259. if CurrentlySavingOrLoading.Value == true and ScriptLoadOrSave == false then
  260. repeat
  261. wait(1)
  262. until CurrentlySavingOrLoading.Value == false
  263. wait(1)
  264. CurrentSlot = game.Players.LocalPlayer.CurrentSaveSlot.Value
  265. print(CurrentSlot)
  266. end
  267. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement