local gamepass = 16730719
local market = game:GetService("MarketplaceService")
local replicatedStorage = game:GetService("ReplicatedStorage")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(Character)
if market:UserOwnsGamePassAsync(player.UserId, gamepass) then
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
player.leaderstats.Views.Value = player.leaderstats.Views.Value + 2
else
replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)
player.leaderstats.Views.Value = player.leaderstats.Views.Value + 1
end
end)
end
end)
end)
there is actually 2 errors error 1: Error: (10,3) Syntax error: Expected 'end' (to close 'function' at line 8), got 'else'
error 2: Error: (14,3) Syntax error: Expected ')' (to close '(' at line 11), got 'end'

6 comments
You should include an explenation as to what was causing the error, instead of just giving them their fixed code.
The code is right, but the answer is wrong @NickyPlayz2011
The reason @Not_prototype's code errored is because he didn't add an ending parenthesis on line 13. Also, the function requires an end on line 9, since it's connected to an RBXScriptSignal (OnServerEvent)
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ok
Re-edited
breh