Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make the gamepass work with berezaa kit?

local GamePassService = game:GetService('GamePassService')
local GamePassId = 262676928


game.Players.PlayerAdded:connect(function(player)
	stats = Instance.new("IntValue",player)
	stats.Name = "leaderstats"
	
	cashmoney = Instance.new("IntValue", stats)
	cashmoney.Name = "Cash"
	
	if GamePassService:PlayerHasPass(player, GamePassId) then
		cashmoney.Value = 5000
	end
end)

It does show that the money is given, however, you cant earn or spend money.

1 answer

Try this and place this into your ServerScriptService

id = 0 -- gamepassid here
pcall(function()
	game.Players.PlayerAdded:connect(function(player)
		if game.MarketplaceService:PlayerOwnsAsset(player,id) then
		end
			local cashmoney = game.ServerStorage.MoneyStorage:WaitForChild(player.Name)
			cashmoney.Value = cashmoney.Value + 5000
	end)
	end)

This discussion is preserved as it was. New answers, comments, and votes are closed.