M_kane3
Roblox scripter · Luau
Hey! I mostly script the server side of games: saving player data, stopping exploiters, NPCs, and the math behind combat stuff. Here are some of my scripts with notes on how they work. Feel free to look through them.
Scripts
- PlayerDataService: session-locked data saving
- SecureRemote: rate limiting and checks for remotes
- GuardAI: NPC that patrols, chases and attacks
- TerrainGenerator: procedural island terrain
- Ballistics: projectile aiming math
- Spring: damped spring for camera and UI
PlayerDataService
ModuleScript · ServerScriptService
Saves player data with a session lock, so two servers can never write the same profile at once (that's how a lot of item dupes happen). It uses UpdateAsync instead of SetAsync, retries with backoff when DataStores throttle, and upgrades old save formats one version at a time.
SecureRemote
ModuleScript · ServerScriptService
Every RemoteEvent on the server goes through this. It rate-limits each player with a token bucket (5 per second, bursts of 10) and checks every argument's type. It also rejects NaN and infinity, which a lot of games forget about.
GuardAI
ModuleScript · ServerScriptService
A state machine for a guard NPC: Patrol, Chase, Attack. It spots players with a vision cone (dot product) and a raycast so it can't see through walls. It only recomputes its path when the target has moved more than 6 studs, because ComputeAsync is slow.
TerrainGenerator
Script · ServerScriptService
Makes a 256×256 stud island from a few layers of noise, then picks sand, grass, rock or snow for each column from its height and how steep it is. Water only replaces air, so it doesn't wipe the land underneath.
Ballistics
ModuleScript · ReplicatedStorage
Works out what angle to fire at to hit a target at a set speed. There are usually two answers, a low arc and a high one. It can also lead moving targets, and it draws the exact arc with one Beam, since a parabola fits a Beam's curve perfectly.
Spring
ModuleScript · ReplicatedStorage
A damped spring for camera sway, viewmodels and UI. It's solved exactly instead of stepped every frame, so it moves the same at any FPS and can't blow up on a lag spike. Works with numbers and Vector3s.
Contact
Message me if you need a scripter.
- Discord: Ck100_16
- Roblox: @M_kane3
- DevForum: M_kane3