Beach Circle, Ball Carts & Drinks
The casual half of the resource. No court, no referee, no lobby, just a ball and some people standing near you.
This half needs ox_inventory. Using an item is the entry point, so a server with no inventory has no item to use. Everything else in the script is unaffected. The four item rows to paste are in inventory/ox_inventory_items.lua and their icons in inventory/images/, see Installation.
Take a ball from the cart
A ball cart stands at every point the server has placed one, loaded with a ball in each slot: eleven as shipped. Target it, or press E beside it, and you get a volleyball. The ball you take really leaves the cart, on every screen.
- Balls come out top-down, strictly in the order the load is written: rows one to five are the upper layer, six to eleven the lower one.
- Stock is server-owned; one cart, one answer, the same on every screen, and it survives clients reconnecting.
- An empty cart restocks all at once after
refillSeconds(40 as shipped;0orfalsemeans never). Only a cart that ran completely out ever refills, so a low cart is never quietly topped up while somebody is standing at it. - You can carry one at a time (
maxCarry).
Admins place carts from the builder's Decorations tab, or set fixed positions in Config.BallCarry.points. A placed cart is a working pickup point, not scenery: same load, same stock, same restock, no config edit and no restart. Set slots = {} for a plain container with no visible stack and no limit.
The beach circle
Use a volleyball from your inventory and invite anybody standing nearby, up to six people. Each of them gets a prompt and has to accept, and a ring forms where you are standing: two players face each other, three or more make a circle. No court, no referee and no lobby.
There are two things to play:
- The passing circle. Keep the ball up between you for as long as you can. No score and no winner, just one shared counter of consecutive touches; the ball hitting the sand ends the rally, banks the best streak and starts the next one.
- Five Smash. The knockout game. You spike at somebody by name, and a player hit by a spike is out. Spike on the wrong touch count and you get a warning; collect too many and you are out for that instead. It needs a few players to be worth starting, and it runs until only the last of you are standing.
However you are playing it, the touch works the same way:
- Look at somebody and press E. Every touch is addressed to a person; the server solves an arc that arrives over them. Hitting into empty space is how a rally ends.
- Hold E for height, not for power. A tap is a flat, fast ball that lands just past them; a full hold is a lob that gives them almost a second more to read it. The solve stays exact either way.
- Time it. Press while the ball is still out at arm's reach and you play a one-arm dig, the only touch that costs stamina. Wait for it to drop into your hands and you get a clean two-handed set. That is the whole skill, and it is the same reach rule a match uses.
- You are anchored to your spot facing the middle, with about a metre of room to step under the ball.
- The ball is the big inflatable beach ball, not the match volleyball.
- Whoever leaves or disconnects is closed over at the next reset; below two players the ring breaks up. Nobody can join a ring once it has started, and nobody in a ring can join a match, or the other way round.
Config.Freeplay controls the ring: how far apart neighbours stand, maxPlayers (6), the invite radius (20 m) and how long an invite stays open (20 s).
The drinks
Three cans, bought from a cool box and drunk before a match. Each bends the stamina economy for a set time from the whistle, not from the sip, so walking slowly to the referee cannot waste it.
| Drink | What it does | Lasts | |
|---|---|---|---|
| Sprunk Lite | Fuel Higher | Cheaper serves, slightly faster regeneration | 4 min |
| eCola Xtreme | Go Harder | Run faster and further, and your serve will feel it | 3 min |
| Raine Overdrive | Nothing Held Back | Everything except serving: cheap lunges, half the sprint drain, but it starts you half empty | 2 min |
The ladder is deliberate: one drink is cheap and nearly useless, two buys something real and charges for it, three buys three real things and charges twice, once before the whistle even goes. The strongest drink gets the shortest window.
One drink at a time, and the server enforces it. Before the whistle, a different drink swaps your bet and the notification says what it replaced. The same drink again is refused and the can stays in your pocket. Mid-match is refused outright. Drinks never stack and are never silently spent.
The cool box
The shop is ox_inventory's own, so it knows about money and this script does not. Place one from the builder's Decorations tab and it becomes a shop; target it and buy. Prices are Config.Drinks.shop.prices, 15, 45 and 90 as shipped.
Switching a drink off takes it out of the game, not out of the shop. enabled = false on a drink means the cool box stops stocking it, the server refuses to let anyone drink it, and a can bought yesterday does nothing when used. That is deliberate: a half-disabled drink that can still be drunk by whoever already owns one is a balance change that never takes effect.
Renaming the items
The item names are yours. The ball is Config.BallCarry.item and the drinks are the keys of Config.Drinks.items, whose values are the script's own effect ids and never appear in items.lua at all. Rename a can in one file and rename it in the other; a name that exists in only one of the two is an item that silently does nothing when used. A renamed item also needs an icon under its new name, or the slot draws blank.