I have multiple scripts that require suffixes, and I always have to edit each and every single one of them so I decided to use module scripts. The problem is I never used them? Also do module scripts require functions?
Module Script
local module = {}
function module:getSuf(suf)
local suffixes = {
'k','M','B','T','qd','Qn','sx','Sp','O',
'N','de','Ud','DD','tdD','qdD','QnD','sxD',
'SpD','OcD','NvD','Vgn'
}
module:getSuf(suffixes)
end
return module
Script
local rs = game:WaitForChild("ReplicatedStorage")
local events = rs:WaitForChild("Events")
game.Players.PlayerAdded:connect(function(plr)
local module = require(game.ReplicatedStorage.Suffixes)
module.getSuf(suf)
local leaderstats = plr:WaitForChild("leaderstats")
local stats = plr:WaitForChild("stats")
local robux = stats.Robux
local tix = stats.Tix
local robuxstring = leaderstats.Robux
local tixstring = leaderstats.Tix
robux.Changed:connect(function()
for i = #suffixes,1, -1 do
if robux.Value >= 10 ^ (i * 3) then
robuxstring.Value = math.floor(robux.Value / 10 ^ ((i*3) - 2)) * 0.01 .. suffixes[i] .. "+"
break
elseif robux.Value <= 10 ^ 3 then
robuxstring.Value = math.floor(robux.Value * 100) * 0.01
break
end
end
end)
tix.Changed:connect(function()
for i = #suffixes,1, -1 do
if tix.Value >= 10 ^ (i * 3) then
tixstring.Value = math.floor(tix.Value / 10 ^ ((i*3) - 2)) * 0.01 .. suffixes[i] .. "+"
break
elseif tix.Value <= 10 ^ 3 then
tixstring.Value = math.floor(tix.Value * 100) * 0.01
break
end
end
end)
end)
Also my studio crashes.

2 comments
Er, can you reword your question? It's currently hard to understand what you're asking.
I have lots of scripts like the script below which requires the table in the module script.