#Kinda need some scripting help with Leaderstats

20 messages · Page 1 of 1 (latest)

fallen nexus
#

I have two scripts in the model, one which gives the tool and another which takes the mones out of the players leaderstats

#

local MP5K = script.Parent
local click = MP5K.ClickDetector

local function addClick(player)
player.leaderstats.Mone.Value = player.leaderstats.Mone.Value -500
if player.leaderstats.Mone.Value = >500 then (this is what i need help with idk what to put here)

end

end

click.MouseClick:Connect(addClick)

wait(30)

#

//////////////////////////////////////////////////////////////////////////
/\ above script works, but i just want it to stop another script (which shld be below) from working if the player has less than the amount needed
/////////////////////////////////////////////////////////////////////////

#

local tool = game.ReplicatedStorage.MP5K
script.Parent.ClickDetector.mouseClick:connect(function(plr)
local klone = tool:Clone()
klone.Parent = plr.Backpack
end)

timber hinge
#

if money >= 500 then money-=500 dobuystuff() end

fallen nexus
fallen nexus
timber hinge
fallen nexus
timber hinge
#

wHeRe dO i PuT tHaT derp i'm out bruz

#

ask ai or wait for someone else sorry

fallen nexus
#

my bad for not being an expert

fallen nexus
hard fable
#

you deserve a break

fallen nexus
#

holy

#

i js realised i can merge the giver script

#

with

#

im so stupid