here is the script
local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("FruitSaveSystem")
local ds2 = datastore:GetDataStore("CoinSaveSystem")
local ds3 = datastore:GetDataStore("TalkToBeastSaveSystem")
game.Players.PlayerAdded:connect(function(plr)
local folder = Instance.new("Folder", plr)
folder.Name = "leaderstats"
local fruits = Instance.new("IntValue", folder)
fruits.Name = "Fruits"
local coins = Instance.new("IntValue", folder)
coins.Name = "Coins"
local talkedtobeast = Instance.new("BoolValue", folder)
talkedtobeast.Name = "TalkedToBeast"
fruits.Value = ds1:GetAsync(plr.UserId) or 0
ds1:SetAsync(plr.UserId, fruits.Value)
coins.Value = ds2:GetAsync(plr.UserId) or 0
ds2:SetAsync(plr.UserId, coins.Value)
talkedtobeast.Value = ds3:GetAsync(plr.UserId) or false
ds3:SetAsync(plr.UserId, talkedtobeast.Value)
fruits.Changed:connect(function()
ds1:SetAsync(plr.UserId, fruits.Value)
end)
coins.Changed:connect(function()
ds2:SetAsync(plr.UserId, coins.Value)
end)
talkedtobeast.Changed:connect(function()
ds3:SetAsync(plr.UserId, talkedtobeast.Value)
end)
end)
I have tried all kinds of things, its worked once. I cant get it to do it again, please help.
