I have a problem with the Bignum module i dont really know how to make datastore with it i tried it but i failed
The Bignum module is very long thats because i uploaded on pastebin --[[ Big Number Library made by ido - Pastebin.com
The Module is in ReplicatedStorage
Here is the Datastore i tried:
local x = require(game.ReplicatedStorage.BigNum)
local data = game:GetService("DataStoreService"):GetDataStore("CoinCoin")
game.Players.PlayerAdded:Connect(function(plr)
script.Stats:Clone().Parent = plr
local ls = plr.Stats
local money = ls.Money
local multiplier = ls.Multiplier
local load = data:GetAsync(tostring(plr.UserId))
if load then
money.Value = load[1]
multiplier.Value = load[2]
end
while wait(0.05) do
local svb = x.convert(money.Value)
local val = x.convert(0.5)
local val = x.mul(val,(x.mul(x.convert(multiplier.Value),{1,0})))
svb = x.add(svb,val)
money.Value = x.bnumtostr(svb)
local lvl = x.convert(0)
if x.me(x.convert(money.Value), x.convert(1)) then
lvl = x.add(x.mul(x.log10(x.convert(money.Value))))
end
if x.me(x.convert(multiplier.Value), x.convert(1)) then
lvl = x.add(x.mul(x.log10(x.convert(multiplier.Value))))
end
end
end)
game.Players.PlayerRemoving:Connect(function(plr)
data:SetAsync(tostring(plr.UserId),{
plr.Stats.Money.Value,
plr.Stats.Multiplier.Value,
})
end)
Theres comes a error message:
I hope anyone can help me