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

How would i make it so people get +25% of what they are receiving? [closed]

Asked by
Vxpper 101
5 years ago

Here's my code:

Also, the FireServer is underlined, why is that?

local remote = game:GetService("ReplicatedStorage"):WaitForChild("BankRobberySuccess")
local id = 4905027

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        if player.Robbing.Value == true then
            game.ReplicatedStorage.HideRobberyGUI:FireClient(player)
            player.leaderstats.Money.Value = player.leaderstats.Money.Value + player.CashCollected.Value
            player.CashCollected.Value = 0
            player.Robbing.Value = false
            if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then
                player.CashCollected.Value = player.CashCollected.Value + 20%
            remote:FireServer("B4NK")
            end
        end
    end
end)
0
value + (value * .25) Vulkarin 581 — 5y
0
or value * 1 . 25 Firedan1176 29 — 5y
0
Thank you Vxpper 101 — 5y
0
Nevermind, not working Vxpper 101 — 5y
0
Don't come on this site with alvinbloxx's code, expecting for it to be fixed. User#19524 175 — 5y

Closed as Not Constructive by User#19524

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?