Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ประกาศตัวแปร market เพื่อเก็บการเรียกใช้บริการ MarketplaceService ในเกม
- local market = game:GetService("MarketplaceService")
- -- ประกาศตัวแปร id เพื่อเก็บ ID ของ GamePass ที่ต้องการโปรโมท
- local id = 1234567
- -- เริ่มลูปที่ไม่มีที่สิ้นสุด
- while true do
- -- วนลูปผ่านผู้เล่นทุกคนในเกม
- for _, v in pairs(game.Players:GetPlayers()) do
- -- ตรวจสอบว่าผู้เล่น v มีค่าอยู่หรือไม่
- if v then
- -- กระตุ้นให้ผู้เล่น v ทำการซื้อ GamePass ที่มี ID ตามตัวแปร id
- market:PromptGamePassPurchase(v, id)
- -- รอเวลา 10 วินาที ก่อนที่จะวนลูปไปยังผู้เล่นคนถัดไป
- wait(10)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement