a0sn
📎 1 file 4,123 chars
📄
pasted-code-1793014048613.txt
txt 82 lines
▶
# Minecraft VALORANT Complete Skript Generation Guide (kodari.ai)

This guide provides a single, all-in-one prompt that you can copy and paste directly into **kodari.ai** to generate a fully functional VALORANT game mode Skript compatible with both Java Edition and Bedrock Edition via GeyserMC.

---

## 1. Prerequisites (Server Setup)
Ensure your server is running **Paper** or **Purpur** (1.20+) with the following plugins installed:
* **Skript** (Core script plugin)
* **GeyserMC** + **Floodgate** (Cross-play support for Bedrock players)
* **SkBee** (Required for NBT tags, custom items, and GUI handling)

---

## 2. All-in-One Master Prompt for kodari.ai

Copy the entire block below and paste it into **kodari.ai**:

```text
Act as an expert Minecraft Skript developer. Create a single, fully functional, and highly optimized Skript (.sk) file that recreates VALORANT in Minecraft, fully compatible with GeyserMC and Bedrock players.

### KEY REQUIREMENTS & FEATURES:

1. GAME & ROUND SYSTEM:
   - Round flow: Warmup/Buy Phase (30s) -> Combat Phase (100s) -> Round End.
   - Teams: Attackers vs Defenders.
   - Win Conditions: Elimination of enemy team, successful Spike explosion (Attackers win), or successful Spike defuse/timeout (Defenders win).
   - Scoreboard showing score, round timer, team side, and player credits.

2. ECONOMY SYSTEM (Credits):
   - Starting credits: 800. Max credits: 9000.
   - Rewards: +200 per kill, +3000 for round win, +1900 for round loss, +300 for planting spike.
   - Buy Menu: Opened during Buy Phase via command /buy or holding a designated shop item (GUI using chest inventory).
   - Purchases: Guns (Vandal, Ghost), Heavy Shield (+50 armor), and Abilities.

3. GUNS & COMBAT (GeyserMC Friendly):
   - Guns implemented:
     - Ghost (Pistol): Moderate damage, single fire.
     - Vandal (Rifle): High damage, automatic fire on held right-click, high headshot multiplier.
   - Mechanics: Ammo limit, magazine reload system, raycast/particle projectiles.
   - Headshot detection: Extra damage if projectile hits upper body/head region.
   - Sounds/Effects: Use vanilla sound effects and standard particles (e.g., `particle flame`, `play sound "entity.generic.explode"`) so Bedrock players can see and hear them clearly without custom resource pack crashes.

4. AGENT ABILITIES (Simple Cross-Play Controls):
   - Jett:
     - Tailwind (Dash): Boosts player forward on right-click.
     - Cloudburst (Smoke): Launches a projectile that spawns a spherical particle cloud on impact.
   - Phoenix:
     - Hot Hands (Molly): Throws a fireball that creates a damaging flame pool on the ground.
     - Blaze (Wall): Spawns a line of fire blocking vision and dealing damage.
   - Controls: Triggered by right-clicking or sneak + right-clicking specific named items given at buy phase.

5. SPIKE SYSTEM (Plant & Defuse):
   - Spike Item: Nether Star named "&c&lSPIKE".
   - Planting: Attacker holding Spike must crouch and hold right-click inside designated site regions (Site A or Site B) for 4 seconds.
   - Defusing: Defender must crouch and right-click near the planted Spike for 7 seconds.
   - Explosion: 45-second timer after plant. Plays sound rate increase and creates a large explosion killing players nearby if detonated.

6. GEYSERMC & PERFORMANCE OPTIMIZATION:
   - Do NOT use `every 1 tick` loops for all players globally.
   - Use event-driven triggers (`on rightclick`, `on damage`, `on death`, `on join`).
   - Avoid complex NBT or packet-based animations that break on Bedrock.

Provide the complete, bug-free, copy-pasteable Skript code in a single response.
```

---

## 3. Installation & Reload Instructions

1. Copy the code generated by **kodari.ai**.
2. Open your server directory and go to:  
   `plugins/Skript/scripts/`
3. Create a new file named `valorant.sk` and paste the generated code into it.
4. Run the following command in-game or via console:
   ```text
   /sk reload valorant
   ```
5. If any errors appear in the console, copy the error message, paste it back into kodari.ai, and type:
   > `"Fix these Skript errors for me: [Paste Error Here]"`

---
Kodari AI
KodariOct 26 at 11:35 am 1
ValorantMCSkript
Creates a complete VALORANT-inspired game mode in Minecraft using Skript, compatible with both Java and Bedrock editions via GeyserMC. Implements a full round system with buy phase, combat phase, and round end, featuring an economy system with credits for purchasing weapons and abilities. Includes two fully functional guns (Ghost pistol and Vandal rifle) with ammo, reload mechanics, and headshot detection. Features Jett and Phoenix agent abilities with dash, smoke, molly, and wall skills. Implements a spike plant/defuse system with 45-second explosion timer and scoreboard tracking for team scores, round timers, and player credits. Optimized for performance using event-driven triggers instead of tick loops.

Place valorant.sk in plugins/Skript/scripts/. Set both team spawns and Site A/B with /valorant setspawn <attackers|defenders> and /valorant setsite <a|b>, then join teams and start with /valorant start. Reload it with /sk reload valorant. This uses vanilla arrows and built-in Skript effects; abilities are simplified area effects rather than full VALORANT projectiles or walls.

Created valorant.sk with team joining, round timers, credits and purchases, a buy menu, vanilla-arrow guns, simplified abilities, Spike planting/defusing, and elimination-based round wins.

Set team spawns and Sites A/B, then join teams and run /valorant start. Install the file in plugins/Skript/scripts/ and reload with /sk reload valorant. The abilities are simplified area effects, not full projectile-based VALORANT abilities.

Kodari can make mistakes. Review important code before using.
Files
valorant.sk
Code
1 445
valorant.sk
options:
    prefix: &c&lVALORANT &8» &r
    max-credits: 9000

on script load:
    set {v.phase} to "waiting"
    delete {v.planted}

command /valorant [<text>] [<text>]:
    trigger:
        if arg-1 is "join":
            if arg-2 is not "attackers" and arg-2 is not "defenders":
                send "{@prefix}&cUsage: /valorant join <attackers|defenders>" to player
                stop
            if {v.phase} is "buy" or {v.phase} is "combat":
                send "{@prefix}&cYou cannot change teams during a match." to player
                stop
            set {v.team::%uuid of player%} to arg-2
            if {v.credits::%uuid of player%} is not set:
                set {v.credits::%uuid of player%} to 800
            send "{@prefix}&aYou joined the &f%arg-2%&a team." to player
            stop

        if arg-1 is "start":
            if player does not have permission "valorant.admin":
                send "{@prefix}&cYou don't have permission." to player
                stop
            set {_attackers} to 0
            set {_defenders} to 0
            loop all players:
                if {v.team::%uuid of loop-player%} is "attackers":
                    add 1 to {_attackers}
                if {v.team::%uuid of loop-player%} is "defenders":
                    add 1 to {_defenders}
            if {_attackers} < 1 or {_defenders} < 1:
                send "{@prefix}&cAt least one online player is needed on each team." to player
                stop
            set {v.score::attackers} to 0
            set {v.score::defenders} to 0
            set {v.round} to 0
            startRound()
            stop

        if arg-1 is "setspawn":
            if player does not have permission "valorant.admin":
                send "{@prefix}&cYou don't have permission." to player
                stop
            if arg-2 is not "attackers" and arg-2 is not "defenders":
                send "{@prefix}&cUsage: /valorant setspawn <attackers|defenders>" to player
                stop
            set {v.spawn::%arg-2%} to location of player
            send "{@prefix}&aSet the &f%arg-2%&a spawn here." to player
            stop

        if arg-1 is "setsite":
            if player does not have permission "valorant.admin":
                send "{@prefix}&cYou don't have permission." to player
                stop
            if arg-2 is not "a" and arg-2 is not "b":
                send "{@prefix}&cUsage: /valorant setsite <a|b>" to player
                stop
            set {v.site::%arg-2%} to location of player
            send "{@prefix}&aSet Site %arg-2% here." to player
            stop

        if arg-1 is "help" or arg-1 is not set:
            send "&c&lVALORANT &7Commands:" to player
            send "&f/valorant join <attackers|defenders> &7- Join a team" to player
            send "&f/buy &7- Open the buy menu during buy phase" to player
            send "&f/valorant reload &7- Reload your weapon" to player
            send "&f/valorant start &7- Start a match (admin)" to player
            send "&f/valorant setspawn <attackers|defenders> &7- Set a spawn (admin)" to player
            send "&f/valorant setsite <a|b> &7- Set a plant site (admin)" to player
            stop

        if arg-1 is "reload":
            if {v.phase} is not "combat":
                send "{@prefix}&cYou can only reload during combat." to player
                stop
            if name of player's tool is "&fGhost":
                set {v.ammo::%uuid of player%::ghost} to 12
                send "{@prefix}&aGhost reloaded." to player
                stop
            if name of player's tool is "&fVandal":
                set {v.ammo::%uuid of player%::vandal} to 25
                send "{@prefix}&aVandal reloaded." to player
                stop
            send "{@prefix}&cHold a Ghost or Vandal to reload." to player
            stop

        send "{@prefix}&cUnknown subcommand. Use /valorant help." to player

