Well you forgot to add a end at the end, and you capitalized Game. Try this:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local Cash = Instance.new("NumberValue")
Cash.Name = "Tix"
Cash.Value = 0
Cash.Parent = 'leaderstats'
end)
Now for a gui that changes you need a local script that is a child of a text label.
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats"):WaitForChild("Tix")
local TextLabel = script.Parent
Cash.Changed:Connect(function()
TextLabel.Text = "Tix: "..Cash.Value
end)
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats"):WaitForChild("Tix")
local TextLabel = script.Parent
function Cash:GetPropertyChangedSignal("Value")
TextLabel.Text = "Tix: "..Cash.Value
end)
Or
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats"):WaitForChild("Tix")
local TextLabel = script.Parent function
Cash:GetPropertyChangedSignal("Value")
TextLabel.Text = "Tix: "..Cash.Value
end)
Or
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats"):WaitForChild("Tix")
local TextLabel = script.Parent(function()
Cash:GetPropertyChangedSignal("Value")
TextLabel.Text = "Tix: "..Cash.Value
end)
local player = game.Players.LocalPlayer
local Cash = player:WaitForChild("leaderstats"):WaitForChild("Tix")
local TextLabel = script.Parent
Cash:GetPropertyChangedSignal("Value"):Connect(function()
TextLabel.Text = "Tix: "..Cash.Value
end)