JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Wasd | JustPaste.app
4 days ago4 views
👨‍💻Programming

Wasd

local MPS = game:GetService("MarketplaceService")
local PLAYERS = game:GetService("Players")

local GamepassModul = {}
GamepassModul.Gamepasses = {
    [1861743994] = {} -- Deine echte ID ist hier schon eingetragen!
}

-- Prüft, ob ein Spieler einen bestimmten Gamepass besitzt
function GamepassModul:BesitztGamepass(Spieler, Id, KaufAnbieten, Versuche)
    if not self.Gamepasses[Id] then
        self.Gamepasses[Id] = {}
    end
    
    if table.find(self.Gamepasses[Id], Spieler.UserId) then 
        return true 
    end
    
    if not Versuche then
        Versuche = 0
    end
    Versuche += 1
    
    if Versuche > 5 then 
        return false 
    end
    
    local Erfolg, ImBesitz = pcall(function()
        return MPS:UserOwnsGamePassAsync(Spieler.UserId, Id)
    end)
    
    if Erfolg and ImBesitz then
        table.insert(self.Gamepasses[Id], Spieler.UserId)
        return true
    end
    
    if not Erfolg then
        task.wait(math.random(15, 40))
        return self:BesitztGamepass(Spieler, Id, KaufAnbieten, Versuche)
    end
    
    if KaufAnbieten == true then
        MPS:PromptGamePassPurchase(Spieler, Id)
    end
    
    return false
end

return GamepassModul
← Back to timeline