Its 7am i been tryna do ts for ages heres my scripts
local:
local GUI = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local multiplierConfig = require(ReplicatedStorage.MultiplierConfig)
local MultiplierEvent = ReplicatedStorage.MultiplierEvent
local ResetMulti = ReplicatedStorage.ResetMulti
local buttons = GUI.MultiplierFrame.Multipliers
local priceLabels = GUI.MultiplierFrame.MultipliersLabel
local GlobalPriceMulti = 1
local suffixes = {"K","M","B","T","Qa","Qi","Sx","Sp","Oc","No"}
local function formatCash(n)
if n < 1000 then return tostring(n) end
local i = math.floor(math.log10(n)/3)
local suffix = suffixes[i] or ""
local scaled = n / (10^(i*3))
return string.format("%.2f%s", scaled, suffix)
end
local GlobalPriceMulti = 1
local function updateAllPrices()
for name, data in pairs(multiplierConfig) do
local label = priceLabels:FindFirstChild(name.."Price")
if label then
local price = data.BasePrice * GlobalPriceMulti
label.Text = "$" .. formatCash(price)
end
end
end
for name, data in pairs(multiplierConfig) do
local button = buttons:FindFirstChild(name)
if button then
button.MouseButton1Click:Connect(function()
local newMulti = MultiplierEvent:InvokeServer(name)
GlobalPriceMulti = newMulti
updateAllPrices()
end)
end
end
ResetMulti.OnClientEvent:Connect(function()
GlobalPriceMulti = 1
updateAllPrices()
end)
updateAllPrices()
module:
local MultiplierConfig = {
x2Multiplier = {Multiplier = 1, BasePrice = 1e5},
x5Multiplier = {Multiplier = 5, BasePrice = 2.5e5},
x15Multiplier = {Multiplier = 15, BasePrice = 8e5},
x50Multiplier = {Multiplier = 50, BasePrice = 24e5},
}
return MultiplierConfig