command /buy:
    trigger:
        if {v.phase} is not "buy":
            send "{@prefix}&cThe buy menu is only available during the buy phase." to player
            stop
        set {_menu} to chest inventory with 3 rows named "&8VALORANT Buy Menu"
        set slot 10 of {_menu} to wooden sword named "&fGhost" with lore "&7Pistol | 12 rounds" and "&eCost: 500 credits"
        set slot 11 of {_menu} to iron sword named "&fVandal" with lore "&7Rifle | 25 rounds" and "&eCost: 2900 credits"
        set slot 12 of {_menu} to iron chestplate named "&9Heavy Shield" with lore "&7Heavy armor" and "&eCost: 1000 credits"
        set slot 14 of {_menu} to feather named "&bJett: Tailwind" with lore "&7Right-click for a speed burst" and "&eCost: 300 credits"
        set slot 15 of {_menu} to blue dye named "&bJett: Cloudburst" with lore "&7Right-click to blind nearby enemies" and "&eCost: 300 credits"
        set slot 16 of {_menu} to blaze powder named "&cPhoenix: Hot Hands" with lore "&7Right-click to damage nearby enemies" and "&eCost: 300 credits"
        set slot 22 of {_menu} to blaze rod named "&cPhoenix: Blaze" with lore "&7Right-click to hinder nearby enemies" and "&eCost: 300 credits"
        open {_menu} to player

on inventory click:
    if name of event-inventory is "&8VALORANT Buy Menu":
        cancel event
        if {v.phase} is not "buy":
            close player's inventory
            stop
        if clicked slot is 10:
            if {v.credits::%uuid of player%} < 500:
                send "{@prefix}&cYou need 500 credits." to player
                stop
            remove 500 from {v.credits::%uuid of player%}
            give player a wooden sword named "&fGhost"
            set {v.ammo::%uuid of player%::ghost} to 12
            send "{@prefix}&aPurchased Ghost." to player
        else if clicked slot is 11:
            if {v.credits::%uuid of player%} < 2900:
                send "{@prefix}&cYou need 2900 credits." to player
                stop
            remove 2900 from {v.credits::%uuid of player%}
            give player an iron sword named "&fVandal"
            set {v.ammo::%uuid of player%::vandal} to 25
            send "{@prefix}&aPurchased Vandal." to player
        else if clicked slot is 12:
            if {v.credits::%uuid of player%} < 1000:
                send "{@prefix}&cYou need 1000 credits." to player
                stop
            remove 1000 from {v.credits::%uuid of player%}
            give player an iron chestplate named "&9Heavy Shield"
            send "{@prefix}&aPurchased Heavy Shield." to player
        else if clicked slot is 14:
            if {v.credits::%uuid of player%} < 300:
                send "{@prefix}&cYou need 300 credits." to player
                stop
            remove 300 from {v.credits::%uuid of player%}
            give player a feather named "&bJett: Tailwind"
            send "{@prefix}&aPurchased Tailwind." to player
        else if clicked slot is 15:
            if {v.credits::%uuid of player%} < 300:
                send "{@prefix}&cYou need 300 credits." to player
                stop
            remove 300 from {v.credits::%uuid of player%}
            give player a blue dye named "&bJett: Cloudburst"
            send "{@prefix}&aPurchased Cloudburst." to player
        else if clicked slot is 16:
            if {v.credits::%uuid of player%} < 300:
                send "{@prefix}&cYou need 300 credits." to player
                stop
            remove 300 from {v.credits::%uuid of player%}
            give player a blaze powder named "&cPhoenix: Hot Hands"
            send "{@prefix}&aPurchased Hot Hands." to player
        else if clicked slot is 22:
            if {v.credits::%uuid of player%} < 300:
                send "{@prefix}&cYou need 300 credits." to player
                stop
            remove 300 from {v.credits::%uuid of player%}
            give player a blaze rod named "&cPhoenix: Blaze"
            send "{@prefix}&aPurchased Blaze." to player

function startRound():
    add 1 to {v.round}
    set {v.phase} to "buy"
    set {v.timer} to 30
    delete {v.planted}
    delete {v.spike.location}
    loop all players:
        if {v.team::%uuid of loop-player%} is set:
            delete {v.dead::%uuid of loop-player%}
            clear loop-player's inventory
            set loop-player's gamemode to survival
            set loop-player's health to 20
            set loop-player's food level to 20
            set {_team} to {v.team::%uuid of loop-player%}
            if {v.spawn::%{_team}%} is set:
                teleport loop-player to {v.spawn::%{_team}%}
            if {_team} is "attackers":
                give loop-player a nether star named "&c&lSPIKE"
            set score of "&eCredits" in sidebar of loop-player to {v.credits::%uuid of loop-player%}
            set score of "&fRound" in sidebar of loop-player to {v.round}
            if {_team} is "attackers":
                set score of "&cAttackers" in sidebar of loop-player to 1
            else:
                set score of "&bDefenders" in sidebar of loop-player to 1
            set score of "&6Timer" in sidebar of loop-player to 30
            send "{@prefix}&eRound %{v.round}% begins. Buy phase: 30 seconds." to loop-player

    loop 30 times:
        if {v.phase} is not "buy":
            stop
        set {v.timer} to 31 - loop-number
        loop all players:
            if {v.team::%uuid of loop-player%} is set:
                set score of "&eCredits" in sidebar of loop-player to {v.credits::%uuid of loop-player%}
                set score of "&6Timer" in sidebar of loop-player to {v.timer}