game.StarterGui.ResetPlayerGuiOnSpawn = false local MarketplaceService = game:GetService("MarketplaceService") function getPlayerFromId(id) for i,v in pairs(game.Players:GetChildren()) do if v.userId == id then return v end end return nil end MarketplaceService.ProcessReceipt = function(receiptInfo) local productId = receiptInfo.ProductId local playerId = receiptInfo.PlayerId local player = getPlayerFromId(playerId) local productName if productId == 23783774 then productName = "$10,000+ Cash Boost" local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney then cashmoney.Value = cashmoney.Value + 10000 end elseif productId == 23783774 then productName = "$50,000+ Cash Boost" local cashmoney = game.ServerStorage.MoneyStorage:FindFirstChild(player.Name) if cashmoney then cashmoney.Value = cashmoney.Value + 10000 end elseif productId == 23783946 then productName = "+5 Walkspeed [STACKS]" local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 5 end elseif productId == 24133649 then productName = "+25 Health Boost [STACKS]" local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.MaxHealth = human.MaxHealth + 25 human.Health = human.Health + 25 end elseif productId == 23783812 then productName = "Gravity Coil [1 LIFE]" game.Lighting.GravityCoil:Clone().Parent = player.Backpack end elseif productId == 24133964 then productName = "Jetpack [1 LIFE]" game.Lighting.Jetpack:Clone().Parent = player.Backpack end elseif productId == 24139536 then productName = "Minigun [1 LIFE]" game.Lighting.Minigun:Clone().Parent = player.Backpack end elseif productId == 23918487 then productName = "NUKE [1 TIME USE]" game.Lighting.Nuke:Clone().Parent = game.Workspace end return Enum.ProductPurchaseDecision.PurchaseGranted end
Please, help thanks!
This is why it's very important to tab your code correctly!
It's complaining about line 60. Look around line 60:
productName = "Jetpack [1 LIFE]" game.Lighting.Jetpack:Clone().Parent = player.Backpack end elseif productId == 24139536 then productName = "Minigun [1 LIFE]" game.Lighting.Minigun:Clone().Parent = player.Backpack end elseif productId == 23918487 then productName = "NUKE [1 TIME USE]"
You have end
s that are floating that don't match up with anything above them. Each elseif
does NOT need its own end
-- only the overall if
needs an end
.
Delete those unnecessary end
s.
Next, you're missing an end
:
productName = "+5 Walkspeed [STACKS]" local char = player.Character if char then local human = char:FindFirstChild("Humanoid") if human then human.WalkSpeed = human.WalkSpeed + 5 end
The second if
in this place doesn't have a matchingend
(scan down in the same column as it--the first one has an end
there but the second doesn't)
The same problem happens a few more lines down.