game.Players.PlayerAdded:Connect(function(player)
local leaderstats = player:FindFirstChild("leaderstats")
if (leaderstats) then
local cash = Instance.new("IntValue")
cash.Name = "Cash" -- currency's name
cash.Value = 0 -- cash value
cash.Parent = leaderstats
else
warn("leaderstats somehow missing.")
end
end)
local runservice = game:GetService("RunService")
local Lighting = game:GetService("Lighting")
local function leaderstats(player)
return player:FindFirstChild("leaderstats")
end
local function awesomeSauce()
for _, I in pairs(workspace:GetDescendants()) do
if I:IsA("BasePart") then
I.Anchored = false
end
end
end
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = leaderstats(player)
awesomeSauce()
if (leaderstats) then
local cash = Instance.new("IntValue")
cash.Name = "Cash" -- currency's name
cash.Value = 0 -- cash value
cash.Parent = leaderstats
else
warn("leaderstats somehow FUCKING missing.")
end
end)