For some reason it keeps giving me errors, Telling me I missed an end. Thanks for any help!
--LeaderBoard Script:
game.Players.PlayerAdded:connect(function(p)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
stats.Parent = p
local money = Instance.new("IntValue")
money.Name = "Money"
money.Value = 10 -- You can change this to anything
money.Parent = stats
local Sell = game.Workspace.PlaceHolderSellPoint
local Handle = game.ReplicatedStorage.Paper.Handle
local Paper = Handle.Parent
local Rarity = Handle.Rarity
local function onPartTouched(Handle)
print((Sell.Name .. " has touched " .. Handle.Name))
if Rarity == "Common" then
Paper:Destroy()
p.leaderstats.Money.Value = 2+
Sell.Touched:Connect(onPartTouched)
if Rarity == "Common+" then
Paper:Destroy()
p.leaderstats.Money.Value = 10+
Sell.Touched:Connect(onPartTouched)
else if Rarity == "Rare" then
Paper:Destroy()
p.leaderstats.Money.Value = 70+
Sell.Touched:Connect(onPartTouched)
else if Rarity == "Rare+" then
Paper:Destroy()
p.leaderstats.Money.Value = 170+
Sell.Touched:Connect(onPartTouched)
else if Rarity == "Epic" then
Paper:Destroy()
p.leaderstats.Money.Value = 500+
Sell.Touched:Connect(onPartTouched)
else if Rarity == "Epic+" then
Paper:Destroy()
p.leaderstats.Money.Value = 1250+
Sell.Touched:Connect(onPartTouched)
else if Rarity == "Legendary" then
Paper:Destroy()
p.leaderstats.Money.Value = 5000+
Sell.Touched:Connect(onPartTouched)
else if Rarity == "Mythic" then
Paper:Destroy()
p.leaderstats.Money.Value = 30000+
Sell.Touched:Connect(onPartTouched)
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you canât answer the three questions above, you should probably pick a different category.
All ends you need to add have to be added at the end of this script. Not in the middle or somewhere else, first function wasnât really function it was more of variables list.