The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Trade Tower script pastebin roblox
By LINK GAME on 2024-09-20 08:00 am | Syntax: LUA | Views: 11



New Script | Raw | Show/Hide line no. | Copy text to clipboard
  1.  local Pool = "1" --// Recommended for low value players [NOTE] - 1 = 250K Cap, 2 = 5M Cap, 3 = INF Cap
  2. local Safe = false --// Recommended [NOTE] - IF YOU WANNA TURN IT ON, MAKE SURE TO REJOIN
  3. local MaxBetEnabled = false --// Enable if you want a max bet [NOTE] - SETTING IT TO ENABLED MAKES THE CODE RUN SLOWER
  4. local WaitingTime = 0.9 --// Recommended
  5.  
  6. local MaxBet = 10000 --// Max Bet that you want placed
  7. local SafetyAmount = 0 --// Do not mess with this setting
  8.  
  9. if Safe ~= true then
  10.   SafetyAmount = 0
  11. else
  12.   SafetyAmount = 1500 --// Change this to your safety amount [NOTE] - This is the difference that HAS to be between the total and your RAP
  13. end
  14.  
  15. game.StarterGui:SetCore("SendNotification", {
  16.   Title = "Welcome to TradeThreshold!",
  17.   Text = "Make sure to vouch scde on v3rmillion"
  18. });
  19.  
  20. local function getTotal()
  21.   local total = 0
  22.  
  23.   for i,v in next, game.Players.LocalPlayer.PlayerGui.Gui.Frames.Inventory.SubInventory.Holder.List:GetChildren() do
  24.       if v:IsA("Frame") and v:FindFirstChild("ItemValue") ~= nil then
  25.           local s = string.split(v.ItemValue.Text, "$")
  26.           local n = tonumber(s[2])
  27.          
  28.           if n then
  29.               total = total + n
  30.           end
  31.       end
  32.   end
  33.  
  34.   return total
  35. end
  36.  
  37. local function fromSuffixString(s)
  38.   local converted = 0
  39.  
  40.   if string.find(s, "K") then
  41.       local s = string.split(s, 'K')
  42.       local n = tonumber(s[1]) * 1000
  43.      
  44.       converted = n
  45.   elseif string.find(s, "M") then
  46.       local s = string.split(s, 'M')
  47.       local n = tonumber(s[1]) * 1000000
  48.      
  49.       converted = n
  50.   else
  51.       converted = s
  52.   end
  53.  
  54.   return tonumber(converted)
  55. end
  56.  
  57. local function getRap(Match)
  58.   local total = 0
  59.  
  60.   for i,v in next, Match:GetChildren() do
  61.       if v.Name ~= game.Players.LocalPlayer.Name and v:IsA("Frame") and v:FindFirstChild("RAP") ~= nil then
  62.           local s = string.split(v.RAP.Text, "$")
  63.           local n = fromSuffixString(s[2])
  64.          
  65.           if n then
  66.               total = total + n
  67.           end
  68.       end
  69.   end
  70.  
  71.   return total
  72. end
  73.  
  74. local function Attempt()
  75.   local placed = 0
  76.   local Total = getRap(game.Players.LocalPlayer.PlayerGui.Gui.Frames.Jackpot.SubJackpot.Pools[Pool].List)
  77.   local RapTotal = getTotal()
  78.  
  79.   if Total ~= 0 and tonumber(Total) + SafetyAmount < tonumber(RapTotal) then
  80.       game.StarterGui:SetCore("SendNotification", {
  81.           Title = "Success",
  82.           Text = "You have joined the pool "..Pool.." jackpot!"
  83.       });
  84.  
  85.       for i,v in next, game.Players.LocalPlayer.PlayerGui.Gui.Frames.Inventory.SubInventory.Holder.List:GetChildren() do
  86.           if v:IsA("Frame") and v:FindFirstChild("ItemValue") then
  87.               local Total2 = getRap(game.Players.LocalPlayer.PlayerGui.Gui.Frames.Jackpot.SubJackpot.Pools[Pool].List)
  88.               local RapTotal2 = getTotal()
  89.               if MaxBetEnabled == true then
  90.                   local s = string.split(v.ItemValue.Text, "$")
  91.                   local n = fromSuffixString(s[2])
  92.                   placed = placed + n
  93.                  
  94.                   if placed <= MaxBet and tonumber(Total2) + SafetyAmount < tonumber(RapTotal2) then
  95.                       game:GetService("ReplicatedStorage").Events.GamesActions:InvokeServer("Jackpot", v.Name, 1, tonumber(Pool))
  96.                   end
  97.               else
  98.                   if tonumber(Total2) + SafetyAmount < tonumber(RapTotal2) then
  99.                       game:GetService("ReplicatedStorage").Events.GamesActions:InvokeServer("Jackpot", v.Name, 1, tonumber(Pool))
  100.                   end
  101.               end
  102.           end
  103.       end
  104.   end
  105.  
  106.   placed = 0
  107. end
  108.  
  109. while wait() do
  110.   game:GetService("ReplicatedStorage").Events.Click:FireServer()
  111.   game:GetService("ReplicatedStorage").Events.OpenCase:InvokeServer("Starter")
  112.    
  113.   if string.find(string.lower(game.Players.LocalPlayer.PlayerGui.Gui.Frames.Jackpot.SubJackpot.Countdown.Text), "left") then
  114.       local s = string.split(game.Players.LocalPlayer.PlayerGui.Gui.Frames.Jackpot.SubJackpot.Countdown.Text, ": ")
  115.       local currentTimer = tonumber(s[2])
  116.      
  117.       if currentTimer == 1 then
  118.           wait(WaitingTime)
  119.           Attempt()
  120.       end
  121.   end
  122. end