For somereason the script is not checking if the user owns the gamepass… End of script ish
script.Parent.MouseButton1Click:Connect(function()
local MarketplaceService = game:GetService("MarketplaceService")
local GamepassID = 811991574 -- Change to your Gamepass ID
local HasPass
local Player = game.Players.LocalPlayer
local Event = game.ReplicatedStorage.Equip.InvisAxe
if axetype.Value == true then
if script.Parent.Parent.Equiped.Value == false then
print("asd")
script.Parent.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
script.Parent.UIStroke.Color = Color3.fromRGB(221, 0, 0)
script.Parent.Text = "UNEQUIP"
unequipall()
ClearTools()
GiveTool()
script.Parent.Parent.Equiped.Value = false
script.Parent.ImageLabel.Visible = false
else
script.Parent.Parent.Equiped.Value = false
script.Parent.ImageLabel.Visible = false
print("hgas")
script.Parent.BackgroundColor3 = Color3.fromRGB(0, 221, 255)
script.Parent.UIStroke.Color = Color3.fromRGB(0, 169, 221)
script.Parent.Text = "EQUIP"
ClearTools()
end
else
if MarketplaceService:UserOwnsGamePassAsync(Player.UserId, GamepassID) then
print("asda")
Event:FireServer()
else
MarketplaceService:PromptGamePassPurchase(Player, GamepassID)
print("bas")
end
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer