#/withdraw
1 messages · Page 1 of 1 (latest)
thats still not making it lol
and whoever you stole it from used AI
I stole this skript but it doesnt work
` command /withdraw <number>:
trigger:
set {_amount} to arg-1
if {_amount} is not a number:
send "&cInvalid amount!" to player
stop
if {_amount} < 1:
send "&cYou must withdraw at least $1!" to player
stop
set {_balance} to player's balance # Get real balance using Vault
if {_amount} > {_balance}:
send "&cYou don't have enough money!" to player
stop
remove {_amount} from player's balance # Correct Vault usage to remove money
give player a paper named "&a$%{_amount}% Bill"
send "&aYou withdrew $%{_amount}%!" to player
on right click:
if player's tool is a paper:
set {_name} to name of player's tool
replace "&a$" with "" in {_name} # Remove color code and $
replace " Bill" with "" in {_name} # Remove the word 'Bill'
if {_name} is a number:
set {_amount} to {_name} parsed as number
add {_amount} to player's balance # Using Vault to add balance
remove 1 of player's tool from player's inventory
send "&aYou redeemed $%{_amount}%!" to player
else:
send "&cThis bill is invalid!" to player `
oh
but do you know the correct way to do it?
what are we supposed to do that? we are here to provide a bit of guidance, but if you are copy-pasting code because dont know anything about skript any advice we give wont to be of too much help.