Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i add a equip system to my script?

Asked by 4 years ago
local replicatedStorage = game:GetService("ReplicatedStorage")
local shopItems = game:GetService("ServerStorage"):WaitForChild("ShopItems") -- Where tools are held


replicatedStorage.GetInfo.OnServerInvoke = function(player,item)
    return shopItems[item].Points.Value
end


replicatedStorage.CheckSale.OnServerInvoke = function(player,item)

    local price = shopItems[item].Points.Value

    if player.leaderstats.Cash.Value >= price then

        player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - price

        local gear = shopItems[item][item]:Clone()
        gear.Parent = player.StarterGear

        local gear = shopItems[item][item]:Clone()
        gear.Parent = player.Backpack

        return true

    else

        return false    

    end



end

how would I add an owned feature so when you buy it doesn't need to be purchased again and has a text equip/equipped?

0
datastore Vortex_Vasne 89 — 4y

Answer this question