Syntax
SquidScript Syntax
SquidScript uses Lua's syntax, making it easy to learn if you're familiar with Lua programming. If you're new to Lua, this guide will help you get started.
Basic Syntax
lua-- This is a comment local message = "Hello from SquidScript!" -- Variables print(message) -- Function calls -- Basic math operations local x = 10 local y = 5 local sum = x + y
Functions
lua-- Function definition function greet(name) return "Hello, " .. name end -- Using functions local greeting = greet("Player")
Tables (Arrays/Objects)
lua-- Creating a table local settings = { enabled = true, speed = 1.5, name = "MyModule" } -- Accessing table values print(settings.enabled)
Commonly Used SquidScript Examples
lua-- Enabling a module squidhack.client.toggleModule("XCarry") -- Getting player position local position = mc.player.getPosition() if position ~= nil then print("Player Position: X=" .. position[1] .. ", Y=" .. position[2] .. ", Z=" .. position[3]) else print("Player not found.") end
Resources
- Official Lua Documentation
- Join our Discord for more examples and community scripts
- Check the SquidScript API documentation for all available functions
Note: SquidScript is still in development. More features and documentation will be added as we approach release.