1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Please help me with this

Discussion in 'Skript' started by gamer_YT762, Jun 9, 2021.

Thread Status:
Not open for further replies.
  1. gamer_YT762

    gamer_YT762 Member

    Joined:
    Jun 9, 2021
    Messages:
    19
    Likes Received:
    0
    Hey! I made a server on minehut, and everything worked. I put another code in, and its started not working. upload_2021-6-9_15-16-36.png
    please help. (problem in the upgrades line) CODE:

    on inventory click:
    if name of event-inventory is "Click Test":
    cancel event
    if index of event-slot = 0:
    cancel event
    set {%player%.clickpointsrb} to {%player%.pointsperclick} * {%player%.rb}
    set slot 0 of clicked inventory to 1 stone named "Points: %{%player%.points}%"
    send "You got %{%player%.clickpointsrb}% point(s)"
    add {%player%.clickpointsrb} to {%player%.points}
    #--------------------------------------#
    #----------UPGRADES----------#
    #--------------------------------------#
    if index of event-slot = 9:
    cancel event
    send "&6This line is the upgrades."

    if index of event-slot = 10:
    cancel event
    if {%player%.points} is more than 100:
    remove 100 from {%player%.points}
    add 1 to {%player%.pointsperclick}
    send "&6successfully bought 1 farm!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 11:
    cancel event
    if {%player%.points} is more than 450:
    remove 450 from {%player%.points}
    add 5 to {%player%.pointsperclick}
    send "&6successfully bought 1 house!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 12:
    cancel event
    if {%player%.points} is more than 4500:
    remove 4500 from {%player%.points}
    add 25 to {%player%.pointsperclick}
    send "&6successfully bought 1 grandma!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 13:
    cancel event
    if {%player%.points} is more than 10000:
    remove 10000 from {%player%.points}
    add 100 to {%player%.pointsperclick}
    send "&6successfully bought 1 grandpa!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 14:
    cancel event
    if {%player%.points} is more than 500000:
    remove 500000 from {%player%.points}
    add 750 to {%player%.pointsperclick}
    send "&6successfully bought 1 factory!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 15:
    cancel event
    if {%player%.points} is more than 2500000:
    remove 2500000 from {%player%.points}
    add 2000 to {%player%.pointsperclick}
    send "&6successfully bought 1 company!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 16:
    cancel event
    if {%player%.points} is more than 15000000:
    remove 15000000 from {%player%.points}
    add 5000 to {%player%.pointsperclick}
    send "&6successfully bought roblox!"
    else:
    send "&cYou dont have enough points to buy this."

    if index of event-slot = 17:
    cancel event
    if {%player%.points} is more than 150000000:
    remove 150000000 from {%player%.points}
    add 25000000 to {%player%.pointsperclick}
    send "&6successfully bought minecraft!"
    else:
    send "&cYou dont have enough points to buy this."
     
  2. nicolas toledo

    Joined:
    Mar 29, 2020
    Messages:
    28
    Likes Received:
    0
    change:
    "if index of event-slot = 17:"

    for this:
    if clicked slot is 17:
     
  3. gamer_YT762

    gamer_YT762 Member

    Joined:
    Jun 9, 2021
    Messages:
    19
    Likes Received:
    0
    it works, thanks :emoji_slight_smile:
     
  4. nicolas toledo

    Joined:
    Mar 29, 2020
    Messages:
    28
    Likes Received:
    0
    great !, select it as the best answer please!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...