-
Notifications
You must be signed in to change notification settings - Fork 0
/
UGC giver.lua
39 lines (28 loc) · 954 Bytes
/
UGC giver.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--[[
!! Installation guide
Put this script under the sign/button's model
The script will search for a ClickDetector
Change the ItemID variable to be the id of the UGC
- Depso
]]
--// Configuation
local ItemID = 00000
-- local MiniumTime = 1200
-- local MiniumStage = 12
--// Services
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
--// Modules
-- local Depso = workspace.Depso
-- local Modules = Depso.Modules
-- local Leaderstats = require(Modules.Leaderstats)
local Sign = script.Parent
local ClickDetector = Sign:FindFirstChild("ClickDetector", true)
ClickDetector.MouseClick:Connect(function(Player)
-- local Stage = Leaderstats:GetValue(Player, "Stage")
-- local Time = Leaderstats:GetValue(Player, "Time")
--// Checks
-- if Time < MiniumTime then return end
-- if Stage < MiniumStage then return end
MarketplaceService:PromptPurchase(Player, ItemID)
end)