Advertisement
Kaid3n22

Destruction Simulator Coins and Level GUI

Jul 29th, 2021
10,555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.06 KB | None | 0 0
  1. --[[
  2.     Sorry for the late update.
  3.     I haven't done much on Roblox in a while.
  4.     I'm just gonna make this a simple script of typing amount of
  5.     coins and levels you want.
  6.     The max coins you can get at a time is 99,999,999.
  7.     Trust me, I tried to go higher lol
  8. --]]
  9.  
  10. local player = game.Players.LocalPlayer
  11.  
  12. local newgui = Instance.new("ScreenGui")
  13. local mainframe = Instance.new("Frame")
  14. local CoinLabel = Instance.new("TextLabel")
  15. local CoinBox = Instance.new("TextBox")
  16. local AddCoins = Instance.new("TextButton")
  17. local LevelLabel = Instance.new("TextLabel")
  18. local LevelBox = Instance.new("TextBox")
  19. local AddLevel = Instance.new("TextButton")
  20.  
  21. newgui.Name = "NewGui"
  22. newgui.Parent = player.PlayerGui
  23.  
  24. mainframe.Name = "MainFrame"
  25. mainframe.BackgroundColor3 = Color3.fromRGB(100,20,50)
  26. mainframe.BorderSizePixel = 0
  27. mainframe.Position = UDim2.new(0.35,0,0.2,0)
  28. mainframe.Size = UDim2.new(0.3,0,0.45,0)
  29. mainframe.Active = true
  30. mainframe.Selectable = true
  31. mainframe.Draggable = true
  32. mainframe.Parent = newgui
  33.  
  34. CoinLabel.Name = "CoinLabel"
  35. CoinLabel.Text = "Coins (Max: 99,999,999)"
  36. CoinLabel.BackgroundTransparency = 1
  37. CoinLabel.TextScaled = true
  38. CoinLabel.Size = UDim2.new(0.4,0,0.05,0)
  39. CoinLabel.Position = UDim2.new(0.1,0,0.2,0)
  40. CoinLabel.TextColor3 = Color3.fromRGB(0,100,255)
  41. CoinLabel.Parent = mainframe
  42.  
  43. CoinBox.Name = "CoinBox"
  44. CoinBox.PlaceholderText = "Coins"
  45. CoinBox.Text = ""
  46. CoinBox.Size = UDim2.new(0.3,0,0.125,0)
  47. CoinBox.Position = UDim2.new(0.1,0,0.3,0)
  48. CoinBox.TextScaled = true
  49. CoinBox.ClearTextOnFocus = false
  50. CoinBox.BackgroundColor3 = Color3.fromRGB(255,255,255)
  51. CoinBox.Parent = mainframe
  52.  
  53. AddCoins.Name = "AddCoins"
  54. AddCoins.Text = "Add Coins"
  55. AddCoins.BackgroundColor3 = Color3.fromRGB(0,255,0)
  56. AddCoins.Size = UDim2.new(0.3,0,0.1,0)
  57. AddCoins.Position = UDim2.new(0.1,0,0.5,0)
  58. AddCoins.TextScaled = true
  59. AddCoins.Parent = mainframe
  60.  
  61. LevelLabel.Name = "LevelLabel"
  62. LevelLabel.Text = "Level (Max: 55)"
  63. LevelLabel.BackgroundTransparency = 1
  64. LevelLabel.TextScaled = true
  65. LevelLabel.Size = UDim2.new(0.4,0,0.05,0)
  66. LevelLabel.Position = UDim2.new(0.6,0,0.2,0)
  67. LevelLabel.TextColor3 = Color3.fromRGB(0,100,255)
  68. LevelLabel.Parent = mainframe
  69.  
  70. LevelBox.Name = "LevelBox"
  71. LevelBox.PlaceholderText = "Level"
  72. LevelBox.Text = ""
  73. LevelBox.Size = UDim2.new(0.3,0,0.125,0)
  74. LevelBox.Position = UDim2.new(0.6,0,0.3,0)
  75. LevelBox.TextScaled = true
  76. LevelBox.ClearTextOnFocus = false
  77. LevelBox.BackgroundColor3 = Color3.fromRGB(255,255,255)
  78. LevelBox.Parent = mainframe
  79.  
  80. AddLevel.Name = "AddLevel"
  81. AddLevel.Text = "Add Level"
  82. AddLevel.BackgroundColor3 = Color3.fromRGB(0,255,0)
  83. AddLevel.Size = UDim2.new(0.3,0,0.1,0)
  84. AddLevel.Position = UDim2.new(0.6,0,0.5,0)
  85. AddLevel.TextScaled = true
  86. AddLevel.Parent = mainframe
  87.  
  88. local Event = game:GetService("ReplicatedStorage").Remotes.generateBoost
  89.  
  90. AddCoins.MouseButton1Down:Connect(function()
  91.     local Amount = tonumber(CoinBox.Text)
  92.     if Amount then
  93.         Event:FireServer("Coins", 999999, Amount)
  94.     end
  95. end)
  96.  
  97. AddLevel.MouseButton1Click:Connect(function()
  98.     local Amount = tonumber(LevelBox.Text)
  99.     if Amount then
  100.         local LevelValue = player.leaderstats.Level
  101.         if Amount > LevelValue.Value then
  102.             local Difference = Amount - LevelValue.Value
  103.             repeat
  104.                 local FireAmount = Difference
  105.                 if FireAmount > 15 then
  106.                     FireAmount = 15
  107.                 end
  108.                 Event:FireServer("Levels", 480, FireAmount)
  109.                 Difference -= FireAmount
  110.                 wait()
  111.             until Difference == 0
  112.         elseif Amount < LevelValue.Value then
  113.             local Difference = Amount - LevelValue.Value
  114.             repeat
  115.                 local FireAmount = Difference
  116.                 if FireAmount < -15 then
  117.                     FireAmount = -15
  118.                 end
  119.                 print(FireAmount)
  120.                 Event:FireServer("Levels", 480, FireAmount)
  121.                 Difference -= FireAmount
  122.                 wait()
  123.             until Difference == 0
  124.         end
  125.     end
  126. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement