Need help with basic buying system

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JadeInnit1

Member
Oct 3, 2022
14
0
1
Hello everyone again! This is a bit of an odd situation again but I'll give you a rundown. I am trying to make a skript where if you click on a sign it will check how much money you have and if you have more than the specified money it will allow you to click the block underneath it which in turn gives you more money.

I have some idea of how to pull this off, my best guess would be to use the sk-perm and a if statement but other than that I am beyond confused.

Code at the moment is looking like this
Code:
options:
    
    balance: 0
    starting_money: 0
    minium_money: 0
    maxium_money:1000000000000
    
on rightclick on dirt:
   message "&A+1$"
   add 1 to player's balance

command /balance:
    trigger:
        send "&ABalance: &C%player's balance%"

on left click on spruce sign:
    message "You are about to buy this, left click again to buy"
    
if %player's balance% is less than 500
    "You don't have enough money! Do /bal to see how much money you have"
else
message "You've brought it!"

There are 4 errors which I don't know how to fix and they are all the same "all code has to be put into trigger" these errors are in line 19, 20, 21 and 22

Like always any and all help is appreciated!
 
Code:
on left click on spruce sign: #<- this is trigger, a.k.a event section
    message "You are about to buy this, left click again to buy"
  
    if %player's balance% is less than 500: # <- this is condition section, we put this inside event sections with 'tab' or 'space' symbols
        "You don't have enough money! Do /bal to see how much money you have"
    else:
        message "You've brought it!"
 
Status
Not open for further replies.