-- CYBERWARE SYSTEM v3 (LocalScript -> StarterPlayerScripts or StarterGui)
-- R6 character recommended (R15 works best-effort)
-- v3 adds: rarity system, mobility arsenal, skeleton / circulatory / face implants, quests,
-- materials, crafting + blueprints, expanded Ripperdoc shop, per-implant mastery.
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local Lighting = game:GetService("Lighting")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local GuiService = game:GetService("GuiService")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local camera = workspace.CurrentCamera
-- ==========================================
-- CONFIG
-- ==========================================
DESTROY_KEY = Enum.KeyCode.P
STEP_DISTANCE_REQUIRED = 4
BASE_HEALTH = 100
BASE_STAMINA = 100
BASE_REGEN = 14
BASE_REGEN_DELAY = 1.2
SANDEVISTAN_START_COST = 20
SANDEVISTAN_DRAIN = 10
SANDEVISTAN_MAX_TIME = 6
IMPLANT_TIME = 10
IMPLANT_INJURY_CHANCE = 0.7
IMPLANT_INJURY_DAMAGE = 25
IMPLANT_INJURY_CAN_KILL = false
GUN_BASE_AMMO = 6
GUN_BASE_RELOAD = 3
GUN_KNOCKBACK = 70
GUN_FIRE_DELAY = 0.2
-- walking loot (materials + blueprint discoveries)
STEP_DROP_CHANCE = 0.04
BLUEPRINT_DISCOVERY_CHANCE = 0.0006
-- ==========================================
-- RARITY SYSTEM
-- PriceMult -> eddies price of new cyberware
-- ExtraLevels -> extra upgrade levels on every upgrade of that implant (upgrade potential)
-- MasteryMult -> usage needed per mastery level (item progression)
-- ==========================================
RARITY_ORDER = { "Common", "Uncommon", "Rare", "Epic", "Legendary", "Iconic" }
RARITY = {
Common = { Rank = 1, Name = "COMMON", Color = Color3.fromRGB(160, 165, 170), PriceMult = 1, ExtraLevels = 0, MasteryMult = 0.7 },
Uncommon = { Rank = 2, Name = "UNCOMMON", Color = Color3.fromRGB(80, 220, 110), PriceMult = 1.5, ExtraLevels = 0, MasteryMult = 0.85 },
Rare = { Rank = 3, Name = "RARE", Color = Color3.fromRGB(70, 140, 255), PriceMult = 2.5, ExtraLevels = 1, MasteryMult = 1.0 },
Epic = { Rank = 4, Name = "EPIC", Color = Color3.fromRGB(180, 90, 255), PriceMult = 5, ExtraLevels = 1, MasteryMult = 1.3 },
Legendary = { Rank = 5, Name = "LEGENDARY", Color = Color3.fromRGB(255, 200, 40), PriceMult = 10, ExtraLevels = 2, MasteryMult = 1.7 },
Iconic = { Rank = 6, Name = "ICONIC", Color = Color3.fromRGB(255, 50, 60), PriceMult = 20, ExtraLevels = 3, MasteryMult = 2.2 },
}
MASTERY_BASE = { 0, 8, 25, 55, 100 } -- uses needed for level 1..5 (before rarity multiplier)
-- ==========================================
-- MATERIALS
-- Currency: "steps" / "eddies" = sold at the Ripperdoc, nil = quest / loot only
-- DropWeight = chance weight when walking (higher rarity = much rarer)
-- ==========================================
MATERIALS = {
{ Id = "ScrapMetal", Name = "Scrap Metal", Rarity = "Common", Currency = "steps", Price = 20, Qty = 5, DropWeight = 60 },
{ Id = "CopperWiring", Name = "Copper Wiring", Rarity = "Common", Currency = "steps", Price = 25, Qty = 5, DropWeight = 28 },
{ Id = "TitaniumAlloy", Name = "Titanium Alloy", Rarity = "Uncommon", Currency = "steps", Price = 80, Qty = 2, DropWeight = 9 },
{ Id = "HydraulicComponents", Name = "Hydraulic Components", Rarity = "Rare", Currency = "eddies", Price = 120, Qty = 1, DropWeight = 1.5 },
{ Id = "NeuralProcessor", Name = "Neural Processor", Rarity = "Rare", Currency = "eddies", Price = 150, Qty = 1, DropWeight = 1 },
{ Id = "SyntheticOxygenCells", Name = "Synthetic Oxygen Cells", Rarity = "Rare", Currency = "eddies", Price = 130, Qty = 1, DropWeight = 1 },
{ Id = "QuantumCircuit", Name = "Quantum Circuit", Rarity = "Epic", Currency = "eddies", Price = 600, Qty = 1, DropWeight = 0.1 },
{ Id = "ExperimentalCore", Name = "Experimental Core", Rarity = "Legendary", DropWeight = 0 },
{ Id = "PrototypeChip", Name = "Prototype Chip", Rarity = "Iconic", DropWeight = 0 },
}
MAT_BY_ID = {}
for _, m in ipairs(MATERIALS) do MAT_BY_ID[m.Id] = m end
-- builds a new eddies-priced implant: price from rarity, blueprint for Epic+, shop parts = half the recipe
function mk(def)
local r = RARITY[def.Rarity]
def.Type = "Cyber"
def.Eddies = math.floor(def.Base * r.PriceMult)
def.Blueprint = r.Rank >= 4
def.ShopMats = {}
for m, n in pairs(def.Recipe) do def.ShopMats[m] = math.ceil(n * 0.5) end
return def
end
-- Cyberware + gear database. Type: Cyber / Item / Clothing
ITEMS = {
{
Id = "Dasher", Name = "Dasher", Type = "Cyber", Category = "LEGS", Zone = "Legs", Rarity = "Uncommon", Hold = true,
Key = Enum.KeyCode.G, KeyText = "G", Cost = 60, Cooldown = 2.5, StaminaCost = 30,
Materials = { "THRUSTER NOZZLES", "TITANIUM GREAVES", "IGNITION CELLS", "COOLANT GEL", "NEURAL LINK" },
Special = "Ion Recycler: launching refunds half the stamina cost.",
Desc = "Rocket-thruster leg frames. HOLD [G] to charge - at 100% you are blasted forward through the air.",
},
{
Id = "LaunchCannon", Name = "Launch Cannon", Type = "Cyber", Category = "ARMS", Zone = "Arms", Rarity = "Rare",
Key = Enum.KeyCode.F, KeyText = "F", Cost = 150, Cooldown = 4.0, StaminaCost = 40,
Materials = { "ARMOR SLEEVE", "CHARGE CORES", "BARREL ALLOY", "MONOWIRE", "RECOIL DAMPENER" },
Special = "Twin Charge: an airburst adds extra lift after liftoff.",
Desc = "Projectile launch system arm cannon. Fires an explosive blast to launch you skyward.",
},
{
Id = "MantisBlades", Name = "Mantis Blades", Type = "Cyber", Category = "ARMS", Zone = "BothArms", Rarity = "Epic",
Key = Enum.KeyCode.E, KeyText = "E", Cost = 220, Cooldown = 0.9, StaminaCost = 15,
Materials = { "FOREARM HOUSINGS", "MONOMOLECULAR EDGE", "SERVO RAILS", "SHOCK ABSORBERS", "NEURAL LINK" },
Special = "Monowire Siphon: slashes refund half their stamina.",
Desc = "Retractable forearm blades. Press [E] (or click with no gun drawn) to slash - every slash lunges you forward.",
},
{
Id = "Sandevistan", Name = "Sandevistan", Type = "Cyber", Category = "OPERATING SYSTEM", Zone = "Spine", Rarity = "Legendary",
Key = Enum.KeyCode.Q, KeyText = "Q", Cost = 300, Cooldown = 3.0, StaminaCost = SANDEVISTAN_START_COST,
Materials = { "SPINE LATTICE", "NEURAL SPLICE", "COOLANT TUBES", "MONOWIRE", "BOOST CHIP" },
Special = "Afterglow: ending the overdrive refunds 20 stamina.",
Desc = "Military-grade spine implant. +40 LoopSpeed, green screen overload, speed lines & afterimages. Drains stamina while active.",
},
{
Id = "SynLungs", Name = "Syn Lungs", Type = "Cyber", Category = "CIRCULATORY SYSTEM", Zone = "Chest", Passive = true, Rarity = "Epic",
Cost = 250,
Materials = { "ALVEOLAR MESH", "OXYGEN CELLS", "BIO-POLYMER", "PRESSURE VALVES", "NEURAL LINK" },
Special = "Second Wind: stamina regeneration starts twice as fast.",
Desc = "Synthetic lungs. PASSIVE: +200 max stamina, much faster stamina regeneration, and +200 max HP (300 total).",
},
{
Id = "Pistol", Name = "Pistol", Type = "Item", Cost = 100, Rarity = "Common",
Desc = "Sidearm. Select it in the item hotbar to enter the ready stance. Click to shoot (6 rounds, 3s reload, [R] to reload). Every shot kicks you backward.",
},
{
Id = "DavidJacket", Name = "David's Jacket", Type = "Clothing", Cost = 180, Rarity = "Rare",
Desc = "Cropped white edgerunner jacket with yellow trim and the back emblem. PASSIVE: +50 max HP and +72 max stamina.",
},
-- ===== MOBILITY ARSENAL =====
mk{
Id = "GrappleLauncher", Name = "Grapple Launcher", Short = "Grapple", Category = "HANDS", Zone = "LeftHand", Rarity = "Rare", Base = 100,
Key = Enum.KeyCode.H, KeyText = "H", Cooldown = 3.0, StaminaCost = 20,
Materials = { "HOOK HEAD", "REEL DRUM", "MONOFILAMENT", "WRIST MOUNT", "NEURAL LINK" },
Recipe = { ScrapMetal = 10, CopperWiring = 8, TitaniumAlloy = 4, HydraulicComponents = 2 },
Special = "Slingshot: releasing at the anchor fires you up and forward.",
Desc = "Wrist hook gun. Press [H] to fire at your crosshair and reel yourself to the anchor. Press [H] again to release.",
},
mk{
Id = "RocketFist", Name = "Rocket Fist", Short = "Rocket Fist", Category = "HANDS", Zone = "RightHand", Rarity = "Epic", Base = 110,
Key = Enum.KeyCode.X, KeyText = "X", Cooldown = 3.5, StaminaCost = 30,
Materials = { "GAUNTLET SHELL", "ROCKET MOTOR", "IMPACT PLATE", "FUEL CELL", "NEURAL LINK" },
Recipe = { TitaniumAlloy = 6, HydraulicComponents = 4, NeuralProcessor = 2, QuantumCircuit = 1 },
Special = "Chain Rocket: a second blast follows the first.",
Desc = "Rocket-propelled punch. [X] fires where you aim: a surface blast launches you away, open air thrusts you forward.",
},
mk{
Id = "ShoulderThrusters", Name = "Shoulder Thrusters", Short = "Thrusters", Category = "INTEGUMENTARY SYSTEM", Zone = "Shoulders", Rarity = "Legendary", Base = 130,
Key = Enum.KeyCode.Z, KeyText = "Z", Hold = true, Cooldown = 1.5, StaminaCost = 8,
Materials = { "JET PODS", "TITANIUM STRUTS", "FUEL LINES", "VECTOR NOZZLES", "NEURAL LINK" },
Recipe = { TitaniumAlloy = 8, HydraulicComponents = 5, QuantumCircuit = 3, ExperimentalCore = 1 },
Special = "Afterburner: the first 0.4s of thrust has double power.",
Desc = "Shoulder jet pods. HOLD [Z] to climb and hover; move to vector your thrust. Drains stamina while firing.",
},
mk{
Id = "DashKatana", Name = "Dash Katana", Short = "Katana", Category = "ARMS", Zone = "Hip", Rarity = "Epic", Base = 100,
Key = Enum.KeyCode.C, KeyText = "C", Cooldown = 1.6, StaminaCost = 18,
Materials = { "MONO-EDGE BLADE", "SERVO SHEATH", "KINETIC COIL", "GRIP WEAVE", "NEURAL LINK" },
Recipe = { TitaniumAlloy = 6, CopperWiring = 10, NeuralProcessor = 3, QuantumCircuit = 1 },
Special = "Phantom Chain: chained dashes cut the cooldown in half.",
Desc = "Mono-edged katana. Press [C] for an iaido dash toward your aim, works mid-air. Chain dashes within 1.4s for extra reach.",
},
mk{
Id = "RailgunBoots", Name = "Railgun Boots", Short = "Railgun", Category = "LEGS", Zone = "Feet", Rarity = "Legendary", Base = 120,
Key = Enum.KeyCode.B, KeyText = "B", Cooldown = 6, StaminaCost = 45,
Materials = { "RAIL COILS", "HEEL CANNONS", "CAPACITOR BANK", "SLUG MAGAZINE", "NEURAL LINK" },
Recipe = { TitaniumAlloy = 10, HydraulicComponents = 6, QuantumCircuit = 4, ExperimentalCore = 1 },
Special = "Overcharge: the rail launch lasts 0.12s longer.",
Desc = "Rail-accelerated boots. Press [B] to fire rail slugs and launch along your exact aim, up or down, at extreme speed.",
},
mk{
Id = "KineticBoard", Name = "Kinetic Board", Short = "Board", Category = "LEGS", Zone = "Feet", Rarity = "Rare", Base = 90,
Key = Enum.KeyCode.V, KeyText = "V", Toggle = true, Cooldown = 2, StaminaCost = 10,
Materials = { "HOVER DECK", "MAGNET RAILS", "KINETIC CELLS", "FOIL WINGS", "NEURAL LINK" },
Recipe = { ScrapMetal = 12, CopperWiring = 6, TitaniumAlloy = 3, HydraulicComponents = 2 },
Special = "Slipstream: momentum builds twice as fast and the glide lifts more.",
Desc = "Magnetic hover board. [V] toggles riding: speed builds the longer you keep moving and the foil glides you through the air.",
},
-- ===== SKELETON =====
mk{
Id = "TitaniumSkeleton", Name = "Titanium Skeleton", Category = "SKELETON", Zone = "Skeleton", Rarity = "Epic", Base = 120, Passive = true,
Materials = { "TITANIUM RIBS", "SPINAL ROD", "SHOCK LATTICE", "JOINT SLEEVES", "NEURAL LINK" },
Recipe = { TitaniumAlloy = 14, HydraulicComponents = 4, NeuralProcessor = 2, QuantumCircuit = 1 },
Special = "Shockwave Landing: absorbed landings refund 30 stamina in a wider wave.",
Desc = "Reinforced skeleton. PASSIVE: +100 max HP. Hard landings are absorbed in a shockwave that refunds stamina.",
},
mk{
Id = "BionicJoints", Name = "Bionic Joints", Category = "SKELETON", Zone = "Joints", Rarity = "Rare", Base = 100, Passive = true,
Materials = { "SERVO COILS", "BALL JOINTS", "HYDRAULIC LINES", "FLEX CABLES", "NEURAL LINK" },
Recipe = { ScrapMetal = 8, CopperWiring = 6, HydraulicComponents = 3, TitaniumAlloy = 2 },
Special = "Spring Surge: every 3rd jump is a super-jump.",
Desc = "Servo-assisted joints. PASSIVE: +25% jump power and +2 walk speed.",
},
-- ===== CIRCULATORY SYSTEM =====
mk{
Id = "OverclockedHeart", Name = "Overclocked Heart", Short = "Heart", Category = "CIRCULATORY SYSTEM", Zone = "Heart", Rarity = "Legendary", Base = 150,
Key = Enum.KeyCode.T, KeyText = "T", Cooldown = 30, StaminaCost = 25,
Materials = { "CARDIAC PUMP", "COOLANT BLOOD", "PACEMAKER", "ADRENAL INJECTOR", "NEURAL LINK" },
Recipe = { NeuralProcessor = 5, SyntheticOxygenCells = 6, QuantumCircuit = 3, ExperimentalCore = 1 },
Special = "Regeneration: Adrenaline Surge also heals 4 HP per second.",
Desc = "Overclocked pump. PASSIVE: +60 max HP, +40 stamina. Press [T] for Adrenaline Surge: speed, 3x regen, fast cooldowns.",
},
mk{
Id = "OxygenBooster", Name = "Oxygen Booster", Category = "CIRCULATORY SYSTEM", Zone = "Chest", Rarity = "Rare", Base = 90, Passive = true,
Materials = { "O2 RESERVOIR", "GAS VALVES", "FLOW REGULATOR", "BIO-FILTER", "NEURAL LINK" },
Recipe = { SyntheticOxygenCells = 4, CopperWiring = 5, TitaniumAlloy = 2, NeuralProcessor = 1 },
Special = "Rapid Injector: the emergency refill recharges 45% faster.",
Desc = "Oxygen reservoir. PASSIVE: +60 max stamina, +25% regen. Auto-injects a refill when stamina is nearly empty (45s).",
},
-- ===== FACE =====
mk{
Id = "MotionScanner", Name = "Motion Scanner", Short = "Scanner", Category = "FACE", Zone = "Face", Rarity = "Uncommon", Base = 80,
Key = Enum.KeyCode.N, KeyText = "N", Cooldown = 8, StaminaCost = 10,
Materials = { "VISOR LENS", "RADAR ARRAY", "SIGNAL FILTER", "OPTIC CABLES", "NEURAL LINK" },
Recipe = { ScrapMetal = 6, CopperWiring = 8, TitaniumAlloy = 2 },
Special = "Deep Scan: pulses last twice as long and tag distance.",
Desc = "Face-mounted radar. Press [N] to send a scan pulse that outlines nearby characters through walls.",
},
}
ITEM_BY_ID = {}
ACTIVE_CYBER = {}
CRAFTABLE = {}
for _, it in ipairs(ITEMS) do
ITEM_BY_ID[it.Id] = it
if it.Type == "Cyber" and not it.Passive then table.insert(ACTIVE_CYBER, it) end
if it.Recipe then table.insert(CRAFTABLE, it) end
end
-- Upgrades (bought with steps, shown in the UPGRADES window once you own the item)
UPGRADES = {
{ Id = "DasherWindup", Item = "Dasher", Name = "Windup", Desc = "Charge time -0.25s per level", Max = 4, Cost = 40 },
{ Id = "DasherThrust", Item = "Dasher", Name = "Thrust", Desc = "+15 launch speed per level", Max = 4, Cost = 50 },
{ Id = "DasherEff", Item = "Dasher", Name = "Efficiency", Desc = "-4 stamina cost per level", Max = 3, Cost = 45 },
{ Id = "CannonBoost", Item = "LaunchCannon", Name = "Booster", Desc = "+18 launch power per level", Max = 3, Cost = 60 },
{ Id = "SandyClock", Item = "Sandevistan", Name = "Overclock", Desc = "+8 LoopSpeed per level", Max = 4, Cost = 80 },
{ Id = "SandyReactor", Item = "Sandevistan", Name = "Reactor", Desc = "-1.5 stamina drain/s per level", Max = 3, Cost = 70 },
{ Id = "MantisSpeed", Item = "MantisBlades", Name = "Slash Speed", Desc = "-0.12s slash cooldown & faster swing", Max = 4, Cost = 55 },
{ Id = "MantisReach", Item = "MantisBlades", Name = "Lunge", Desc = "+12 slash dash speed per level", Max = 4, Cost = 55 },
{ Id = "GunReload", Item = "Pistol", Name = "Fast Reload", Desc = "-0.4s reload time per level", Max = 4, Cost = 40 },
{ Id = "GunMag", Item = "Pistol", Name = "Extended Mag", Desc = "+2 ammo per level", Max = 3, Cost = 45 },
-- v3 cyberware
{ Id = "GrappleRange", Item = "GrappleLauncher", Name = "Range", Desc = "+12 hook range per level", Max = 3, Cost = 45 },
{ Id = "GrappleReel", Item = "GrappleLauncher", Name = "Reel Motor", Desc = "+10 reel speed per level", Max = 3, Cost = 55 },
{ Id = "FistBlast", Item = "RocketFist", Name = "Warhead", Desc = "+15 blast power per level", Max = 3, Cost = 60 },
{ Id = "FistCooldown", Item = "RocketFist", Name = "Autoloader", Desc = "-0.3s cooldown per level", Max = 3, Cost = 55 },
{ Id = "ThrusterFuel", Item = "ShoulderThrusters", Name = "Fuel Cells", Desc = "-2 stamina drain/s per level", Max = 3, Cost = 70 },
{ Id = "ThrusterPower", Item = "ShoulderThrusters", Name = "Nozzles", Desc = "+12 thrust power per level", Max = 3, Cost = 70 },
{ Id = "KatanaDash", Item = "DashKatana", Name = "Iaido Drive", Desc = "+10 dash speed per level", Max = 3, Cost = 55 },
{ Id = "KatanaEdge", Item = "DashKatana", Name = "Quick Draw", Desc = "-0.2s cooldown per level", Max = 3, Cost = 55 },
{ Id = "RailVelocity", Item = "RailgunBoots", Name = "Rail Length", Desc = "+14 launch speed per level", Max = 3, Cost = 80 },
{ Id = "RailCapacitor", Item = "RailgunBoots", Name = "Capacitor", Desc = "-0.8s cooldown per level", Max = 3, Cost = 75 },
{ Id = "BoardMotor", Item = "KineticBoard", Name = "Hover Motor", Desc = "+3 board speed per level", Max = 4, Cost = 45 },
{ Id = "BoardGlide", Item = "KineticBoard", Name = "Glide Foil", Desc = "+6% glide lift per level", Max = 3, Cost = 50 },
{ Id = "JointsSpring", Item = "BionicJoints", Name = "Servo Springs", Desc = "+4% jump power per level", Max = 3, Cost = 45 },
{ Id = "SkeletonPlating", Item = "TitaniumSkeleton", Name = "Plating", Desc = "+25 max HP per level", Max = 3, Cost = 65 },
{ Id = "HeartDuration", Item = "OverclockedHeart", Name = "Pacemaker", Desc = "+1.5s surge duration per level", Max = 3, Cost = 80 },
{ Id = "OxygenInjector", Item = "OxygenBooster", Name = "Injector", Desc = "+8% emergency refill per level", Max = 3, Cost = 45 },
{ Id = "ScannerRange", Item = "MotionScanner", Name = "Array", Desc = "+15 scan radius per level", Max = 3, Cost = 40 },
}
-- Menu slot layout (like the Cyberpunk 2077 cyberware screen)
SLOT_LAYOUT = {
Left = {
{ Name = "FRONTAL CORTEX", Slots = 3 }, { Name = "ARMS", Slots = 3 }, { Name = "SKELETON", Slots = 3 },
{ Name = "NERVOUS SYSTEM", Slots = 3 }, { Name = "INTEGUMENTARY SYSTEM", Slots = 3 },
},
Right = {
{ Name = "OPERATING SYSTEM", Slots = 1 }, { Name = "FACE", Slots = 1 }, { Name = "HANDS", Slots = 2 },
{ Name = "CIRCULATORY SYSTEM", Slots = 3 }, { Name = "LEGS", Slots = 3 },
},
}
C = {
RED = Color3.fromRGB(255, 72, 64), SLOT = Color3.fromRGB(48, 10, 14), SLOTLINE = Color3.fromRGB(170, 38, 42),
ORANGE = Color3.fromRGB(255, 140, 25), CYAN = Color3.fromRGB(60, 230, 240), YELLOW = Color3.fromRGB(255, 200, 40),
GREEN = Color3.fromRGB(0, 255, 170),
}
function rarityColor(r) return (RARITY[r or "Common"] or RARITY.Common).Color end
-- number formatting helpers
function fmt(n)
local s = tostring(math.floor(n))
local out = s:reverse():gsub("(%d%d%d)", "%1,"):reverse()
if out:sub(1, 1) == "," then out = out:sub(2) end
return out
end
function roundi(x) return math.floor(x + 0.5) end
function fmtTime(sec)
sec = math.max(0, math.floor(sec))
return string.format("%02d:%02d:%02d", math.floor(sec / 3600), math.floor(sec / 60) % 60, sec % 60)
end
-- ==========================================
-- QUESTS
-- Allowed objectives ONLY: steps taken / jumps performed / specific cyberware activations
-- ==========================================
function S(n) return { Type = "steps", Target = n, Text = "Take " .. fmt(n) .. " steps" } end
function J(n) return { Type = "jumps", Target = n, Text = "Perform " .. fmt(n) .. " jumps" } end
function U(id, n) return { Type = "use", Item = id, Target = n, Text = "Use " .. ITEM_BY_ID[id].Name .. " " .. fmt(n) .. " times" } end
QUEST_CATEGORIES = {
{ "Main", "MAIN\nQUESTS" }, { "Daily", "DAILY\nQUESTS" }, { "Weekly", "WEEKLY\nQUESTS" },
{ "Movement", "MOVEMENT\nCHALLENGES" }, { "Cyberware", "CYBERWARE\nCHALLENGES" }, { "Special", "SPECIAL\nQUESTS" },
}
QUEST_RESET = { Daily = 86400, Weekly = 604800 }
QUESTS = {
-- MAIN (chain: each unlocks after the previous is claimed)
{ Cat = "Main", Id = "m1", Name = "WAKE UP, SAMURAI", Rarity = "Common", Difficulty = "Easy",
Desc = "Get your legs under you. The city is waiting.",
Objectives = { S(300), J(5) }, Rewards = { Eddies = 120, Steps = 50, Mats = { ScrapMetal = 6, CopperWiring = 4 } } },
{ Cat = "Main", Id = "m2", Name = "FIRST CHROME", Rarity = "Common", Difficulty = "Easy", Requires = "m1",
Desc = "Install a Dasher and get used to the thrust.",
Objectives = { S(800), J(10), U("Dasher", 5) }, Rewards = { Eddies = 200, Mats = { CopperWiring = 6, TitaniumAlloy = 1 } } },
{ Cat = "Main", Id = "m3", Name = "STREET REFLEXES", Rarity = "Uncommon", Difficulty = "Normal", Requires = "m2",
Desc = "Move like the street taught you.",
Objectives = { S(1500), J(20), U("Dasher", 12) }, Rewards = { Eddies = 300, Mats = { TitaniumAlloy = 4, ScrapMetal = 8 } } },
{ Cat = "Main", Id = "m4", Name = "ARMED & DANGEROUS", Rarity = "Uncommon", Difficulty = "Normal", Requires = "m3",
Desc = "Put your arm implants through their paces.",
Objectives = { U("MantisBlades", 10), U("LaunchCannon", 8), J(30) }, Rewards = { Eddies = 400, Mats = { TitaniumAlloy = 4, HydraulicComponents = 1 } } },
{ Cat = "Main", Id = "m5", Name = "WIRED FOR SPEED", Rarity = "Rare", Difficulty = "Hard", Requires = "m4",
Desc = "Combine time-dilation with a grappling hook. Earns the Rocket Fist blueprint.",
Objectives = { U("Sandevistan", 8), U("GrappleLauncher", 10), S(3000) },
Rewards = { Eddies = 700, Mats = { NeuralProcessor = 2, HydraulicComponents = 2 }, Blueprints = { "RocketFist" } } },
{ Cat = "Main", Id = "m6", Name = "EDGERUNNER", Rarity = "Epic", Difficulty = "Very Hard", Requires = "m5",
Desc = "Prove you belong at the top. Earns the Titanium Skeleton blueprint.",
Objectives = { S(6000), J(60), U("Sandevistan", 15), U("Dasher", 25) },
Rewards = { Eddies = 1500, Mats = { QuantumCircuit = 2, NeuralProcessor = 2 }, Blueprints = { "TitaniumSkeleton" } } },
-- DAILY
{ Cat = "Daily", Id = "d1", Name = "MORNING JOG", Rarity = "Common", Difficulty = "Easy",
Desc = "Stretch the chrome.", Objectives = { S(1000) }, Rewards = { Eddies = 60, Mats = { ScrapMetal = 3 } } },
{ Cat = "Daily", Id = "d2", Name = "JUMP START", Rarity = "Common", Difficulty = "Easy",
Desc = "Hop around and fire the thrusters.", Objectives = { J(25), U("Dasher", 3) }, Rewards = { Eddies = 80, Mats = { CopperWiring = 3 } } },
{ Cat = "Daily", Id = "d3", Name = "CHROME CHECK", Rarity = "Uncommon", Difficulty = "Normal",
Desc = "Routine diagnostics on your implants.", Objectives = { U("Sandevistan", 2), U("MantisBlades", 5) },
Rewards = { Eddies = 120, Mats = { TitaniumAlloy = 1 } } },
{ Cat = "Daily", Id = "d4", Name = "AIR MAIL", Rarity = "Uncommon", Difficulty = "Normal",
Desc = "Deliver yourself by air.", Objectives = { U("LaunchCannon", 3), J(10), U("Dasher", 3) },
Rewards = { Eddies = 130, Mats = { ScrapMetal = 5, TitaniumAlloy = 1 } } },
-- WEEKLY
{ Cat = "Weekly", Id = "w1", Name = "THE SPEED DEMON", Rarity = "Rare", Difficulty = "Hard",
Desc = "Everything faster, all the time.", Objectives = { S(5000), J(30), U("Dasher", 15) },
Rewards = { Eddies = 450, Mats = { HydraulicComponents = 2, TitaniumAlloy = 3 } } },
{ Cat = "Weekly", Id = "w2", Name = "MACHINE ADDICTION", Rarity = "Epic", Difficulty = "Hard",
Desc = "You can quit any time. Probably.", Objectives = { U("Sandevistan", 10), U("MantisBlades", 20), U("SynLungs", 15) },
Rewards = { Eddies = 900, Mats = { QuantumCircuit = 1, NeuralProcessor = 2 } } },
{ Cat = "Weekly", Id = "w3", Name = "IRON LUNGS", Rarity = "Rare", Difficulty = "Normal",
Desc = "Burn stamina with Syn Lungs and let the Oxygen Booster catch you.",
Objectives = { U("SynLungs", 25), U("OxygenBooster", 3), S(4000) },
Rewards = { Eddies = 500, Mats = { SyntheticOxygenCells = 3 } } },
{ Cat = "Weekly", Id = "w4", Name = "HEAVY ROTATION", Rarity = "Rare", Difficulty = "Hard",
Desc = "Swing, ride, repeat.", Objectives = { U("GrappleLauncher", 15), U("KineticBoard", 8), J(40) },
Rewards = { Eddies = 550, Mats = { HydraulicComponents = 2, NeuralProcessor = 1 } } },
-- MOVEMENT CHALLENGES
{ Cat = "Movement", Id = "mv1", Name = "SWING TIME", Rarity = "Uncommon", Difficulty = "Normal",
Desc = "Reel in anchors across the city.", Objectives = { U("GrappleLauncher", 20), J(15) },
Rewards = { Eddies = 220, Mats = { CopperWiring = 6, TitaniumAlloy = 2 } } },
{ Cat = "Movement", Id = "mv2", Name = "ROCKET MAN", Rarity = "Rare", Difficulty = "Hard",
Desc = "Blast off with fists and cannons.", Objectives = { U("RocketFist", 12), U("LaunchCannon", 12) },
Rewards = { Eddies = 400, Mats = { HydraulicComponents = 2 } } },
{ Cat = "Movement", Id = "mv3", Name = "THRUST VECTOR", Rarity = "Epic", Difficulty = "Hard",
Desc = "Master the shoulder jets.", Objectives = { U("ShoulderThrusters", 15), J(40) },
Rewards = { Eddies = 700, Mats = { QuantumCircuit = 1 } } },
{ Cat = "Movement", Id = "mv4", Name = "RAIL RUNNER", Rarity = "Epic", Difficulty = "Hard",
Desc = "Fire the rails and dash between them.", Objectives = { U("RailgunBoots", 10), U("Dasher", 20) },
Rewards = { Eddies = 800, Mats = { QuantumCircuit = 1, NeuralProcessor = 1 } } },
{ Cat = "Movement", Id = "mv5", Name = "BOARD CERTIFIED", Rarity = "Rare", Difficulty = "Normal",
Desc = "Ride the kinetic board.", Objectives = { U("KineticBoard", 8), J(50), S(2000) },
Rewards = { Eddies = 350, Mats = { ScrapMetal = 10, HydraulicComponents = 1 } } },
{ Cat = "Movement", Id = "mv6", Name = "BLADE DANCER", Rarity = "Rare", Difficulty = "Hard",
Desc = "Dash through the katana line and the mantis line.", Objectives = { U("DashKatana", 20), U("MantisBlades", 20) },
Rewards = { Eddies = 450, Mats = { NeuralProcessor = 2 } } },
-- CYBERWARE CHALLENGES
{ Cat = "Cyberware", Id = "c1", Name = "SLASH & BURN", Rarity = "Uncommon", Difficulty = "Normal",
Desc = "Work the blades.", Objectives = { U("MantisBlades", 25) }, Rewards = { Eddies = 200, Mats = { TitaniumAlloy = 2 } } },
{ Cat = "Cyberware", Id = "c2", Name = "TIME BENDER", Rarity = "Rare", Difficulty = "Hard",
Desc = "Slow the world down.", Objectives = { U("Sandevistan", 20) },
Rewards = { Eddies = 400, Mats = { NeuralProcessor = 1, HydraulicComponents = 1 } } },
{ Cat = "Cyberware", Id = "c3", Name = "SYNTHETIC BREATH", Rarity = "Uncommon", Difficulty = "Easy",
Desc = "Let the lungs earn their keep.", Objectives = { U("SynLungs", 20) }, Rewards = { Eddies = 150, Mats = { ScrapMetal = 5 } } },
{ Cat = "Cyberware", Id = "c4", Name = "IRON BONES", Rarity = "Rare", Difficulty = "Hard",
Desc = "Land hard, jump high.", Objectives = { U("TitaniumSkeleton", 15), U("BionicJoints", 25) },
Rewards = { Eddies = 450, Mats = { TitaniumAlloy = 4, HydraulicComponents = 2 } } },
{ Cat = "Cyberware", Id = "c5", Name = "COLD HEART", Rarity = "Epic", Difficulty = "Hard",
Desc = "Pump it up and breathe easy.", Objectives = { U("OverclockedHeart", 8), U("OxygenBooster", 10) },
Rewards = { Eddies = 800, Mats = { SyntheticOxygenCells = 3, QuantumCircuit = 1 } } },
{ Cat = "Cyberware", Id = "c6", Name = "EYES EVERYWHERE", Rarity = "Uncommon", Difficulty = "Normal",
Desc = "Keep scanning.", Objectives = { U("MotionScanner", 10) }, Rewards = { Eddies = 180, Mats = { CopperWiring = 6 } } },
{ Cat = "Cyberware", Id = "c7", Name = "FULL CHROME", Rarity = "Legendary", Difficulty = "Extreme",
Desc = "Use everything. Earns the Dash Katana blueprint.",
Objectives = { U("Sandevistan", 15), U("MantisBlades", 15), U("Dasher", 15), U("LaunchCannon", 15), U("GrappleLauncher", 10) },
Rewards = { Eddies = 2000, Mats = { QuantumCircuit = 2, ExperimentalCore = 1 }, Blueprints = { "DashKatana" } } },
-- SPECIAL QUESTS
{ Cat = "Special", Id = "s1", Name = "PROTOTYPE FEVER", Rarity = "Legendary", Difficulty = "Extreme",
Desc = "Rumors of a prototype jet rig. Earns the Shoulder Thrusters blueprint.",
Objectives = { S(10000), J(150), U("Dasher", 30) },
Rewards = { Eddies = 1500, Mats = { ExperimentalCore = 1 }, Blueprints = { "ShoulderThrusters" } } },
{ Cat = "Special", Id = "s2", Name = "THE ARASAKA JOB", Rarity = "Legendary", Difficulty = "Extreme",
Desc = "A very quiet job with a very loud payout. Earns the Overclocked Heart blueprint.",
Objectives = { U("Sandevistan", 30), U("RocketFist", 20), U("DashKatana", 20) },
Rewards = { Eddies = 1800, Mats = { ExperimentalCore = 1, QuantumCircuit = 2 }, Blueprints = { "OverclockedHeart" } } },
{ Cat = "Special", Id = "s3", Name = "BLACK MARKET RUN", Rarity = "Epic", Difficulty = "Very Hard",
Desc = "A fixer's route across town. Earns the Railgun Boots blueprint.",
Objectives = { S(8000), J(100), U("Dasher", 40) },
Rewards = { Eddies = 1200, Mats = { QuantumCircuit = 2 }, Blueprints = { "RailgunBoots" } } },
{ Cat = "Special", Id = "s4", Name = "CHIPPED IN", Rarity = "Iconic", Difficulty = "Impossible",
Desc = "The legend of the city. Few ever finish it.",
Objectives = { S(25000), J(300), U("Sandevistan", 50), U("Dasher", 50), U("MantisBlades", 50) },
Rewards = { Eddies = 5000, Mats = { PrototypeChip = 1, ExperimentalCore = 1 } } },
}
QUEST_BY_ID = {}
for _, q in ipairs(QUESTS) do QUEST_BY_ID[q.Id] = q end
-- ==========================================
-- STATE
-- ==========================================
steps = 0 -- spendable currency (unchanged)
eddies = 0 -- new currency (quests)
stepsTaken = 0 -- lifetime steps walked (never spent) - quest objective
owned, upLevel, cooldowns = {}, {}, {}
matInv, blueprints, usage = {}, {}, {}
questProgress, questClaimed, questDone = {}, {}, {}
for _, it in ipairs(ITEMS) do
owned[it.Id] = false
usage[it.Id] = 0
if it.Blueprint then blueprints[it.Id] = false end
end
for _, up in ipairs(UPGRADES) do upLevel[up.Id] = 0 end
for _, it in ipairs(ACTIVE_CYBER) do cooldowns[it.Id] = 0 end
for _, m in ipairs(MATERIALS) do matInv[m.Id] = 0 end
for _, q in ipairs(QUESTS) do
questProgress[q.Id] = {}
for i = 1, #q.Objectives do questProgress[q.Id][i] = 0 end
questClaimed[q.Id], questDone[q.Id] = false, false
end
resetAt = { Daily = os.time() + QUEST_RESET.Daily, Weekly = os.time() + QUEST_RESET.Weekly }
equipped, CATEGORY_HAS_ITEMS = {}, {}
for _, side in pairs(SLOT_LAYOUT) do
for _, c in ipairs(side) do
equipped[c.Name] = {}
for j = 1, c.Slots do equipped[c.Name][j] = false end
end
end
for _, it in ipairs(ITEMS) do if it.Category then CATEGORY_HAS_ITEMS[it.Category] = true end end
wornJacket = false
itemHotbar = { false, false, false, false, false }
selectedSlot = 0
isSandevistanActive, isDashing, isCannonJumping = false, false, false
isImplanting, isSlashing, dasherCharging = false, false, false
isMobility, isThrusting, isGrappling, grappleStop = false, false, false, false
isBoardActive, isSurging = false, false
boardMomentum, boardToken, surgeSession, mobToken = 0, 0, 0, 0
boardModel = nil
systemDestroyed = false
sandySession, chargeToken = 0, 0
uiDirty, questUiDirty = false, false
fallVelMin, jointJumps, lastOxyInject, lastKatana = 0, 0, -1000, 0
appliedWalkBonus, baseJumpPower, baseJumpHeight = 0, 50, 7.2
stamina = BASE_STAMINA
lastStaminaUse = 0
lastMaxHP, lastMaxStam = BASE_HEALTH, BASE_STAMINA
ammo, reloading, lastShot, gunKick = GUN_BASE_AMMO, false, 0, 0
slashPose = nil
heldGunModel = nil
autoRotateSuppressed = false
local character, humanoid, rootPart
baseWalkSpeed = 16
armRig = {}
rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Exclude
-- world folder for mobility FX (ropes, flames, rails) so respawn / cleanup can wipe it
mobFolder = workspace:FindFirstChild("CyberwareFX_" .. player.UserId)
if mobFolder then mobFolder:Destroy() end
mobFolder = Instance.new("Folder")
mobFolder.Name = "CyberwareFX_" .. player.UserId
mobFolder.Parent = workspace
colorCorrection = Lighting:FindFirstChild("SandevistanFX")
if not colorCorrection then
colorCorrection = Instance.new("ColorCorrectionEffect")
colorCorrection.Name = "SandevistanFX"
colorCorrection.Enabled = false
colorCorrection.Parent = Lighting
end
trailColors = {
Color3.fromRGB(180, 255, 0), Color3.fromRGB(0, 255, 140), Color3.fromRGB(0, 235, 255), Color3.fromRGB(30, 120, 255),
Color3.fromRGB(160, 40, 255), Color3.fromRGB(255, 0, 170), Color3.fromRGB(255, 30, 50),
}
-- forward declarations
local updateViewportDummy, updateHudAndMenus, updateHotbars, refreshVisualAugments, refreshHeldGun, applyStats
local flashStaminaBar, updateStaminaBar, updateAmmoUI
local endSandevistan, endDasherCharge, reloadGun
local notify, refreshQuestUI
local menuOverlay
ACTIVATE = {} -- id -> activation function (filled after the abilities are defined)
-- ==========================================
-- SMALL HELPERS
-- ==========================================
function new(class, props, parent)
local o = Instance.new(class)
for k, v in pairs(props) do o[k] = v end
if parent then o.Parent = parent end
return o
end
function upl(id) return upLevel[id] or 0 end
function upMax(up)
local it = ITEM_BY_ID[up.Item]
return up.Max + RARITY[(it and it.Rarity) or "Common"].ExtraLevels
end
function isEq(id)
local it = ITEM_BY_ID[id]
if not it or not it.Category then return false end
for _, v in ipairs(equipped[it.Category]) do if v == id then return true end end
return false
end
function equipCyber(id)
local slots = equipped[ITEM_BY_ID[id].Category]
if isEq(id) then return true end
for j = 1, #slots do
if not slots[j] then slots[j] = id return true end
end
return false
end
function unequipCyber(id)
local slots = equipped[ITEM_BY_ID[id].Category]
for j = 1, #slots do if slots[j] == id then slots[j] = false end end
end
function heldItem() return selectedSlot > 0 and itemHotbar[selectedSlot] or nil end
function gunReady() return heldItem() == "Pistol" and not systemDestroyed and not isImplanting end
function menuVisible() return menuOverlay and menuOverlay.Visible end
-- ---------- cyberware mastery (usage based, 5 levels) ----------
function masteryThreshold(id, lvl)
local it = ITEM_BY_ID[id]
return math.ceil(MASTERY_BASE[lvl] * RARITY[(it and it.Rarity) or "Common"].MasteryMult)
end
function masteryLevel(id)
local u = usage[id] or 0
local lv = 1
for l = 2, 5 do if u >= masteryThreshold(id, l) then lv = l end end
return lv
end
function mPower(id) return masteryLevel(id) >= 2 and 1.1 or 1 end -- L2 improved ability
function mEff(id) return masteryLevel(id) >= 3 and 0.85 or 1 end -- L3 better efficiency
function mCd(id) return masteryLevel(id) >= 4 and 0.85 or 1 end -- L4 improved performance
function mSpecial(id) return masteryLevel(id) >= 5 end -- L5 special effect
function pStr(id) -- passive strength (L2 / L3)
local l = masteryLevel(id)
return 1 + (l >= 2 and 0.1 or 0) + (l >= 3 and 0.1 or 0)
end
function perkText(it, lvl)
if lvl == 1 then return "Base ability" end
if lvl == 5 then return it.Special or "Special effect" end
if it.Passive then
return ({ [2] = "+10% passive strength", [3] = "+10% more passive strength", [4] = "-15% trigger cooldown" })[lvl]
end
return ({ [2] = "+10% ability power", [3] = "-15% stamina cost", [4] = "-15% cooldown" })[lvl]
end
-- stats
function getMaxHealth()
local m = BASE_HEALTH
if isEq("SynLungs") then m += 200 end
if wornJacket then m += 50 end
if isEq("TitaniumSkeleton") then m += math.floor((100 + 25 * upl("SkeletonPlating")) * pStr("TitaniumSkeleton")) end
if isEq("OverclockedHeart") then m += math.floor(60 * pStr("OverclockedHeart")) end
return m
end
function getMaxStamina()
local m = BASE_STAMINA
if isEq("SynLungs") then m += 200 end
if wornJacket then m += 72 end
if isEq("OxygenBooster") then m += math.floor(60 * pStr("OxygenBooster")) end
if isEq("OverclockedHeart") then m += math.floor(40 * pStr("OverclockedHeart")) end
return m
end
function getRegenRate()
local r = BASE_REGEN
if isEq("SynLungs") then r *= (1 + 1.2 * pStr("SynLungs")) end
if isEq("OxygenBooster") then r *= 1.25 * pStr("OxygenBooster") end
if isSurging then r *= 3 end
return r
end
function getRegenDelay()
if isEq("SynLungs") then return mSpecial("SynLungs") and 0.3 or 0.6 end
return BASE_REGEN_DELAY
end
function walkBonus() return isEq("BionicJoints") and 2 * pStr("BionicJoints") or 0 end
function jumpMult()
if not isEq("BionicJoints") then return 1 end
return 1 + (0.25 + 0.04 * upl("JointsSpring")) * pStr("BionicJoints")
end
-- upgrade + mastery driven ability stats
function dasherWindup() return 1.6 - 0.25 * upl("DasherWindup") end
function dasherSpeed() return (120 + 15 * upl("DasherThrust")) * mPower("Dasher") end
function dasherCost() return math.max(5, roundi((30 - 4 * upl("DasherEff")) * mEff("Dasher"))) end
function cannonPower() return (140 + 18 * upl("CannonBoost")) * mPower("LaunchCannon") end
function cannonCost() return roundi(40 * mEff("LaunchCannon")) end
function sandyBonus() return roundi((40 + 8 * upl("SandyClock")) * mPower("Sandevistan")) end
function sandyDrain() return (SANDEVISTAN_DRAIN - 1.5 * upl("SandyReactor")) * mEff("Sandevistan") end
function sandyStartCost() return roundi(SANDEVISTAN_START_COST * mEff("Sandevistan")) end
function slashCooldown() return math.max(0.2, (0.9 - 0.12 * upl("MantisSpeed")) * mCd("MantisBlades")) end
function slashSpeed() return (70 + 12 * upl("MantisReach")) * mPower("MantisBlades") end
function mantisCost() return roundi(15 * mEff("MantisBlades")) end
function gunMag() return GUN_BASE_AMMO + 2 * upl("GunMag") end
function gunReloadTime() return GUN_BASE_RELOAD - 0.4 * upl("GunReload") end
function grappleRange() return (85 + 12 * upl("GrappleRange")) * mPower("GrappleLauncher") end
function grappleSpeed() return (75 + 10 * upl("GrappleReel")) * mPower("GrappleLauncher") end
function grappleCost() return roundi(20 * mEff("GrappleLauncher")) end
function fistPower() return (90 + 15 * upl("FistBlast")) * mPower("RocketFist") end
function fistCost() return roundi(30 * mEff("RocketFist")) end
function fistCooldown() return math.max(1, 3.5 - 0.3 * upl("FistCooldown")) * mCd("RocketFist") end
function thrusterDrain() return math.max(5, 16 - 2 * upl("ThrusterFuel")) * mEff("ShoulderThrusters") end
function thrusterAccel() return (70 + 12 * upl("ThrusterPower")) * mPower("ShoulderThrusters") end
function katanaSpeed() return (95 + 10 * upl("KatanaDash")) * mPower("DashKatana") end
function katanaCost() return roundi(18 * mEff("DashKatana")) end
function katanaCooldown() return math.max(0.5, 1.6 - 0.2 * upl("KatanaEdge")) * mCd("DashKatana") end
function railSpeed() return (150 + 14 * upl("RailVelocity")) * mPower("RailgunBoots") end
function railCost() return roundi(45 * mEff("RailgunBoots")) end
function railCooldown() return math.max(2, 6 - 0.8 * upl("RailCapacitor")) * mCd("RailgunBoots") end
function boardBonus() return (12 + 14 * boardMomentum + 3 * upl("BoardMotor")) * mPower("KineticBoard") end
function boardDrain() return 3 * mEff("KineticBoard") end
function boardStartCost() return roundi(10 * mEff("KineticBoard")) end
function surgeDuration() return 6 + 1.5 * upl("HeartDuration") end
function surgeBonus() return 10 * mPower("OverclockedHeart") end
function surgeCost() return roundi(25 * mEff("OverclockedHeart")) end
function scanRadius() return (90 + 15 * upl("ScannerRange")) * mPower("MotionScanner") end
function scanCost() return roundi(10 * mEff("MotionScanner")) end
function oxygenRefill() return math.min(0.8, 0.35 + 0.08 * upl("OxygenInjector")) end
COST_FN = {
Dasher = dasherCost, LaunchCannon = cannonCost, MantisBlades = mantisCost, Sandevistan = sandyStartCost,
GrappleLauncher = grappleCost, RocketFist = fistCost, DashKatana = katanaCost, RailgunBoots = railCost,
KineticBoard = boardStartCost, OverclockedHeart = surgeCost, MotionScanner = scanCost,
}
function staminaCostOf(it)
if it.Passive or it.Type == "Clothing" then return nil end
if it.Id == "ShoulderThrusters" then return "8 + " .. roundi(thrusterDrain()) .. "/s" end
local f = COST_FN[it.Id]
if f then return f() end
return it.StaminaCost or 0
end
function extraSpeed()
local e = 0
if isSandevistanActive then e += sandyBonus() end
if isBoardActive then e += boardBonus() end
if isSurging then e += surgeBonus() end
return e
end
function speedBoosted() return isSandevistanActive or isBoardActive or isSurging end
function captureBase()
if humanoid and not (isSandevistanActive or isDashing or isCannonJumping or isSlashing or dasherCharging or isImplanting
or isBoardActive or isSurging or isMobility) then
baseWalkSpeed = humanoid.WalkSpeed
end
end
function restoreSpeed()
if not humanoid or not humanoid.Parent then return end
if isImplanting or isDashing or isCannonJumping or isSlashing or dasherCharging then return end
humanoid.WalkSpeed = baseWalkSpeed + extraSpeed()
end
function getArm(side)
if not character then return nil end
if side == "R" then return character:FindFirstChild("Right Arm") or character:FindFirstChild("RightHand") end
return character:FindFirstChild("Left Arm") or character:FindFirstChild("LeftHand")
end
-- ==========================================
-- GUI ROOT + SCREEN FX
-- ==========================================
local mainGui = new("ScreenGui", { Name = "CyberwareSystemGui", ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, IgnoreGuiInset = false }, playerGui)
function createCyberFrame(parent, size, pos, borderColor, bgColor, bgTrans)
local frame = new("Frame", {
Size = size, Position = pos, BackgroundColor3 = bgColor or Color3.fromRGB(16, 20, 22),
BackgroundTransparency = bgTrans or 0.15, BorderSizePixel = 0,
}, parent)
local stroke = new("UIStroke", {
Color = borderColor or Color3.fromRGB(115, 185, 115), Thickness = 1.8, ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
}, frame)
return frame, stroke
end
function fullFrame(name, color, z)
return new("Frame", {
Name = name, Size = UDim2.new(1, 0, 1, 100), Position = UDim2.new(0, 0, 0, -50), BackgroundColor3 = color,
BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = z,
}, mainGui)
end
flashOverlay = fullFrame("SandevistanFlash", Color3.fromRGB(60, 255, 100), 4)
injuryFlash = fullFrame("InjuryFlash", Color3.fromRGB(255, 20, 30), 60)
surgeOverlay = fullFrame("HeartSurge", Color3.fromRGB(255, 30, 50), 4)
scanOverlay = fullFrame("ScanFlash", Color3.fromRGB(60, 230, 240), 4)
-- toast notifications (quest complete, mastery, drops, ...)
toastHolder = new("Frame", {
Name = "Toasts", AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0, 16), Size = UDim2.new(0, 420, 0, 200),
BackgroundTransparency = 1, ZIndex = 90,
}, mainGui)
new("UIListLayout", { Padding = UDim.new(0, 4), SortOrder = Enum.SortOrder.LayoutOrder, HorizontalAlignment = Enum.HorizontalAlignment.Center }, toastHolder)
toastCount = 0
notify = function(text, color)
if systemDestroyed or not toastHolder.Parent then return end
toastCount += 1
color = color or C.GREEN
local lbl = new("TextLabel", {
LayoutOrder = toastCount, Size = UDim2.new(1, 0, 0, 26), BackgroundColor3 = Color3.fromRGB(12, 16, 18), BackgroundTransparency = 0.12,
BorderSizePixel = 0, Text = text, TextColor3 = color, Font = Enum.Font.Code, TextSize = 14, ZIndex = 91,
}, toastHolder)
new("UIStroke", { Color = color, Thickness = 1.5 }, lbl)
local labels = {}
for _, ch in ipairs(toastHolder:GetChildren()) do if ch:IsA("TextLabel") then table.insert(labels, ch) end end
if #labels > 5 then labels[1]:Destroy() end
task.delay(3.2, function() if lbl.Parent then lbl:Destroy() end end)
end
-- Speed lines (screen space, radial)
speedContainer = new("Frame", {
Name = "Speedlines", Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, ZIndex = 3, ClipsDescendants = true,
}, mainGui)
function spawnSpeedline(color, life, thick)
if systemDestroyed then return end
local vp = camera.ViewportSize
local diag = math.sqrt(vp.X * vp.X + vp.Y * vp.Y) / 2
local ang = math.random() * math.pi * 2
local r0 = diag * (0.22 + math.random() * 0.4)
local len = diag * (0.25 + math.random() * 0.35)
local r1 = r0 + diag * 0.55
local f = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), BackgroundColor3 = color, BorderSizePixel = 0, Rotation = math.deg(ang),
Size = UDim2.new(0, len * 0.3, 0, thick), BackgroundTransparency = 0.1,
Position = UDim2.new(0.5, math.cos(ang) * r0, 0.5, math.sin(ang) * r0),
}, speedContainer)
new("UIGradient", { Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(1, 0) }) }, f)
local tw = TweenService:Create(f, TweenInfo.new(life, Enum.EasingStyle.Quad, Enum.EasingDirection.In), {
Position = UDim2.new(0.5, math.cos(ang) * r1, 0.5, math.sin(ang) * r1),
Size = UDim2.new(0, len, 0, thick), BackgroundTransparency = 1,
})
tw:Play()
tw.Completed:Connect(function() f:Destroy() end)
end
function playSpeedlines(count, color, duration)
task.spawn(function()
for _ = 1, count do
if systemDestroyed then return end
spawnSpeedline(color, 0.28 + math.random() * 0.12, math.random(2, 4))
if duration > 0 then task.wait(duration / count) end
end
end)
end
-- Spine X-ray overlay
SKEL_CYAN = Color3.fromRGB(0, 240, 235)
skeletonGroup = new("CanvasGroup", {
Name = "SandevistanSpineXray", Size = UDim2.new(1, 0, 1, 100), Position = UDim2.new(0, 0, 0, -50),
BackgroundColor3 = Color3.new(0, 0, 0), BackgroundTransparency = 0.45, BorderSizePixel = 0, GroupTransparency = 1,
Visible = false, ZIndex = 5,
}, mainGui)
skelCenter = new("Frame", {
Name = "Center", AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0),
Size = UDim2.new(0, 460, 0, 580), BackgroundTransparency = 1,
}, skeletonGroup)
skelScale = new("UIScale", {}, skelCenter)
skeletonVertebraStrokes = {}
do
local CX = 230
local rng = Random.new(7)
local function fiber(cx, cy, len, rot, color, thick)
local f = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, cx, 0, cy), Size = UDim2.new(0, len, 0, thick),
Rotation = rot, BackgroundColor3 = color, BorderSizePixel = 0,
}, skelCenter)
new("UIGradient", { Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.5, 0.15), NumberSequenceKeypoint.new(1, 1),
}) }, f)
end
local function rib(y, s, len, ang)
local rad = math.rad(ang)
local cx = CX + s * 34 + s * math.cos(rad) * len / 2
local cy = y + math.sin(rad) * len / 2
local f = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, cx, 0, cy), Size = UDim2.new(0, len, 0, 3),
Rotation = s * ang, BackgroundColor3 = SKEL_CYAN, BorderSizePixel = 0,
}, skelCenter)
local g = new("UIGradient", { Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0.05), NumberSequenceKeypoint.new(1, 1),
}) }, f)
if s < 0 then g.Rotation = 180 end
end
local fiberColors = {
Color3.fromRGB(255, 40, 60), Color3.fromRGB(255, 70, 80), Color3.fromRGB(210, 30, 120), Color3.fromRGB(120, 70, 255),
}
for _, s in ipairs({ -1, 1 }) do
for _ = 1, 22 do
fiber(CX + s * rng:NextNumber(115, 215), rng:NextNumber(60, 520), rng:NextNumber(130, 300),
90 + rng:NextNumber(-22, 22), fiberColors[rng:NextInteger(1, #fiberColors)], rng:NextNumber(1.5, 2.6))
end
end
for i = 0, 7 do
local y = 40 + i * 48
rib(y, 1, 150 - i * 6, 18 + i * 2)
rib(y, -1, 150 - i * 6, 18 + i * 2)
end
for i = 0, 10 do
local y = 40 + i * 48
local w = 44 + i * 1.5
local isBottom = (i == 10)
local lineColor = isBottom and Color3.fromRGB(190, 255, 255) or SKEL_CYAN
local glow = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, CX, 0, y), Size = UDim2.new(0, w + 16, 0, 48),
BackgroundColor3 = SKEL_CYAN, BackgroundTransparency = isBottom and 0.6 or 0.82, BorderSizePixel = 0,
}, skelCenter)
new("UICorner", { CornerRadius = UDim.new(0, 10) }, glow)
local body = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, CX, 0, y), Size = UDim2.new(0, w, 0, 34),
BackgroundColor3 = Color3.fromRGB(0, 14, 18), BackgroundTransparency = 0.05, BorderSizePixel = 0,
}, skelCenter)
new("UICorner", { CornerRadius = UDim.new(0, 6) }, body)
local stroke = new("UIStroke", { Color = lineColor, Thickness = 2.5 }, body)
table.insert(skeletonVertebraStrokes, stroke)
for _, s in ipairs({ -1, 1 }) do
local wing = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, CX + s * (w / 2 + 14), 0, y),
Size = UDim2.new(0, 28, 0, 9), Rotation = s * 20, BackgroundColor3 = lineColor, BackgroundTransparency = 0.15,
BorderSizePixel = 0,
}, skelCenter)
new("UICorner", { CornerRadius = UDim.new(0.5, 0) }, wing)
end
if i < 10 then
local disc = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, CX, 0, y + 24), Size = UDim2.new(0, w - 14, 0, 5),
BackgroundColor3 = SKEL_CYAN, BackgroundTransparency = 0.4, BorderSizePixel = 0,
}, skelCenter)
new("UICorner", { CornerRadius = UDim.new(0.5, 0) }, disc)
end
end
end
skeletonToken = 0
function showSkeleton()
if systemDestroyed then return end
skeletonToken += 1
local token = skeletonToken
local base = math.clamp(camera.ViewportSize.Y / 700, 0.5, 1.1)
skeletonGroup.Visible = true
skeletonGroup.GroupTransparency = 1
skelScale.Scale = base * 0.8
TweenService:Create(skeletonGroup, TweenInfo.new(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { GroupTransparency = 0.05 }):Play()
TweenService:Create(skelScale, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Scale = base }):Play()
task.spawn(function()
for _, st in ipairs(skeletonVertebraStrokes) do
if token ~= skeletonToken or systemDestroyed then return end
st.Color = Color3.fromRGB(230, 255, 255)
TweenService:Create(st, TweenInfo.new(0.25), { Color = SKEL_CYAN }):Play()
task.wait(0.03)
end
end)
task.spawn(function()
task.wait(0.35)
for _ = 1, 8 do
if token ~= skeletonToken or systemDestroyed then return end
skeletonGroup.GroupTransparency = 0.03 + math.random() * 0.35
task.wait(0.07)
end
if token ~= skeletonToken or systemDestroyed then return end
local fade = TweenService:Create(skeletonGroup, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { GroupTransparency = 1 })
fade:Play()
fade.Completed:Wait()
if token == skeletonToken then skeletonGroup.Visible = false end
end)
end
function playSandevistanActivationFX()
if systemDestroyed then return end
flashOverlay.BackgroundTransparency = 0.3
TweenService:Create(flashOverlay, TweenInfo.new(0.55, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play()
colorCorrection.Enabled = true
colorCorrection.TintColor = Color3.new(1, 1, 1)
colorCorrection.Saturation, colorCorrection.Contrast, colorCorrection.Brightness = 0, 0, 0
TweenService:Create(colorCorrection, TweenInfo.new(0.1), {
TintColor = Color3.fromRGB(40, 255, 90), Brightness = 0.15, Saturation = 0.7, Contrast = 0.45,
}):Play()
local session = sandySession
task.delay(0.1, function()
if systemDestroyed or session ~= sandySession or not isSandevistanActive then return end
TweenService:Create(colorCorrection, TweenInfo.new(0.4), {
TintColor = Color3.fromRGB(90, 255, 140), Brightness = 0, Saturation = 0.5, Contrast = 0.3,
}):Play()
end)
showSkeleton()
playSpeedlines(40, Color3.fromRGB(90, 255, 140), 0)
end
-- ==========================================
-- MODEL BUILDERS (shared by in-game + menu preview)
-- addPart(name, size, color, material, offsetCFrame)
-- ==========================================
METAL, NEON, PLASTIC, FABRIC = Enum.Material.Metal, Enum.Material.Neon, Enum.Material.SmoothPlastic, Enum.Material.Fabric
function buildCannonParts(addPart)
local WHITE, ORANGE = Color3.fromRGB(226, 228, 224), Color3.fromRGB(255, 120, 20)
local DARK, STEEL, RED = Color3.fromRGB(28, 30, 34), Color3.fromRGB(120, 126, 134), Color3.fromRGB(255, 40, 40)
addPart("CannonSheath", Vector3.new(1.32, 1.5, 1.32), WHITE, METAL, CFrame.new(0, 0.2, 0))
addPart("CannonShoulderPlate", Vector3.new(1.4, 0.5, 1.4), WHITE, METAL, CFrame.new(0, 0.85, 0))
addPart("StripeUpper", Vector3.new(1.36, 0.14, 1.36), ORANGE, PLASTIC, CFrame.new(0, 0.5, 0))
addPart("StripeLower", Vector3.new(1.36, 0.14, 1.36), ORANGE, PLASTIC, CFrame.new(0, -0.3, 0))
addPart("CannonBreech", Vector3.new(1.0, 0.5, 1.0), DARK, METAL, CFrame.new(0, -0.7, 0))
addPart("CannonBarrel", Vector3.new(0.8, 1.5, 0.8), DARK, METAL, CFrame.new(0, -1.6, 0))
addPart("BarrelRingA", Vector3.new(0.98, 0.16, 0.98), ORANGE, PLASTIC, CFrame.new(0, -1.2, 0))
addPart("BarrelRingB", Vector3.new(0.98, 0.16, 0.98), ORANGE, PLASTIC, CFrame.new(0, -1.75, 0))
addPart("MuzzleBrake", Vector3.new(1.05, 0.28, 1.05), STEEL, METAL, CFrame.new(0, -2.45, 0))
addPart("MuzzleGlow", Vector3.new(0.5, 0.06, 0.5), ORANGE, NEON, CFrame.new(0, -2.62, 0))
addPart("RailL", Vector3.new(0.14, 1.3, 0.14), STEEL, METAL, CFrame.new(-0.52, -1.55, 0))
addPart("RailR", Vector3.new(0.14, 1.3, 0.14), STEEL, METAL, CFrame.new(0.52, -1.55, 0))
addPart("AmmoDrum", Vector3.new(0.5, 1.0, 0.5), DARK, METAL, CFrame.new(0.9, 0.1, 0.15))
addPart("AmmoCap", Vector3.new(0.52, 0.12, 0.52), ORANGE, NEON, CFrame.new(0.9, 0.62, 0.15))
for _, z in ipairs({ -0.68, 0.68 }) do
addPart("CannonCore", Vector3.new(0.34, 0.34, 0.06), RED, NEON, CFrame.new(0, 0.2, z))
addPart("CannonVentA", Vector3.new(0.7, 0.05, 0.04), ORANGE, NEON, CFrame.new(0, -0.1, z))
addPart("CannonVentB", Vector3.new(0.7, 0.05, 0.04), ORANGE, NEON, CFrame.new(0, -0.2, z))
end
end
function buildSandevistanParts(addPart)
local GUN, DARKER, STEEL = Color3.fromRGB(38, 42, 48), Color3.fromRGB(22, 24, 28), Color3.fromRGB(110, 118, 128)
local TUBE, GLOW = Color3.fromRGB(18, 18, 22), Color3.fromRGB(0, 235, 255)
local Z = 0.58
addPart("SandyRail", Vector3.new(0.2, 2.0, 0.14), DARKER, METAL, CFrame.new(0, 0, Z))
for i = -3, 3 do
local y, taper = i * 0.29, 1 - i * 0.05
addPart("SandySeg", Vector3.new(0.52 * taper, 0.2, 0.3), GUN, METAL, CFrame.new(0, y, Z + 0.1))
addPart("SandyRidge", Vector3.new(0.36 * taper, 0.09, 0.12), STEEL, METAL, CFrame.new(0, y + 0.07, Z + 0.26))
addPart("SandyGlow", Vector3.new(0.3 * taper, 0.045, 0.04), GLOW, NEON, CFrame.new(0, y - 0.05, Z + 0.27))
for _, s in ipairs({ -1, 1 }) do
addPart("SandyWing", Vector3.new(0.38 * taper, 0.07, 0.14), DARKER, METAL,
CFrame.new(s * 0.34 * taper, y - 0.02, Z + 0.04) * CFrame.Angles(0, 0, s * 0.3))
end
end
addPart("SandyNeckCap", Vector3.new(0.72, 0.22, 0.36), GUN, METAL, CFrame.new(0, 1.02, Z + 0.1))
addPart("SandyGlowCore", Vector3.new(0.5, 0.05, 0.22), GLOW, NEON, CFrame.new(0, 1.02, Z + 0.29))
addPart("SandyBase", Vector3.new(0.86, 0.24, 0.38), GUN, METAL, CFrame.new(0, -1.0, Z + 0.08))
addPart("SandyGlowCore", Vector3.new(0.6, 0.05, 0.2), GLOW, NEON, CFrame.new(0, -1.0, Z + 0.28))
for _, s in ipairs({ -1, 1 }) do
addPart("SandyNeckFin", Vector3.new(0.1, 0.3, 0.2), DARKER, METAL, CFrame.new(s * 0.3, 1.15, Z + 0.05) * CFrame.Angles(0, 0, -s * 0.25))
local tubeCF = CFrame.new(s * 0.5, -0.65, Z + 0.02) * CFrame.Angles(0, 0, -s * 0.35)
addPart("SandyTube", Vector3.new(0.09, 0.75, 0.09), TUBE, PLASTIC, tubeCF)
addPart("SandyGlow", Vector3.new(0.11, 0.05, 0.11), GLOW, NEON, tubeCF)
local finCF = CFrame.new(s * 0.52, 0.7, Z + 0.02) * CFrame.Angles(0, 0, -s * 0.5)
addPart("SandyFin", Vector3.new(0.5, 0.1, 0.2), GUN, METAL, finCF)
addPart("SandyGlow", Vector3.new(0.4, 0.03, 0.04), GLOW, NEON, finCF * CFrame.new(0, 0, 0.1))
addPart("SandySideRail", Vector3.new(0.07, 1.5, 0.07), STEEL, METAL, CFrame.new(s * 0.62, 0.05, Z))
end
end
-- DASHER: rocket-thruster leg frame (applied to each leg)
function buildDasherParts(addPart)
local WHITE, DARK, STEEL = Color3.fromRGB(222, 226, 230), Color3.fromRGB(26, 28, 34), Color3.fromRGB(120, 128, 138)
local ORANGE, CYAN = Color3.fromRGB(255, 120, 20), Color3.fromRGB(0, 235, 255)
addPart("DasherKnee", Vector3.new(1.1, 0.38, 1.12), DARK, METAL, CFrame.new(0, 0.72, -0.02))
addPart("DasherShin", Vector3.new(1.08, 1.0, 0.22), WHITE, METAL, CFrame.new(0, 0.05, -0.56))
addPart("DasherShinStripe", Vector3.new(0.3, 0.9, 0.05), ORANGE, PLASTIC, CFrame.new(0, 0.05, -0.69))
addPart("DasherCalf", Vector3.new(1.06, 0.9, 0.3), DARK, METAL, CFrame.new(0, 0.1, 0.56))
addPart("DasherNozzle", Vector3.new(0.58, 0.6, 0.5), STEEL, METAL, CFrame.new(0, -0.42, 0.8))
addPart("DasherNozzleRing", Vector3.new(0.66, 0.1, 0.58), ORANGE, PLASTIC, CFrame.new(0, -0.7, 0.8))
addPart("DasherGlowNozzle", Vector3.new(0.42, 0.08, 0.36), CYAN, NEON, CFrame.new(0, -0.77, 0.8))
addPart("DasherBand", Vector3.new(1.1, 0.12, 1.1), ORANGE, PLASTIC, CFrame.new(0, -0.35, 0))
addPart("DasherBoot", Vector3.new(1.1, 0.3, 1.3), DARK, METAL, CFrame.new(0, -0.88, -0.1))
for _, s in ipairs({ -1, 1 }) do
addPart("DasherFin", Vector3.new(0.1, 0.85, 0.55), DARK, METAL, CFrame.new(s * 0.58, -0.05, 0.3) * CFrame.Angles(0, 0, s * 0.1))
addPart("DasherGlowLine", Vector3.new(0.06, 0.6, 0.06), CYAN, NEON, CFrame.new(s * 0.63, -0.05, 0.3))
end
end
-- MANTIS BLADES housing (retracted). side = 1 right arm, -1 left arm
function buildMantisParts(addPart, side)
local WHITE, DARK = Color3.fromRGB(226, 228, 224), Color3.fromRGB(26, 28, 34)
local STEEL, RED = Color3.fromRGB(130, 136, 146), Color3.fromRGB(255, 40, 55)
addPart("MantisBracer", Vector3.new(1.14, 0.8, 1.14), DARK, METAL, CFrame.new(0, -0.4, 0))
addPart("MantisPlate", Vector3.new(0.14, 0.9, 0.7), WHITE, METAL, CFrame.new(side * 0.6, -0.1, 0))
addPart("MantisStripe", Vector3.new(0.16, 0.12, 0.72), RED, NEON, CFrame.new(side * 0.6, -0.4, 0))
addPart("MantisVent", Vector3.new(0.5, 0.06, 0.04), RED, NEON, CFrame.new(0, -0.55, -0.58))
addPart("MantisHousing", Vector3.new(0.34, 0.45, 0.36), STEEL, METAL, CFrame.new(0, -0.95, -0.1))
addPart("MantisStub", Vector3.new(0.08, 0.35, 0.22), STEEL, METAL, CFrame.new(0, -1.15, -0.18))
end
-- DAVID'S JACKET: cropped cream jacket, black collar/hem, yellow trim, diamond emblem on the back
function buildJacketParts(addT, addR, addL)
local CREAM, BLACK = Color3.fromRGB(232, 226, 208), Color3.fromRGB(22, 22, 26)
local YELLOW, ORANGE = Color3.fromRGB(255, 196, 40), Color3.fromRGB(255, 110, 20)
addT("JacketBody", Vector3.new(2.12, 1.45, 1.12), CREAM, FABRIC, CFrame.new(0, 0.27, 0))
addT("JacketHem", Vector3.new(2.16, 0.18, 1.16), BLACK, FABRIC, CFrame.new(0, -0.5, 0))
addT("JacketHemStripe", Vector3.new(2.18, 0.06, 1.18), YELLOW, PLASTIC, CFrame.new(0, -0.38, 0))
addT("JacketCollar", Vector3.new(1.5, 0.34, 1.18), BLACK, FABRIC, CFrame.new(0, 1.0, 0.02))
addT("JacketCollarTrim", Vector3.new(1.54, 0.07, 1.2), YELLOW, PLASTIC, CFrame.new(0, 1.2, 0.02))
addT("JacketZip", Vector3.new(0.1, 1.4, 0.05), BLACK, METAL, CFrame.new(0, 0.27, -0.57))
for _, s in ipairs({ -1, 1 }) do
addT("JacketPocket", Vector3.new(0.5, 0.34, 0.06), BLACK, FABRIC, CFrame.new(s * 0.6, -0.18, -0.58))
addT("JacketShoulderPad", Vector3.new(0.6, 0.12, 1.16), YELLOW, PLASTIC, CFrame.new(s * 0.8, 0.99, 0))
addT("JacketSidePanel", Vector3.new(0.06, 1.3, 0.9), BLACK, FABRIC, CFrame.new(s * 1.07, 0.27, 0))
end
local em = CFrame.new(0, 0.38, 0.59) * CFrame.Angles(0, 0, math.rad(45))
addT("JacketEmblemRing", Vector3.new(1.0, 1.0, 0.06), BLACK, PLASTIC, em)
addT("JacketEmblem", Vector3.new(0.72, 0.72, 0.07), ORANGE, NEON, em * CFrame.new(0, 0, 0.01))
addT("JacketEmblemCore", Vector3.new(0.32, 0.32, 0.08), BLACK, PLASTIC, em * CFrame.new(0, 0, 0.02))
addT("JacketEmblemBar", Vector3.new(1.7, 0.1, 0.06), YELLOW, PLASTIC, CFrame.new(0, -0.2, 0.59))
for _, addArm in ipairs({ addR, addL }) do
addArm("JacketSleeve", Vector3.new(1.12, 1.3, 1.12), CREAM, FABRIC, CFrame.new(0, 0.35, 0))
addArm("JacketSleeveBand", Vector3.new(1.14, 0.12, 1.14), BLACK, FABRIC, CFrame.new(0, 0.5, 0))
addArm("JacketSleeveBand2", Vector3.new(1.14, 0.1, 1.14), ORANGE, PLASTIC, CFrame.new(0, 0.28, 0))
addArm("JacketCuff", Vector3.new(1.16, 0.3, 1.16), BLACK, FABRIC, CFrame.new(0, -0.55, 0))
addArm("JacketCuffStripe", Vector3.new(1.18, 0.07, 1.18), YELLOW, PLASTIC, CFrame.new(0, -0.38, 0))
end
end
-- PISTOL (relative to right arm; barrel points along arm -Y)
function buildPistolParts(addPart)
local DARK, STEEL, ORANGE = Color3.fromRGB(30, 32, 38), Color3.fromRGB(150, 156, 166), Color3.fromRGB(255, 120, 20)
addPart("GunSlide", Vector3.new(0.3, 1.2, 0.34), DARK, METAL, CFrame.new(0, -1.55, 0))
addPart("GunBarrel", Vector3.new(0.18, 0.35, 0.18), STEEL, METAL, CFrame.new(0, -2.3, 0.02))
addPart("GunStripe", Vector3.new(0.1, 1.0, 0.06), ORANGE, NEON, CFrame.new(0, -1.55, -0.19))
addPart("GunFrame", Vector3.new(0.28, 0.8, 0.28), STEEL, METAL, CFrame.new(0, -1.35, 0.28))
addPart("GunGrip", Vector3.new(0.28, 0.28, 0.6), DARK, METAL, CFrame.new(0, -1.1, 0.5) * CFrame.Angles(math.rad(-15), 0, 0))
addPart("Muzzle", Vector3.new(0.1, 0.1, 0.1), Color3.new(1, 1, 1), PLASTIC, CFrame.new(0, -2.5, 0))
end
-- ===== v3 IMPLANT MODELS =====
local MDARK, MSTEEL = Color3.fromRGB(28, 30, 36), Color3.fromRGB(125, 132, 142)
local MORANGE, MCYAN, MRED = Color3.fromRGB(255, 120, 20), Color3.fromRGB(0, 235, 255), Color3.fromRGB(255, 40, 55)
-- GRAPPLE LAUNCHER: wrist rig on the back of the left forearm (hook fires along arm -Y)
function buildGrappleParts(addPart)
addPart("GrappleBase", Vector3.new(0.5, 1.0, 0.36), MDARK, METAL, CFrame.new(0, -0.1, 0.62))
addPart("GrappleReelDrum", Vector3.new(0.62, 0.3, 0.3), MSTEEL, METAL, CFrame.new(0, 0.3, 0.62))
addPart("GrappleBarrel", Vector3.new(0.24, 0.8, 0.24), MSTEEL, METAL, CFrame.new(0, -0.85, 0.62))
addPart("GrappleRing", Vector3.new(0.34, 0.1, 0.34), MORANGE, PLASTIC, CFrame.new(0, -0.5, 0.62))
addPart("GrappleTip", Vector3.new(0.14, 0.05, 0.14), MORANGE, NEON, CFrame.new(0, -1.27, 0.62))
end
-- ROCKET FIST: gauntlet on the knuckles of the right arm
function buildRocketFistParts(addPart)
addPart("FistGauntlet", Vector3.new(1.22, 0.8, 1.22), MDARK, METAL, CFrame.new(0, -0.7, 0))
addPart("FistPlate", Vector3.new(1.26, 0.14, 1.26), MORANGE, PLASTIC, CFrame.new(0, -0.3, 0))
addPart("FistKnuckle", Vector3.new(1.0, 0.18, 0.3), MORANGE, NEON, CFrame.new(0, -1.1, -0.55))
addPart("FistNozzle", Vector3.new(0.5, 0.5, 0.5), MSTEEL, METAL, CFrame.new(0, -0.5, 0.62))
addPart("FistNozzleGlow", Vector3.new(0.36, 0.06, 0.36), MRED, NEON, CFrame.new(0, -0.77, 0.62))
end
-- SHOULDER THRUSTERS: jet pods on both shoulders (torso relative)
function buildThrusterParts(addPart)
for _, s in ipairs({ -1, 1 }) do
addPart("ThrustPod", Vector3.new(0.7, 0.9, 0.9), MDARK, METAL, CFrame.new(s * 1.2, 1.05, 0.1))
addPart("ThrustCollar", Vector3.new(0.78, 0.1, 0.98), MORANGE, PLASTIC, CFrame.new(s * 1.2, 1.5, 0.1))
addPart("ThrustNozzle", Vector3.new(0.5, 0.3, 0.5), MSTEEL, METAL, CFrame.new(s * 1.2, 0.5, 0.1))
addPart("ThrustGlow", Vector3.new(0.36, 0.06, 0.36), MCYAN, NEON, CFrame.new(s * 1.2, 0.33, 0.1))
addPart("ThrustStrut", Vector3.new(0.16, 0.8, 0.16), MSTEEL, METAL, CFrame.new(s * 0.95, 0.9, 0.55))
end
end
-- DASH KATANA: sheathed on the left hip (torso relative)
function buildKatanaParts(addPart)
local base = CFrame.new(-1.0, -0.2, 0.62) * CFrame.Angles(0, 0, math.rad(25))
addPart("KatanaBelt", Vector3.new(2.1, 0.2, 1.1), MDARK, FABRIC, CFrame.new(0, -0.85, 0))
addPart("KatanaSheath", Vector3.new(0.16, 2.6, 0.2), MDARK, METAL, base)
addPart("KatanaSheathGlow", Vector3.new(0.05, 2.0, 0.22), MRED, NEON, base * CFrame.new(0.09, -0.1, 0))
addPart("KatanaGuard", Vector3.new(0.42, 0.08, 0.3), Color3.fromRGB(255, 196, 40), METAL, base * CFrame.new(0, 1.35, 0))
addPart("KatanaHilt", Vector3.new(0.14, 0.7, 0.16), MRED, FABRIC, base * CFrame.new(0, 1.75, 0))
end
-- RAILGUN BOOTS (applied to each leg)
function buildRailBootParts(addPart)
addPart("RailBoot", Vector3.new(1.16, 0.8, 1.36), MDARK, METAL, CFrame.new(0, -0.8, -0.1))
addPart("RailCoil", Vector3.new(1.2, 0.1, 1.4), MORANGE, PLASTIC, CFrame.new(0, -0.45, -0.1))
addPart("RailStripe", Vector3.new(0.2, 0.6, 0.06), MRED, NEON, CFrame.new(0, -0.8, -0.8))
addPart("RailCannon", Vector3.new(0.45, 0.45, 1.0), MSTEEL, METAL, CFrame.new(0, -0.75, 0.85))
addPart("RailMuzzle", Vector3.new(0.3, 0.3, 0.06), MRED, NEON, CFrame.new(0, -0.75, 1.36))
end
-- KINETIC BOARD hover emitter pad under each foot
function buildBoardEmitterParts(addPart)
addPart("BoardPad", Vector3.new(1.0, 0.1, 1.1), MDARK, METAL, CFrame.new(0, -1.02, 0))
addPart("BoardPadGlow", Vector3.new(0.8, 0.04, 0.9), MCYAN, NEON, CFrame.new(0, -1.07, 0))
end
-- TITANIUM SKELETON (torso + both arms)
function buildTitaniumParts(addT, addR, addL)
for i, y in ipairs({ 0.7, 0.35, 0.0, -0.35 }) do
addT("TiRib", Vector3.new(1.8 - i * 0.1, 0.09, 0.06), MSTEEL, METAL, CFrame.new(0, y, -0.53))
end
addT("TiSpine", Vector3.new(0.12, 1.9, 0.06), MSTEEL, METAL, CFrame.new(0, 0.1, -0.53))
addT("TiSpineGlow", Vector3.new(0.05, 1.6, 0.04), MCYAN, NEON, CFrame.new(0, 0.1, -0.56))
for _, addArm in ipairs({ addR, addL }) do
addArm("TiRod", Vector3.new(0.1, 1.6, 0.1), MSTEEL, METAL, CFrame.new(0, 0, -0.55))
addArm("TiElbow", Vector3.new(1.08, 0.12, 1.08), MSTEEL, METAL, CFrame.new(0, 0, 0))
end
end
-- BIONIC JOINTS (elbows / knees: applied to each arm and each leg)
function buildJointParts(addPart)
addPart("JointRing", Vector3.new(1.1, 0.16, 1.1), MSTEEL, METAL, CFrame.new(0, 0.05, 0))
addPart("JointGlow", Vector3.new(1.14, 0.04, 1.14), MCYAN, NEON, CFrame.new(0, 0.05, 0))
end
-- OVERCLOCKED HEART (torso front)
function buildHeartParts(addPart)
addPart("HeartCase", Vector3.new(0.6, 0.6, 0.12), MDARK, METAL, CFrame.new(0.4, 0.5, -0.54))
addPart("HeartGlow", Vector3.new(0.34, 0.34, 0.08), MRED, NEON, CFrame.new(0.4, 0.5, -0.6) * CFrame.Angles(0, 0, math.rad(45)))
addPart("HeartPipeA", Vector3.new(0.08, 0.6, 0.08), MRED, NEON, CFrame.new(0.4, 0.95, -0.54))
addPart("HeartPipeB", Vector3.new(0.5, 0.08, 0.08), MRED, NEON, CFrame.new(0.15, 0.95, -0.54))
end
-- OXYGEN BOOSTER (torso front-left)
function buildOxygenParts(addPart)
addPart("OxyTank", Vector3.new(0.45, 0.9, 0.3), MSTEEL, METAL, CFrame.new(-0.6, 0.35, -0.58))
addPart("OxyBandA", Vector3.new(0.5, 0.1, 0.34), MCYAN, NEON, CFrame.new(-0.6, 0.6, -0.58))
addPart("OxyBandB", Vector3.new(0.5, 0.1, 0.34), MCYAN, NEON, CFrame.new(-0.6, 0.1, -0.58))
addPart("OxyTube", Vector3.new(0.08, 0.6, 0.08), MDARK, PLASTIC, CFrame.new(-0.3, 0.9, -0.55))
end
-- MOTION SCANNER (head)
function buildScannerParts(addPart)
addPart("ScanVisor", Vector3.new(1.4, 0.26, 0.1), MDARK, METAL, CFrame.new(0, 0.1, -0.56))
addPart("ScanGlow", Vector3.new(1.2, 0.08, 0.06), MCYAN, NEON, CFrame.new(0, 0.1, -0.62))
for _, s in ipairs({ -1, 1 }) do
addPart("ScanPod", Vector3.new(0.14, 0.4, 0.3), MSTEEL, METAL, CFrame.new(s * 1.0, 0.05, 0))
end
end
-- ==========================================
-- IN-GAME AUGMENTS
-- ==========================================
function makeWeldedAdder(basePart, model)
return function(name, size, color, material, offset)
local p = new("Part", {
Name = name, Size = size, Color = color, Material = material, CanCollide = false, CanQuery = false,
CanTouch = false, Massless = true, CFrame = basePart.CFrame * offset,
}, model)
if name == "Muzzle" then p.Transparency = 1 end
new("WeldConstraint", { Part0 = basePart, Part1 = p }, p)
if name == "SandyGlowCore" then
new("PointLight", { Color = Color3.fromRGB(0, 235, 255), Range = 8, Brightness = 0 }, p)
elseif name == "HeartGlow" then
new("PointLight", { Color = Color3.fromRGB(255, 40, 55), Range = 8, Brightness = 0 }, p)
end
return p
end
end
function applyGlow(prefix, color, lightBrightness)
local augs = character and character:FindFirstChild("PlayerCyberwareAugments")
if not augs then return end
for _, p in ipairs(augs:GetChildren()) do
if p:IsA("BasePart") and string.sub(p.Name, 1, #prefix) == prefix then
p.Color = color
local light = p:FindFirstChildOfClass("PointLight")
if light and lightBrightness then light.Brightness = lightBrightness end
end
end
end
function pulseSandevistanGlow(session)
task.spawn(function()
local base, hot = Color3.fromRGB(0, 235, 255), Color3.fromRGB(220, 255, 255)
while not systemDestroyed and isSandevistanActive and session == sandySession do
local a = (math.sin(os.clock() * 12) + 1) / 2
applyGlow("SandyGlow", base:Lerp(hot, a), 1 + a * 3)
task.wait(0.05)
end
applyGlow("SandyGlow", base, 0)
end)
end
refreshVisualAugments = function()
if systemDestroyed or not character then return end
local old = character:FindFirstChild("PlayerCyberwareAugments")
if old then old:Destroy() end
local model = new("Model", { Name = "PlayerCyberwareAugments" }, character)
local torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")
local head = character:FindFirstChild("Head")
local rArm, lArm = getArm("R"), getArm("L")
local legs = {}
for _, n in ipairs({ "Left Leg", "Right Leg", "LeftLowerLeg", "RightLowerLeg" }) do
local l = character:FindFirstChild(n)
if l then table.insert(legs, l) end
end
if isEq("LaunchCannon") and rArm then buildCannonParts(makeWeldedAdder(rArm, model)) end
if isEq("MantisBlades") then
if rArm and not isEq("LaunchCannon") then buildMantisParts(makeWeldedAdder(rArm, model), 1) end
if lArm then buildMantisParts(makeWeldedAdder(lArm, model), -1) end
end
if isEq("Sandevistan") and torso then buildSandevistanParts(makeWeldedAdder(torso, model)) end
if isEq("Dasher") then
for _, leg in ipairs(legs) do buildDasherParts(makeWeldedAdder(leg, model)) end
end
if wornJacket and torso and rArm and lArm then
buildJacketParts(makeWeldedAdder(torso, model), makeWeldedAdder(rArm, model), makeWeldedAdder(lArm, model))
end
-- v3 implants
if isEq("GrappleLauncher") and lArm then buildGrappleParts(makeWeldedAdder(lArm, model)) end
if isEq("RocketFist") and rArm then buildRocketFistParts(makeWeldedAdder(rArm, model)) end
if isEq("ShoulderThrusters") and torso then buildThrusterParts(makeWeldedAdder(torso, model)) end
if isEq("DashKatana") and torso then buildKatanaParts(makeWeldedAdder(torso, model)) end
if isEq("RailgunBoots") then for _, leg in ipairs(legs) do buildRailBootParts(makeWeldedAdder(leg, model)) end end
if isEq("KineticBoard") then for _, leg in ipairs(legs) do buildBoardEmitterParts(makeWeldedAdder(leg, model)) end end
if isEq("TitaniumSkeleton") and torso and rArm and lArm then
buildTitaniumParts(makeWeldedAdder(torso, model), makeWeldedAdder(rArm, model), makeWeldedAdder(lArm, model))
end
if isEq("BionicJoints") then
for _, part in ipairs({ rArm, lArm }) do if part then buildJointParts(makeWeldedAdder(part, model)) end end
for _, leg in ipairs(legs) do buildJointParts(makeWeldedAdder(leg, model)) end
end
if isEq("OverclockedHeart") and torso then buildHeartParts(makeWeldedAdder(torso, model)) end
if isEq("OxygenBooster") and torso then buildOxygenParts(makeWeldedAdder(torso, model)) end
if isEq("MotionScanner") and head then buildScannerParts(makeWeldedAdder(head, model)) end
updateViewportDummy()
end
refreshHeldGun = function()
if heldGunModel then heldGunModel:Destroy() heldGunModel = nil end
if systemDestroyed or not character then return end
if heldItem() ~= "Pistol" then return end
local arm = getArm("R")
if not arm then return end
local m = new("Model", { Name = "HeldPistol" }, character)
buildPistolParts(makeWeldedAdder(arm, m))
heldGunModel = m
end
-- ==========================================
-- VISUAL EFFECT HELPERS
-- ==========================================
function createShockwaveRing(cframe, startSize, endSize, color, duration, isFlatHorizontal)
if systemDestroyed then return end
local ring = new("Part", {
Shape = Enum.PartType.Cylinder, Size = Vector3.new(0.2, startSize, startSize), Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = color, Transparency = 0.25,
})
ring.CFrame = isFlatHorizontal and (cframe * CFrame.Angles(0, 0, math.rad(90))) or (cframe * CFrame.Angles(0, math.rad(90), 0))
ring.Parent = workspace
local tween = TweenService:Create(ring, TweenInfo.new(duration, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
{ Size = Vector3.new(0.05, endSize, endSize), Transparency = 1 })
tween:Play()
tween.Completed:Connect(function() ring:Destroy() end)
end
function createAfterimage(colorIndex)
if systemDestroyed or not character then return end
local cloneModel = Instance.new("Model")
cloneModel.Name = "SandevistanAfterimage"
local chosenColor = trailColors[(colorIndex % #trailColors) + 1]
for _, part in ipairs(character:GetChildren()) do
if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" and part.Transparency < 1 then
local cp = new("Part", {
Size = part.Size, CFrame = part.CFrame, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false,
Material = Enum.Material.Neon, Color = chosenColor, Transparency = 0.35,
}, cloneModel)
local mesh = part:FindFirstChildOfClass("SpecialMesh")
if mesh then
local cm = mesh:Clone()
cm.TextureId = ""
cm.Parent = cp
end
TweenService:Create(cp, TweenInfo.new(0.45, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Transparency = 1 }):Play()
end
end
cloneModel.Parent = workspace
task.delay(0.45, function() cloneModel:Destroy() end)
end
function shakeCamera(intensity, duration)
task.spawn(function()
local t0 = os.clock()
while os.clock() - t0 < duration and humanoid and humanoid.Parent and not systemDestroyed do
local fade = 1 - (os.clock() - t0) / duration
humanoid.CameraOffset = Vector3.new((math.random() - 0.5) * intensity * fade, (math.random() - 0.5) * intensity * fade, 0)
task.wait()
end
if humanoid and humanoid.Parent and not dasherCharging then humanoid.CameraOffset = Vector3.zero end
end)
end
function createExplosionFX(position)
if systemDestroyed then return end
local ex = new("Explosion", {
Position = position, BlastRadius = 9, BlastPressure = 0, DestroyJointRadiusPercent = 0,
ExplosionType = Enum.ExplosionType.NoCraters,
}, workspace)
local function makeBall(size, color)
return new("Part", {
Shape = Enum.PartType.Ball, Size = Vector3.new(size, size, size), Position = position, Anchored = true,
CanCollide = false, CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = color, Transparency = 0.1,
}, workspace)
end
local fire = makeBall(2, Color3.fromRGB(255, 130, 20))
TweenService:Create(fire, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = Vector3.new(18, 18, 18), Transparency = 1 }):Play()
task.delay(0.55, function() fire:Destroy() end)
local core = makeBall(1.5, Color3.fromRGB(255, 240, 160))
TweenService:Create(core, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { Size = Vector3.new(9, 9, 9), Transparency = 1 }):Play()
task.delay(0.35, function() core:Destroy() end)
for _ = 1, 14 do
local spark = new("Part", {
Size = Vector3.new(0.4, 0.4, 0.4), Position = position, Anchored = true, CanCollide = false, CanQuery = false,
CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 190 + math.random(0, 50), 50),
}, workspace)
local dir = Vector3.new(math.random() - 0.5, math.random() * 0.8 + 0.2, math.random() - 0.5).Unit
TweenService:Create(spark, TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Position = position + dir * math.random(10, 18), Transparency = 1, Size = Vector3.new(0.1, 0.1, 0.1),
}):Play()
task.delay(0.55, function() spark:Destroy() end)
end
createShockwaveRing(CFrame.new(position), 2, 26, Color3.fromRGB(255, 140, 30), 0.4, true)
createShockwaveRing(CFrame.new(position), 1, 16, Color3.fromRGB(255, 240, 160), 0.3, true)
shakeCamera(1.2, 0.3)
end
-- wind streak that stays in the world while you fly past it
function windStreak(pos, dir)
local cf = CFrame.lookAt(pos, pos + dir)
local p = pos + cf.RightVector * (math.random() - 0.5) * 10 + cf.UpVector * (math.random() - 0.5) * 8 - dir * math.random(0, 8)
local len = math.random(6, 12)
local s = new("Part", {
Size = Vector3.new(0.12, 0.12, len), CFrame = CFrame.lookAt(p, p + dir), Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(215, 245, 255), Transparency = 0.3,
}, workspace)
TweenService:Create(s, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Transparency = 1, Size = Vector3.new(0.05, 0.05, len * 1.6),
}):Play()
task.delay(0.32, function() s:Destroy() end)
end
-- ==========================================
-- STAMINA
-- ==========================================
function trySpend(amount)
if stamina < amount then
if flashStaminaBar then flashStaminaBar() end
return false
end
stamina -= amount
lastStaminaUse = os.clock()
if updateStaminaBar then updateStaminaBar() end
-- Syn Lungs assist every stamina-powered activation (counts as a Syn Lungs use)
if isEq("SynLungs") then recordUse("SynLungs") end
return true
end
-- ==========================================
-- MASTERY + QUEST TRACKING ENGINE
-- ==========================================
function questUnlocked(q) return not q.Requires or questClaimed[q.Requires] end
function questComplete(q)
local prog = questProgress[q.Id]
for i, o in ipairs(q.Objectives) do if prog[i] < o.Target then return false end end
return true
end
function questActive(q) return questUnlocked(q) and not questClaimed[q.Id] end
-- events: "steps" (amount), "jumps" (amount), "use" (itemId)
function trackEvent(kind, itemId, amount)
amount = amount or 1
for _, q in ipairs(QUESTS) do
if questActive(q) then
local prog = questProgress[q.Id]
local changed = false
for i, o in ipairs(q.Objectives) do
if o.Type == kind and (kind ~= "use" or o.Item == itemId) and prog[i] < o.Target then
prog[i] = math.min(o.Target, prog[i] + amount)
changed = true
end
end
if changed and not questDone[q.Id] and questComplete(q) then
questDone[q.Id] = true
notify("QUEST COMPLETE: " .. q.Name .. " - CLAIM REWARD", rarityColor(q.Rarity))
end
end
end
questUiDirty = true
end
-- every cyberware activation goes through here: mastery usage + quest progress
function recordUse(id)
if systemDestroyed or not ITEM_BY_ID[id] then return end
local before = masteryLevel(id)
usage[id] = (usage[id] or 0) + 1
local after = masteryLevel(id)
trackEvent("use", id, 1)
if after > before then
notify(string.format("MASTERY UP: %s -> LEVEL %d", string.upper(ITEM_BY_ID[id].Name), after), rarityColor(ITEM_BY_ID[id].Rarity))
if applyStats then applyStats() end
end
uiDirty = true
end
function grantRewards(r)
local parts = {}
if r.Eddies then eddies += r.Eddies table.insert(parts, r.Eddies .. " eddies") end
if r.Steps then steps += r.Steps table.insert(parts, r.Steps .. " steps") end
if r.Mats then
for _, m in ipairs(MATERIALS) do
local n = r.Mats[m.Id]
if n then matInv[m.Id] += n table.insert(parts, n .. "x " .. m.Name) end
end
end
if r.Blueprints then
for _, id in ipairs(r.Blueprints) do
if blueprints[id] then
eddies += 100 -- duplicate blueprint converts to eddies
table.insert(parts, "duplicate blueprint -> 100 eddies")
else
blueprints[id] = true
table.insert(parts, "BLUEPRINT: " .. ITEM_BY_ID[id].Name)
end
end
end
return table.concat(parts, ", ")
end
function claimQuest(q)
-- all checks first; claimed flag is set BEFORE paying out so a reward can never be claimed twice
if questClaimed[q.Id] or not questUnlocked(q) or not questComplete(q) then return end
questClaimed[q.Id] = true
local text = grantRewards(q.Rewards)
notify("REWARDS CLAIMED: " .. text, rarityColor(q.Rarity))
for _, nq in ipairs(QUESTS) do
if nq.Requires == q.Id then notify("NEW QUEST UNLOCKED: " .. nq.Name, C.CYAN) end
end
updateHudAndMenus()
end
function resetQuestCategory(cat)
for _, q in ipairs(QUESTS) do
if q.Cat == cat then
for i = 1, #q.Objectives do questProgress[q.Id][i] = 0 end
questClaimed[q.Id], questDone[q.Id] = false, false
end
end
end
function checkQuestResets()
local now = os.time()
for cat, period in pairs(QUEST_RESET) do
if now >= resetAt[cat] then
resetQuestCategory(cat)
resetAt[cat] = now + period
notify(string.upper(cat) .. " QUESTS HAVE RESET", C.YELLOW)
questUiDirty = true
end
end
end
-- walking loot: materials + blueprint discoveries (higher rarity = lower weight)
function rollStepLoot()
if math.random() < STEP_DROP_CHANCE then
local total = 0
for _, m in ipairs(MATERIALS) do total += m.DropWeight end
local roll = math.random() * total
for _, m in ipairs(MATERIALS) do
roll -= m.DropWeight
if roll <= 0 then
matInv[m.Id] += 1
notify("SALVAGED: +1 " .. m.Name, rarityColor(m.Rarity))
uiDirty = true
break
end
end
end
if math.random() < BLUEPRINT_DISCOVERY_CHANCE then
local pool = {}
for _, it in ipairs(ITEMS) do
if it.Blueprint and not blueprints[it.Id] then
for _ = 1, (it.Rarity == "Epic") and 3 or 1 do table.insert(pool, it) end
end
end
if #pool > 0 then
local it = pool[math.random(#pool)]
blueprints[it.Id] = true
notify("BLUEPRINT DISCOVERED: " .. it.Name, rarityColor(it.Rarity))
uiDirty = true
end
end
end
-- ==========================================
-- LOOPSPEED ENFORCER
-- ==========================================
RunService.Heartbeat:Connect(function()
if systemDestroyed or not humanoid or humanoid.Health <= 0 then return end
local target
if isImplanting then target = 0
elseif isDashing then target = 4
elseif isSlashing then target = 8
elseif dasherCharging then target = 5
elseif isCannonJumping then target = 6
elseif speedBoosted() then target = baseWalkSpeed + extraSpeed() end
if target and humanoid.WalkSpeed ~= target then humanoid.WalkSpeed = target end
end)
-- ==========================================
-- ARM RIG (procedural gun / slash animations)
-- ==========================================
function setupArmRig()
armRig = {}
local function reg(key, motor)
if motor and motor:IsA("Motor6D") then armRig[key] = { motor = motor, orig = motor.C0, a = 0, r = 0, dirty = false } end
end
local torso = character:FindFirstChild("Torso")
if torso then
reg("R", torso:FindFirstChild("Right Shoulder"))
reg("L", torso:FindFirstChild("Left Shoulder"))
else
local ru, lu = character:FindFirstChild("RightUpperArm"), character:FindFirstChild("LeftUpperArm")
if ru then reg("R", ru:FindFirstChild("RightShoulder")) end
if lu then reg("L", lu:FindFirstChild("LeftShoulder")) end
end
end
function applyArm(rig, a, r)
local o = rig.orig
local pos = o.Position
rig.motor.C0 = CFrame.new(pos) * CFrame.Angles(a, 0, r) * (CFrame.new(-pos) * o)
end
function restoreArms()
for _, rig in pairs(armRig) do
if rig.motor and rig.motor.Parent then rig.motor.C0 = rig.orig end
rig.a, rig.r, rig.dirty = 0, 0, false
end
if humanoid and humanoid.Parent and autoRotateSuppressed then humanoid.AutoRotate = true end
autoRotateSuppressed = false
end
RunService.RenderStepped:Connect(function(dt)
if systemDestroyed or not character or not humanoid or humanoid.Health <= 0 then return end
local ready = gunReady()
local tRa, tRr, tLa, tLr, speed = 0, 0, 0, 0, 18
local posing = false
if slashPose then
tRa, tRr, tLa, tLr = slashPose.ra, slashPose.rr, slashPose.la, slashPose.lr
speed, posing = 36, true
elseif ready then
posing = true
local pitch = math.asin(math.clamp(camera.CFrame.LookVector.Y, -1, 1))
gunKick = gunKick * math.exp(-dt * 12)
if reloading then
-- reload: gun dips to chest height, off-hand sweeps in
local wob = math.sin(os.clock() * 9) * 0.06
tRa, tRr = math.rad(30) + wob, math.rad(-22)
tLa, tLr = math.rad(64) - wob, math.rad(34)
else
-- ready idle: pistol up, off-hand supports, gentle breathing sway
local sway = math.sin(os.clock() * 1.8) * 0.025
tRa, tRr = math.rad(86) + pitch * 0.9 + sway + gunKick, 0
tLa, tLr = math.rad(62) + pitch * 0.5, math.rad(30)
end
end
for key, rig in pairs(armRig) do
if rig.motor and rig.motor.Parent then
local ta, tr = tRa, tRr
if key == "L" then ta, tr = tLa, tLr end
local k = math.min(1, dt * speed)
rig.a += (ta - rig.a) * k
rig.r += (tr - rig.r) * k
if posing or math.abs(rig.a) > 0.004 or math.abs(rig.r) > 0.004 then
applyArm(rig, rig.a, rig.r)
rig.motor.Transform = CFrame.new()
rig.dirty = true
elseif rig.dirty then
rig.motor.C0 = rig.orig
rig.dirty = false
end
end
end
-- face where the camera looks while the gun is drawn
if ready and rootPart and not isDashing and not isSlashing and not isImplanting then
local look = camera.CFrame.LookVector
local flat = Vector3.new(look.X, 0, look.Z)
if flat.Magnitude > 0.01 then
if humanoid.AutoRotate then humanoid.AutoRotate = false autoRotateSuppressed = true end
rootPart.CFrame = CFrame.lookAt(rootPart.Position, rootPart.Position + flat)
end
elseif autoRotateSuppressed then
humanoid.AutoRotate = true
autoRotateSuppressed = false
end
end)
-- ==========================================
-- ABILITIES
-- ==========================================
endSandevistan = function()
if not isSandevistanActive then return end
isSandevistanActive = false
sandySession += 1
restoreSpeed()
if systemDestroyed then return end
if mSpecial("Sandevistan") then stamina = math.min(getMaxStamina(), stamina + 20) end -- L5 Afterglow
local t = TweenService:Create(colorCorrection, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
TintColor = Color3.new(1, 1, 1), Saturation = 0, Contrast = 0, Brightness = 0,
})
t:Play()
t.Completed:Connect(function() if not isSandevistanActive then colorCorrection.Enabled = false end end)
end
sandyLineColors = { Color3.fromRGB(90, 255, 140), Color3.fromRGB(0, 235, 255), Color3.fromRGB(220, 255, 230) }
function activateSandevistan()
if systemDestroyed or isImplanting or not isEq("Sandevistan") then return end
if isSandevistanActive or cooldowns.Sandevistan > 0 or not humanoid or humanoid.Health <= 0 then return end
if not trySpend(sandyStartCost()) then return end
recordUse("Sandevistan")
captureBase()
isSandevistanActive = true
sandySession += 1
local session = sandySession
cooldowns.Sandevistan = 3.0 * mCd("Sandevistan")
updateHotbars()
playSandevistanActivationFX()
pulseSandevistanGlow(session)
task.spawn(function() -- afterimages
local count = 0
while not systemDestroyed and isSandevistanActive and session == sandySession and humanoid and humanoid.Health > 0 do
if rootPart and rootPart.AssemblyLinearVelocity.Magnitude > 2 then
createAfterimage(count)
count += 1
end
task.wait(0.04)
end
end)
task.spawn(function() -- speed lines
while not systemDestroyed and isSandevistanActive and session == sandySession do
local moving = rootPart and rootPart.AssemblyLinearVelocity.Magnitude > 4
for _ = 1, moving and 3 or 1 do
spawnSpeedline(sandyLineColors[math.random(#sandyLineColors)], 0.3, math.random(2, 3))
end
task.wait(0.05)
end
end)
task.delay(SANDEVISTAN_MAX_TIME, function() if session == sandySession then endSandevistan() end end)
end
-- ---------- DASHER (hold to charge, auto-launch at 100%) ----------
chargeFrame = new("Frame", {
Name = "DasherCharge", AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.66, 0), Size = UDim2.new(0, 280, 0, 28),
BackgroundColor3 = Color3.fromRGB(10, 16, 20), BackgroundTransparency = 0.1, BorderSizePixel = 0, Visible = false,
}, mainGui)
chargeStroke = new("UIStroke", { Color = C.CYAN, Thickness = 2 }, chargeFrame)
chargeFill = new("Frame", { Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = C.CYAN, BorderSizePixel = 0 }, chargeFrame)
chargeLabel = new("TextLabel", {
Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = "DASHER 0%", TextColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.GothamBlack, TextSize = 14, ZIndex = 3,
}, chargeFrame)
-- generic meter for thrusters / other held mobility
mobBar = new("Frame", {
Name = "MobilityBar", AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.72, 0), Size = UDim2.new(0, 260, 0, 22),
BackgroundColor3 = Color3.fromRGB(10, 16, 20), BackgroundTransparency = 0.1, BorderSizePixel = 0, Visible = false,
}, mainGui)
mobStroke = new("UIStroke", { Color = C.ORANGE, Thickness = 2 }, mobBar)
mobFill = new("Frame", { Size = UDim2.new(1, 0, 1, 0), BackgroundColor3 = C.ORANGE, BorderSizePixel = 0 }, mobBar)
mobLabel = new("TextLabel", {
Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = "", TextColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.GothamBlack, TextSize = 12, ZIndex = 3,
}, mobBar)
function setMobBar(text, ratio, color)
mobBar.Visible = true
mobFill.Size = UDim2.new(math.clamp(ratio, 0, 1), 0, 1, 0)
mobFill.BackgroundColor3, mobStroke.Color = color, color
mobLabel.Text = string.format("%s %d%%", text, math.floor(ratio * 100))
end
function hideMobBar() mobBar.Visible = false end
chargeFov = 70
function hideCharge()
chargeFrame.Visible = false
if humanoid and humanoid.Parent then humanoid.CameraOffset = Vector3.zero end
applyGlow("DasherGlow", Color3.fromRGB(0, 235, 255))
end
endDasherCharge = function()
if not dasherCharging then return end
dasherCharging = false
chargeToken += 1
hideCharge()
TweenService:Create(camera, TweenInfo.new(0.2), { FieldOfView = chargeFov }):Play()
restoreSpeed()
end
function launchDasher()
local cost = dasherCost()
if not trySpend(cost) then endDasherCharge() return end
recordUse("Dasher")
if mSpecial("Dasher") then stamina = math.min(getMaxStamina(), stamina + cost * 0.5) end -- L5 Ion Recycler
dasherCharging = false
chargeToken += 1
isDashing = true
cooldowns.Dasher = 2.5 * mCd("Dasher")
updateHotbars()
hideCharge()
if not rootPart or not rootPart.Parent then isDashing = false return end
local look = camera.CFrame.LookVector
local flat = Vector3.new(look.X, 0, look.Z)
if flat.Magnitude < 0.01 then flat = rootPart.CFrame.LookVector end
flat = flat.Unit
local dir = (flat + Vector3.new(0, 0.16 + math.max(look.Y, 0) * 0.5, 0)).Unit
local startPos = rootPart.Position
rootPart.CFrame = CFrame.lookAt(startPos, startPos + flat)
-- launch burst: air rings, ground blast, flash, speed lines, FOV punch
local frontCF = CFrame.lookAt(startPos, startPos + dir)
createShockwaveRing(frontCF, 3, 20, Color3.fromRGB(235, 250, 255), 0.35, false)
createShockwaveRing(frontCF * CFrame.new(0, 0, 2), 2, 12, C.CYAN, 0.3, false)
createShockwaveRing(CFrame.new(startPos - Vector3.new(0, 2.8, 0)), 3, 26, Color3.fromRGB(235, 245, 255), 0.4, true)
createShockwaveRing(CFrame.new(startPos - Vector3.new(0, 2.8, 0)), 2, 16, Color3.fromRGB(255, 170, 60), 0.3, true)
playSpeedlines(46, Color3.fromRGB(215, 245, 255), 0)
flashOverlay.BackgroundColor3 = Color3.fromRGB(200, 240, 255)
flashOverlay.BackgroundTransparency = 0.55
TweenService:Create(flashOverlay, TweenInfo.new(0.35), { BackgroundTransparency = 1 }):Play()
TweenService:Create(camera, TweenInfo.new(0.12, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { FieldOfView = chargeFov + 24 }):Play()
shakeCamera(1.6, 0.35)
applyGlow("DasherGlow", Color3.fromRGB(255, 255, 255))
local attachment = new("Attachment", {}, rootPart)
local lv = new("LinearVelocity", {
Attachment0 = attachment, MaxForce = 1e7, VelocityConstraintMode = Enum.VelocityConstraintMode.Vector,
VectorVelocity = dir * dasherSpeed(),
}, rootPart)
humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
-- vapor trail
local a0 = new("Attachment", { Position = Vector3.new(0, 1, 0) }, rootPart)
local a1 = new("Attachment", { Position = Vector3.new(0, -1, 0) }, rootPart)
local trail = new("Trail", {
Attachment0 = a0, Attachment1 = a1, Lifetime = 0.4, LightEmission = 1,
Color = ColorSequence.new(Color3.new(1, 1, 1), C.CYAN),
Transparency = NumberSequence.new(0.1, 1), WidthScale = NumberSequence.new(1, 0),
}, rootPart)
local duration = 0.4
local t0, ringT, c = os.clock(), 0, 0
while os.clock() - t0 < duration and not systemDestroyed and humanoid and humanoid.Health > 0 and rootPart.Parent do
local pos = rootPart.Position
for _ = 1, 3 do windStreak(pos, dir) end
createAfterimage(c)
c += 1
if os.clock() - ringT > 0.06 then
ringT = os.clock()
createShockwaveRing(CFrame.lookAt(pos - dir * 2, pos + dir), 3, 14, Color3.fromRGB(220, 242, 255), 0.3, false)
end
task.wait(0.03)
end
lv:Destroy() attachment:Destroy()
if rootPart and rootPart.Parent then rootPart.AssemblyLinearVelocity = dir * 35 end
task.delay(0.5, function() trail:Destroy() a0:Destroy() a1:Destroy() end)
isDashing = false
restoreSpeed()
applyGlow("DasherGlow", Color3.fromRGB(0, 235, 255))
TweenService:Create(camera, TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { FieldOfView = chargeFov }):Play()
end
function beginDasherCharge()
if systemDestroyed or isImplanting or not isEq("Dasher") then return end
if dasherCharging or isDashing or isCannonJumping or isSlashing or isMobility or cooldowns.Dasher > 0 or not humanoid or humanoid.Health <= 0 then return end
if stamina < dasherCost() then flashStaminaBar() return end
captureBase()
dasherCharging = true
chargeToken += 1
local tok = chargeToken
chargeFov = camera.FieldOfView
chargeFrame.Size = UDim2.new(0, 0, 0, 28)
chargeFrame.Visible = true
chargeFill.Size = UDim2.new(0, 0, 1, 0)
chargeFill.BackgroundColor3 = C.CYAN
chargeStroke.Color = C.CYAN
TweenService:Create(chargeFrame, TweenInfo.new(0.18, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Size = UDim2.new(0, 280, 0, 28) }):Play()
task.spawn(function()
local t0, windup, ringT, lineT = os.clock(), dasherWindup(), 0, 0
local charge = 0
while dasherCharging and tok == chargeToken and not systemDestroyed and humanoid and humanoid.Health > 0 do
charge = math.clamp((os.clock() - t0) / windup, 0, 1)
chargeFill.Size = UDim2.new(charge, 0, 1, 0)
chargeFill.BackgroundColor3 = C.CYAN:Lerp(Color3.fromRGB(255, 230, 160), charge)
chargeLabel.Text = string.format("DASHER %d%%", math.floor(charge * 100))
camera.FieldOfView = chargeFov - 12 * charge
humanoid.CameraOffset = Vector3.new((math.random() - 0.5) * 0.25 * charge, (math.random() - 0.5) * 0.25 * charge, 0)
applyGlow("DasherGlow", C.CYAN:Lerp(Color3.fromRGB(255, 200, 120), charge))
if os.clock() - ringT > 0.12 and rootPart then
ringT = os.clock()
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 10, 1.5, C.CYAN:Lerp(Color3.new(1, 1, 1), charge), 0.3, true)
end
if charge > 0.5 and os.clock() - lineT > 0.07 then
lineT = os.clock()
spawnSpeedline(Color3.fromRGB(190, 240, 255), 0.3, 2)
end
if charge >= 1 then break end
task.wait()
end
if tok ~= chargeToken or not dasherCharging then return end -- cancelled
chargeLabel.Text = "DASHER 100%"
chargeFill.BackgroundColor3 = Color3.new(1, 1, 1)
launchDasher()
end)
end
-- ---------- LAUNCH CANNON ----------
function activateLaunchCannon()
if systemDestroyed or isImplanting or not isEq("LaunchCannon") then return end
if isCannonJumping or isDashing or isSlashing or dasherCharging or isMobility or cooldowns.LaunchCannon > 0 or not humanoid or humanoid.Health <= 0 then return end
local rightArm = getArm("R")
if not rightArm then return end
if not trySpend(cannonCost()) then return end
recordUse("LaunchCannon")
captureBase()
isCannonJumping = true
cooldowns.LaunchCannon = 4.0 * mCd("LaunchCannon")
updateHotbars()
local fireModel = new("Model", {}, character)
local muzzle = new("Part", {
Shape = Enum.PartType.Ball, Size = Vector3.new(0.4, 0.4, 0.4), Color = Color3.fromRGB(255, 170, 40), Material = Enum.Material.Neon,
CanCollide = false, CanQuery = false, Massless = true, CFrame = rightArm.CFrame * CFrame.new(0, -2.7, 0),
}, fireModel)
new("WeldConstraint", { Part0 = rightArm, Part1 = muzzle }, muzzle)
local baseFov = camera.FieldOfView
TweenService:Create(camera, TweenInfo.new(0.25), { FieldOfView = baseFov - 6 }):Play()
TweenService:Create(muzzle, TweenInfo.new(0.25), { Size = Vector3.new(1.6, 1.6, 1.6), Color = Color3.fromRGB(255, 240, 160) }):Play()
createShockwaveRing(rootPart.CFrame * CFrame.new(0, -2.8, 0), 8, 1.5, Color3.fromRGB(255, 140, 30), 0.25, true)
task.wait(0.25)
if systemDestroyed or not humanoid or humanoid.Health <= 0 then fireModel:Destroy() isCannonJumping = false return end
createExplosionFX(rootPart.Position - Vector3.new(0, 2.8, 0))
createShockwaveRing(rootPart.CFrame, 1.5, 11, Color3.fromRGB(255, 200, 80), 0.25, false)
TweenService:Create(camera, TweenInfo.new(0.12), { FieldOfView = baseFov + 14 }):Play()
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
local v = rootPart.AssemblyLinearVelocity
local lk = rootPart.CFrame.LookVector
rootPart.AssemblyLinearVelocity = Vector3.new(v.X + lk.X * 40, cannonPower(), v.Z + lk.Z * 40)
if mSpecial("LaunchCannon") then -- L5 Twin Charge: airburst adds lift
task.delay(0.3, function()
if systemDestroyed or not rootPart or not rootPart.Parent then return end
createExplosionFX(rootPart.Position - Vector3.new(0, 2.8, 0))
local vv = rootPart.AssemblyLinearVelocity
rootPart.AssemblyLinearVelocity = Vector3.new(vv.X, vv.Y + 35, vv.Z)
end)
end
task.spawn(function()
for i = 1, 14 do
if systemDestroyed or not humanoid or humanoid.Health <= 0 then break end
createAfterimage(i)
task.wait(0.035)
end
end)
task.wait(0.35)
isCannonJumping = false
restoreSpeed()
TweenService:Create(camera, TweenInfo.new(0.3), { FieldOfView = baseFov }):Play()
fireModel:Destroy()
end
-- ---------- MANTIS BLADES (slash = dash) ----------
function extendBlade(arm)
local model = new("Model", { Name = "MantisBlade" }, character)
local function seg(color, material, width, depth, zOff)
local p = new("Part", {
Size = Vector3.new(width, 0.3, depth), Color = color, Material = material, CanCollide = false, CanQuery = false,
CanTouch = false, Massless = true,
}, model)
local w = new("Weld", { Part0 = arm, Part1 = p, C0 = CFrame.new(0, -1.3, zOff) }, p)
TweenService:Create(p, TweenInfo.new(0.08), { Size = Vector3.new(width, 4.4, depth) }):Play()
TweenService:Create(w, TweenInfo.new(0.08), { C0 = CFrame.new(0, -1.1 - 2.2, zOff) }):Play()
end
seg(Color3.fromRGB(190, 196, 206), METAL, 0.1, 0.3, -0.18)
seg(Color3.fromRGB(255, 50, 65), NEON, 0.05, 0.06, -0.36)
return model
end
function createSlashArc(cf, roll, color)
local arc = new("Part", {
Size = Vector3.new(0.18, 0.18, 6), Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false,
Material = Enum.Material.Neon, Color = color, Transparency = 0.1,
CFrame = cf * CFrame.Angles(0, 0, math.rad(roll)) * CFrame.Angles(0, math.rad(90), 0),
}, workspace)
TweenService:Create(arc, TweenInfo.new(0.28, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Size = Vector3.new(0.04, 0.04, 14), Transparency = 1,
}):Play()
task.delay(0.3, function() arc:Destroy() end)
end
function activateMantis()
if systemDestroyed or isImplanting or not isEq("MantisBlades") then return end
if isSlashing or isDashing or isCannonJumping or dasherCharging or isMobility or cooldowns.MantisBlades > 0 or not humanoid or humanoid.Health <= 0 then return end
local cost = mantisCost()
if not trySpend(cost) then return end
recordUse("MantisBlades")
if mSpecial("MantisBlades") then stamina = math.min(getMaxStamina(), stamina + cost * 0.5) end -- L5 Monowire Siphon
captureBase()
isSlashing = true
cooldowns.MantisBlades = slashCooldown()
updateHotbars()
local blades = {}
local rArm, lArm = getArm("R"), getArm("L")
if rArm then table.insert(blades, extendBlade(rArm)) end
if lArm then table.insert(blades, extendBlade(lArm)) end
local look = camera.CFrame.LookVector
local flat = Vector3.new(look.X, 0, look.Z)
if flat.Magnitude < 0.01 then flat = rootPart.CFrame.LookVector end
flat = flat.Unit
local pos = rootPart.Position
rootPart.CFrame = CFrame.lookAt(pos, pos + flat)
local sp = 1 - 0.1 * upl("MantisSpeed")
task.spawn(function()
slashPose = { ra = math.rad(150), rr = math.rad(-35), la = math.rad(150), lr = math.rad(35) }
task.wait(0.06 * sp)
slashPose = { ra = math.rad(60), rr = math.rad(34), la = math.rad(30), lr = math.rad(-40) }
task.wait(0.1 * sp)
slashPose = { ra = math.rad(22), rr = math.rad(-48), la = math.rad(64), lr = math.rad(42) }
task.wait(0.1 * sp)
slashPose = nil
end)
local arcCF = CFrame.lookAt(pos + flat * 4 + Vector3.new(0, 0.5, 0), pos + flat * 8)
createSlashArc(arcCF, 38, Color3.fromRGB(255, 70, 85))
createSlashArc(arcCF, -38, Color3.fromRGB(255, 255, 255))
playSpeedlines(14, Color3.fromRGB(255, 120, 130), 0)
shakeCamera(0.7, 0.2)
local attachment = new("Attachment", {}, rootPart)
local lv = new("LinearVelocity", {
Attachment0 = attachment, MaxForce = 1e7, VelocityConstraintMode = Enum.VelocityConstraintMode.Vector,
VectorVelocity = flat * slashSpeed() + Vector3.new(0, 4, 0),
}, rootPart)
local t0, c = os.clock(), 0
while os.clock() - t0 < 0.2 and not systemDestroyed and humanoid and humanoid.Health > 0 do
createAfterimage(c) c += 1
task.wait(0.04)
end
lv:Destroy() attachment:Destroy()
if rootPart and rootPart.Parent then rootPart.AssemblyLinearVelocity = flat * 12 end
task.wait(0.15 * sp)
for _, b in ipairs(blades) do b:Destroy() end
isSlashing = false
restoreSpeed()
end
-- ---------- PISTOL ----------
function fireBullet(origin, dir)
local bullet = new("Part", {
Size = Vector3.new(0.22, 0.22, 2.4), CFrame = CFrame.lookAt(origin, origin + dir), Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 210, 90),
}, workspace)
task.spawn(function()
local pos, life = origin, 0
while life < 1.6 and not systemDestroyed do
local dt = RunService.Heartbeat:Wait()
life += dt
local step = dir * 260 * dt
local res = workspace:Raycast(pos, step, rayParams)
if res then
for _ = 1, 6 do
local s = new("Part", {
Size = Vector3.new(0.25, 0.25, 0.25), Position = res.Position, Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 190 + math.random(0, 50), 60),
}, workspace)
local d = (res.Normal + Vector3.new(math.random() - 0.5, math.random() - 0.5, math.random() - 0.5)).Unit
TweenService:Create(s, TweenInfo.new(0.3), { Position = res.Position + d * math.random(2, 5), Transparency = 1, Size = Vector3.new(0.05, 0.05, 0.05) }):Play()
task.delay(0.32, function() s:Destroy() end)
end
createShockwaveRing(CFrame.lookAt(res.Position, res.Position + res.Normal), 0.5, 3, Color3.fromRGB(255, 210, 90), 0.2, false)
break
end
pos += step
bullet.CFrame = CFrame.lookAt(pos, pos + dir)
end
bullet:Destroy()
end)
end
reloadGun = function()
if reloading or ammo >= gunMag() or not owned.Pistol then return end
reloading = true
local dur, t0 = gunReloadTime(), os.clock()
task.spawn(function()
while os.clock() - t0 < dur and not systemDestroyed do
updateAmmoUI((os.clock() - t0) / dur)
task.wait()
end
ammo = gunMag()
reloading = false
updateAmmoUI(0)
end)
end
function shootGun()
if not gunReady() or reloading or menuVisible() or not humanoid or humanoid.Health <= 0 or not rootPart then return end
if isDashing or isSlashing or isCannonJumping then return end
if os.clock() - lastShot < GUN_FIRE_DELAY then return end
if ammo <= 0 then reloadGun() return end
ammo -= 1
lastShot = os.clock()
local muzzle = heldGunModel and heldGunModel:FindFirstChild("Muzzle")
local origin = muzzle and muzzle.Position or (rootPart.Position + camera.CFrame.LookVector * 3)
local mp = UserInputService:GetMouseLocation()
local ray = camera:ViewportPointToRay(mp.X, mp.Y)
local hit = workspace:Raycast(ray.Origin, ray.Direction * 500, rayParams)
local target = hit and hit.Position or (ray.Origin + ray.Direction * 500)
local dir = (target - origin)
dir = dir.Magnitude > 1 and dir.Unit or camera.CFrame.LookVector
fireBullet(origin, dir)
-- muzzle flash
local flash = new("Part", {
Shape = Enum.PartType.Ball, Size = Vector3.new(0.6, 0.6, 0.6), Position = origin, Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 230, 140),
}, workspace)
TweenService:Create(flash, TweenInfo.new(0.08), { Size = Vector3.new(1.8, 1.8, 1.8), Transparency = 1 }):Play()
task.delay(0.1, function() flash:Destroy() end)
gunKick = math.min(gunKick + math.rad(16), math.rad(40))
-- knockback: pushes you backward, opposite the shot
local v = rootPart.AssemblyLinearVelocity
rootPart.AssemblyLinearVelocity = v - dir * GUN_KNOCKBACK + Vector3.new(0, 8, 0)
shakeCamera(0.5, 0.12)
updateAmmoUI(0)
if ammo == 0 then reloadGun() end
end
-- item hotbar helpers
function selectSlot(n)
if not itemHotbar[n] then return end
selectedSlot = (selectedSlot == n) and 0 or n
refreshHeldGun()
updateHudAndMenus()
end
function inHotbar(id)
for i, v in ipairs(itemHotbar) do if v == id then return i end end
return nil
end
function addToHotbar(id)
if inHotbar(id) then return end
for i = 1, 5 do
if not itemHotbar[i] then itemHotbar[i] = id return end
end
end
function removeFromHotbar(id)
local i = inHotbar(id)
if not i then return end
itemHotbar[i] = false
if selectedSlot == i then selectedSlot = 0 end
refreshHeldGun()
end
-- ==========================================
-- v3 MOBILITY ARSENAL + NEW IMPLANT ABILITIES
-- ==========================================
function mobBlocked()
return systemDestroyed or isImplanting or isDashing or isCannonJumping or isSlashing or dasherCharging or isMobility
or not humanoid or humanoid.Health <= 0 or not rootPart or not rootPart.Parent
end
function aimDir() -- flat unit aim + full look vector
local look = camera.CFrame.LookVector
local flat = Vector3.new(look.X, 0, look.Z)
if flat.Magnitude < 0.01 then flat = rootPart.CFrame.LookVector end
return flat.Unit, look
end
function beginMobility()
captureBase()
isMobility = true
return mobToken
end
function finishMobility(token)
if token ~= mobToken then return end -- already cleaned up by endMobility (respawn / destroy)
isMobility = false
restoreSpeed()
end
function fovPunch(amount)
local base = camera.FieldOfView
TweenService:Create(camera, TweenInfo.new(0.12), { FieldOfView = base + amount }):Play()
task.delay(0.35, function()
if not systemDestroyed then TweenService:Create(camera, TweenInfo.new(0.3), { FieldOfView = base }):Play() end
end)
end
-- straight line propulsion with afterimages / wind streaks
function burstMove(dir, speed, duration, residual, token)
local att = new("Attachment", { Name = "CWMob" }, rootPart)
local lv = new("LinearVelocity", {
Name = "CWMob", Attachment0 = att, MaxForce = 1e7, VelocityConstraintMode = Enum.VelocityConstraintMode.Vector,
VectorVelocity = dir * speed,
}, rootPart)
humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
local t0, c = os.clock(), 0
while os.clock() - t0 < duration and token == mobToken and not systemDestroyed and humanoid and humanoid.Health > 0 and rootPart.Parent do
windStreak(rootPart.Position, dir)
createAfterimage(c)
c += 1
task.wait(0.03)
end
lv:Destroy() att:Destroy()
if rootPart and rootPart.Parent and token == mobToken then rootPart.AssemblyLinearVelocity = dir * residual end
end
function railBeam(from, to, color, thick)
local len = (to - from).Magnitude
if len < 1 then return end
local p = new("Part", {
Size = Vector3.new(thick, thick, len), CFrame = CFrame.lookAt((from + to) / 2, to), Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = color, Transparency = 0.1,
}, mobFolder)
TweenService:Create(p, TweenInfo.new(0.35), { Transparency = 1, Size = Vector3.new(0.02, 0.02, len) }):Play()
task.delay(0.4, function() p:Destroy() end)
end
-- ---------- DASH KATANA [C] ----------
function drawKatana(arm)
local model = new("Model", { Name = "CWKatana" }, character)
local function seg(color, material, width, depth, zOff)
local p = new("Part", {
Size = Vector3.new(width, 0.3, depth), Color = color, Material = material, CanCollide = false, CanQuery = false,
CanTouch = false, Massless = true,
}, model)
local w = new("Weld", { Part0 = arm, Part1 = p, C0 = CFrame.new(0, -1.3, zOff) }, p)
TweenService:Create(p, TweenInfo.new(0.06), { Size = Vector3.new(width, 5.2, depth) }):Play()
TweenService:Create(w, TweenInfo.new(0.06), { C0 = CFrame.new(0, -1.1 - 2.6, zOff) }):Play()
end
seg(Color3.fromRGB(225, 235, 245), METAL, 0.12, 0.34, -0.2)
seg(Color3.fromRGB(255, 50, 65), NEON, 0.05, 0.06, -0.4)
return model
end
function activateKatana()
if not isEq("DashKatana") or mobBlocked() or cooldowns.DashKatana > 0 then return end
if not trySpend(katanaCost()) then return end
recordUse("DashKatana")
local token = beginMobility()
local chain = os.clock() - lastKatana < 1.4
lastKatana = os.clock()
local cd = katanaCooldown()
if chain and mSpecial("DashKatana") then cd *= 0.5 end -- L5 Phantom Chain
cooldowns.DashKatana = cd
updateHotbars()
local flat, look = aimDir()
local dir = (flat + Vector3.new(0, math.clamp(look.Y, -0.25, 0.35), 0)).Unit
local pos = rootPart.Position
rootPart.CFrame = CFrame.lookAt(pos, pos + flat)
local rArm = getArm("R")
local blade = rArm and drawKatana(rArm)
slashPose = { ra = math.rad(115), rr = math.rad(-25), la = math.rad(20), lr = math.rad(25) }
local arcCF = CFrame.lookAt(pos + dir * 4, pos + dir * 8)
createSlashArc(arcCF, 0, Color3.fromRGB(255, 255, 255))
createSlashArc(arcCF, 70, Color3.fromRGB(255, 60, 75))
playSpeedlines(16, Color3.fromRGB(255, 255, 255), 0)
fovPunch(10)
shakeCamera(0.8, 0.2)
burstMove(dir, katanaSpeed() * (chain and 1.25 or 1), chain and 0.28 or 0.22, 28, token)
if rootPart and rootPart.Parent then
local endPos = rootPart.Position
createSlashArc(CFrame.lookAt(endPos, endPos + dir), -40, Color3.fromRGB(255, 70, 85))
end
slashPose = nil
task.wait(0.12)
if blade then blade:Destroy() end
finishMobility(token)
end
-- ---------- RAILGUN BOOTS [B] ----------
function activateRailgun()
if not isEq("RailgunBoots") or mobBlocked() or cooldowns.RailgunBoots > 0 then return end
if not trySpend(railCost()) then return end
recordUse("RailgunBoots")
local token = beginMobility()
cooldowns.RailgunBoots = railCooldown()
updateHotbars()
local flat, dir = aimDir()
local pos = rootPart.Position
rootPart.CFrame = CFrame.lookAt(pos, pos + flat)
-- capacitor charge
createShockwaveRing(CFrame.new(pos - Vector3.new(0, 2.8, 0)), 14, 2, Color3.fromRGB(255, 60, 70), 0.2, true)
applyGlow("RailStripe", Color3.fromRGB(255, 255, 255))
task.wait(0.12)
if token ~= mobToken or not rootPart or not rootPart.Parent then return end
pos = rootPart.Position
railBeam(pos, pos - dir * 70, Color3.fromRGB(255, 70, 80), 0.5)
railBeam(pos, pos - dir * 50, Color3.fromRGB(255, 255, 255), 0.2)
createShockwaveRing(CFrame.lookAt(pos, pos + dir), 3, 22, Color3.fromRGB(255, 255, 255), 0.3, false)
createShockwaveRing(CFrame.new(pos - Vector3.new(0, 2.8, 0)), 3, 30, Color3.fromRGB(255, 90, 80), 0.4, true)
playSpeedlines(40, Color3.fromRGB(255, 130, 130), 0)
fovPunch(22)
shakeCamera(1.8, 0.35)
burstMove(dir, railSpeed(), 0.3 + (mSpecial("RailgunBoots") and 0.12 or 0), 70, token)
if rootPart and rootPart.Parent then
local p = rootPart.Position
createShockwaveRing(CFrame.lookAt(p - dir, p + dir), 4, 24, Color3.new(1, 1, 1), 0.4, false) -- sonic boom
end
applyGlow("RailStripe", Color3.fromRGB(255, 40, 55))
finishMobility(token)
end
-- ---------- ROCKET FIST [X] ----------
function activateRocketFist()
if not isEq("RocketFist") or mobBlocked() or cooldowns.RocketFist > 0 then return end
if not trySpend(fistCost()) then return end
recordUse("RocketFist")
local token = beginMobility()
cooldowns.RocketFist = fistCooldown()
updateHotbars()
local flat, look = aimDir()
local pos = rootPart.Position
rootPart.CFrame = CFrame.lookAt(pos, pos + flat)
local RANGE = 26
local res = workspace:Raycast(pos, look * RANGE, rayParams)
local hitPos = res and res.Position or (pos + look * RANGE)
slashPose = { ra = math.rad(95), rr = 0, la = math.rad(30), lr = math.rad(30) }
-- the fist flies out
local fist = new("Part", {
Shape = Enum.PartType.Ball, Size = Vector3.new(1.5, 1.5, 1.5), Position = pos + look * 2, Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 130, 30),
}, mobFolder)
TweenService:Create(fist, TweenInfo.new(0.1, Enum.EasingStyle.Linear), { Position = hitPos }):Play()
railBeam(pos + look * 2, hitPos, Color3.fromRGB(255, 170, 60), 0.35)
task.wait(0.1)
fist:Destroy()
if token ~= mobToken or not rootPart or not rootPart.Parent then slashPose = nil return end
createExplosionFX(hitPos)
fovPunch(12)
if res then
-- surface hit: the blast throws you away from it (rocket jump)
local away = pos - hitPos
local d = away.Magnitude
local dirAway = d > 0.1 and away.Unit or -look
local launch = (dirAway + Vector3.new(0, 0.45, 0)).Unit
local power = fistPower() * math.clamp(1.15 - d / 40, 0.55, 1)
humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
rootPart.AssemblyLinearVelocity = launch * power
if mSpecial("RocketFist") then -- L5 Chain Rocket
task.delay(0.25, function()
if token ~= mobToken or not rootPart or not rootPart.Parent then return end
createExplosionFX(rootPart.Position - Vector3.new(0, 2.8, 0))
local v = rootPart.AssemblyLinearVelocity
rootPart.AssemblyLinearVelocity = v + Vector3.new(0, power * 0.5, 0)
end)
end
local t0 = os.clock()
while os.clock() - t0 < 0.35 and token == mobToken do createAfterimage(0) task.wait(0.05) end
else
-- open air: the punch thrusts you forward
local dir = Vector3.new(look.X, look.Y * 0.5, look.Z).Unit
burstMove(dir, fistPower(), 0.2, 40, token)
if mSpecial("RocketFist") and token == mobToken and rootPart and rootPart.Parent then
createExplosionFX(rootPart.Position)
rootPart.AssemblyLinearVelocity = dir * fistPower() * 0.6
end
end
slashPose = nil
finishMobility(token)
end
-- ---------- GRAPPLE LAUNCHER [H] ----------
function activateGrapple()
if isGrappling then grappleStop = true return end -- second press releases
if not isEq("GrappleLauncher") or mobBlocked() or cooldowns.GrappleLauncher > 0 then return end
local range = grappleRange()
local cam = camera.CFrame
local pos = rootPart.Position
local res = workspace:Raycast(cam.Position, cam.LookVector * (range + (cam.Position - pos).Magnitude), rayParams)
if not res or (res.Position - pos).Magnitude > range + 8 then
notify("GRAPPLE: NO ANCHOR IN RANGE", Color3.fromRGB(255, 110, 110))
return
end
if not trySpend(grappleCost()) then return end
recordUse("GrappleLauncher")
local token = beginMobility()
isGrappling, grappleStop = true, false
cooldowns.GrappleLauncher = 3.0 * mCd("GrappleLauncher")
updateHotbars()
local anchor = res.Position
local hand = getArm("L")
local hook = new("Part", {
Shape = Enum.PartType.Ball, Size = Vector3.new(0.9, 0.9, 0.9), Position = anchor, Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 140, 30),
}, mobFolder)
local rope = new("Part", {
Size = Vector3.new(0.12, 0.12, 1), Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false,
Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 190, 80),
}, mobFolder)
createShockwaveRing(CFrame.lookAt(anchor, anchor + res.Normal), 0.5, 5, Color3.fromRGB(255, 160, 50), 0.25, false)
local att = new("Attachment", { Name = "CWMob" }, rootPart)
local lv = new("LinearVelocity", {
Name = "CWMob", Attachment0 = att, MaxForce = 1e7, VelocityConstraintMode = Enum.VelocityConstraintMode.Vector,
VectorVelocity = Vector3.zero,
}, rootPart)
humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
fovPunch(8)
local t0, dir, streak = os.clock(), nil, 0
while token == mobToken and not grappleStop and os.clock() - t0 < 1.8 and humanoid and humanoid.Health > 0 and rootPart.Parent do
local rp = rootPart.Position
local to = anchor - rp
if to.Magnitude < 6 then break end
dir = to.Unit
local ramp = math.min(1, (os.clock() - t0) / 0.15)
lv.VectorVelocity = dir * grappleSpeed() * ramp
local hp = (hand and hand.Parent) and (hand.CFrame * CFrame.new(0, -1.1, 0.6)).Position or rp
rope.Size = Vector3.new(0.12, 0.12, math.max(0.1, (anchor - hp).Magnitude))
rope.CFrame = CFrame.lookAt((hp + anchor) / 2, anchor)
if os.clock() - streak > 0.08 then streak = os.clock() windStreak(rp, dir) end
RunService.Heartbeat:Wait()
end
lv:Destroy() att:Destroy() rope:Destroy() hook:Destroy()
isGrappling = false
if token == mobToken and rootPart and rootPart.Parent and dir then
local v = dir * grappleSpeed() * 0.85
if mSpecial("GrappleLauncher") then -- L5 Slingshot
local flat = aimDir()
v += Vector3.new(0, 38, 0) + flat * 20
createShockwaveRing(CFrame.new(rootPart.Position), 3, 14, Color3.fromRGB(255, 190, 80), 0.3, false)
end
rootPart.AssemblyLinearVelocity = v
end
finishMobility(token)
end
-- ---------- SHOULDER THRUSTERS [Z] (hold) ----------
function thrusterFlames()
local torso = character and (character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso"))
if not torso then return end
for _, s in ipairs({ -1, 1 }) do
local p = torso.CFrame * Vector3.new(s * 1.2, 0.2, 0.1)
local f = new("Part", {
Size = Vector3.new(0.45, 1.4, 0.45), CFrame = CFrame.new(p - Vector3.new(0, 0.7, 0)), Anchored = true, CanCollide = false,
CanQuery = false, CanTouch = false, Material = Enum.Material.Neon, Color = Color3.fromRGB(255, 150 + math.random(0, 80), 40),
}, mobFolder)
TweenService:Create(f, TweenInfo.new(0.2), { Transparency = 1, Size = Vector3.new(0.1, 2.4, 0.1), Position = f.Position - Vector3.new(0, 1.2, 0) }):Play()
task.delay(0.22, function() f:Destroy() end)
end
end
function endThrusters() isThrusting = false end
function beginThrusters()
if not isEq("ShoulderThrusters") or mobBlocked() or cooldowns.ShoulderThrusters > 0 then return end
if stamina < 12 then flashStaminaBar() return end
if not trySpend(8) then return end
recordUse("ShoulderThrusters")
local token = beginMobility()
isThrusting = true
local att = new("Attachment", { Name = "CWMob" }, rootPart)
local vf = new("VectorForce", {
Name = "CWMob", Attachment0 = att, RelativeTo = Enum.ActuatorRelativeTo.World, ApplyAtCenterOfMass = true, Force = Vector3.zero,
}, rootPart)
humanoid:ChangeState(Enum.HumanoidStateType.Freefall)
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 3, 16, Color3.fromRGB(255, 170, 60), 0.3, true)
task.spawn(function()
local t0, flameT = os.clock(), 0
local burst = mSpecial("ShoulderThrusters") and 2 or 1 -- L5 Afterburner
while isThrusting and token == mobToken and not systemDestroyed and humanoid and humanoid.Health > 0 and rootPart.Parent do
local dt = RunService.Heartbeat:Wait()
local mass, g = rootPart.AssemblyMass, workspace.Gravity
local vel = rootPart.AssemblyLinearVelocity
local acc = thrusterAccel() * ((os.clock() - t0 < 0.4) and burst or 1)
if vel.Y > 42 then acc = -25 end -- cap climb rate
local mv = humanoid.MoveDirection
local hv = Vector3.new(vel.X, 0, vel.Z).Magnitude
local fx = hv < 70 and 55 or 0
vf.Force = Vector3.new(mv.X * fx * mass, (g + acc) * mass, mv.Z * fx * mass)
stamina = math.max(0, stamina - thrusterDrain() * dt)
lastStaminaUse = os.clock()
setMobBar("THRUSTERS", stamina / getMaxStamina(), C.ORANGE)
if os.clock() - flameT > 0.05 then flameT = os.clock() thrusterFlames() end
if stamina <= 0 then flashStaminaBar() break end
end
isThrusting = false
if token == mobToken then
for _, ch in ipairs(rootPart:GetChildren()) do if ch.Name == "CWMob" then ch:Destroy() end end
hideMobBar()
cooldowns.ShoulderThrusters = 1.5 * mCd("ShoulderThrusters")
updateHotbars()
end
finishMobility(token)
end)
end
-- ---------- KINETIC BOARD [V] (toggle) ----------
function buildBoardModel()
local m = new("Model", { Name = "CWBoard" }, character)
local function bp(name, size, color, material, offset)
local p = new("Part", {
Name = name, Size = size, Color = color, Material = material, CanCollide = false, CanQuery = false, CanTouch = false, Massless = true,
}, m)
new("Weld", { Part0 = rootPart, Part1 = p, C0 = CFrame.new(0, -3.1, 0) * offset }, p)
return p
end
local deck = bp("BoardDeck", Vector3.new(2.6, 0.22, 5.2), MDARK, METAL, CFrame.new())
bp("BoardRimL", Vector3.new(0.14, 0.26, 5.0), MCYAN, NEON, CFrame.new(-1.25, 0, 0))
bp("BoardRimR", Vector3.new(0.14, 0.26, 5.0), MCYAN, NEON, CFrame.new(1.25, 0, 0))
bp("BoardNose", Vector3.new(2.0, 0.08, 0.14), MCYAN, NEON, CFrame.new(0, 0.02, -2.5))
bp("BoardHover", Vector3.new(2.0, 0.05, 4.2), MCYAN, NEON, CFrame.new(0, -0.2, 0)).Transparency = 0.35
local a0 = new("Attachment", { Position = Vector3.new(-1.2, 0, 2.4) }, deck)
local a1 = new("Attachment", { Position = Vector3.new(1.2, 0, 2.4) }, deck)
new("Trail", {
Attachment0 = a0, Attachment1 = a1, Lifetime = 0.5, LightEmission = 1, Color = ColorSequence.new(C.CYAN),
Transparency = NumberSequence.new(0.2, 1),
}, deck)
return m
end
function endBoard()
if not isBoardActive then return end
isBoardActive = false
boardToken += 1
boardMomentum = 0
if boardModel then boardModel:Destroy() boardModel = nil end
if rootPart then
for _, c in ipairs(rootPart:GetChildren()) do if c.Name == "CWBoardForce" then c:Destroy() end end
end
cooldowns.KineticBoard = 2.0 * mCd("KineticBoard")
updateHotbars()
restoreSpeed()
end
function toggleBoard()
if isBoardActive then endBoard() return end
if not isEq("KineticBoard") or systemDestroyed or isImplanting or not humanoid or humanoid.Health <= 0 or not rootPart then return end
if cooldowns.KineticBoard > 0 or isDashing or isCannonJumping or isSlashing or dasherCharging then return end
if not trySpend(boardStartCost()) then return end
recordUse("KineticBoard")
captureBase()
isBoardActive = true
boardMomentum = 0
boardToken += 1
local token = boardToken
boardModel = buildBoardModel()
local att = new("Attachment", { Name = "CWBoardForce" }, rootPart)
local vf = new("VectorForce", {
Name = "CWBoardForce", Attachment0 = att, RelativeTo = Enum.ActuatorRelativeTo.World, ApplyAtCenterOfMass = true, Force = Vector3.zero,
}, rootPart)
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 3, 18, C.CYAN, 0.35, true)
notify("KINETIC BOARD ONLINE", C.CYAN)
updateHotbars()
task.spawn(function()
while isBoardActive and token == boardToken and not systemDestroyed and humanoid and humanoid.Health > 0 and rootPart.Parent do
local dt = RunService.Heartbeat:Wait()
local special = mSpecial("KineticBoard") -- L5 Slipstream
if humanoid.MoveDirection.Magnitude > 0.1 then
boardMomentum = math.min(1, boardMomentum + dt / 2.5 * (special and 2 or 1))
else
boardMomentum = math.max(0, boardMomentum - dt * 0.8)
end
local airborne = humanoid.FloorMaterial == Enum.Material.Air
local lift = 0
if airborne and rootPart.AssemblyLinearVelocity.Y < 0 and not isMobility then
lift = math.min(0.95, 0.55 + 0.06 * upl("BoardGlide") + (special and 0.1 or 0))
end
vf.Force = Vector3.new(0, rootPart.AssemblyMass * workspace.Gravity * lift, 0)
stamina = math.max(0, stamina - boardDrain() * dt)
lastStaminaUse = os.clock()
if stamina <= 0 then flashStaminaBar() break end
end
if token == boardToken then endBoard() end
end)
end
-- ---------- OVERCLOCKED HEART [T] ----------
function endSurge()
if not isSurging then return end
isSurging = false
surgeSession += 1
if not systemDestroyed then
TweenService:Create(surgeOverlay, TweenInfo.new(0.4), { BackgroundTransparency = 1 }):Play()
applyGlow("HeartGlow", Color3.fromRGB(255, 40, 55), 0)
end
restoreSpeed()
end
function activateSurge()
if not isEq("OverclockedHeart") or systemDestroyed or isImplanting or isSurging or not humanoid or humanoid.Health <= 0 or not rootPart then return end
if cooldowns.OverclockedHeart > 0 then return end
if not trySpend(surgeCost()) then return end
recordUse("OverclockedHeart")
captureBase()
isSurging = true
surgeSession += 1
local session = surgeSession
local dur = surgeDuration()
cooldowns.OverclockedHeart = 30 * mCd("OverclockedHeart")
updateHotbars()
restoreSpeed()
notify("ADRENALINE SURGE ENGAGED", Color3.fromRGB(255, 80, 90))
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 3, 22, Color3.fromRGB(255, 60, 70), 0.4, true)
shakeCamera(1.0, 0.3)
task.spawn(function()
local t0 = os.clock()
while isSurging and session == surgeSession and not systemDestroyed and humanoid and humanoid.Health > 0 and os.clock() - t0 < dur do
local beat = (math.sin(os.clock() * 9) + 1) / 2
surgeOverlay.BackgroundTransparency = 0.9 - 0.1 * beat
applyGlow("HeartGlow", Color3.fromRGB(255, 40, 55):Lerp(Color3.new(1, 1, 1), beat * 0.6), 1 + beat * 3)
if mSpecial("OverclockedHeart") and humanoid.Health < humanoid.MaxHealth then -- L5 Regeneration
humanoid.Health = math.min(humanoid.MaxHealth, humanoid.Health + 0.2)
end
task.wait(0.05)
end
if session == surgeSession then endSurge() end
end)
end
-- ---------- MOTION SCANNER [N] ----------
function activateScanner()
if not isEq("MotionScanner") or systemDestroyed or isImplanting or not humanoid or humanoid.Health <= 0 or not rootPart then return end
if cooldowns.MotionScanner > 0 then return end
if not trySpend(scanCost()) then return end
recordUse("MotionScanner")
cooldowns.MotionScanner = 8 * mCd("MotionScanner")
updateHotbars()
local radius = scanRadius()
local special = mSpecial("MotionScanner")
local dur = special and 10 or 5
local pos = rootPart.Position
createShockwaveRing(CFrame.new(pos - Vector3.new(0, 2.8, 0)), 4, radius * 2, C.CYAN, 0.8, true)
createShockwaveRing(CFrame.new(pos), 4, radius * 2, Color3.fromRGB(180, 255, 255), 0.6, false)
scanOverlay.BackgroundTransparency = 0.8
TweenService:Create(scanOverlay, TweenInfo.new(0.6), { BackgroundTransparency = 1 }):Play()
local op = OverlapParams.new()
op.FilterType = Enum.RaycastFilterType.Exclude
op.FilterDescendantsInstances = { character }
local found, list = {}, {}
for _, part in ipairs(workspace:GetPartBoundsInRadius(pos, radius, op)) do
local model = part:FindFirstAncestorOfClass("Model")
if model and not found[model] and model ~= character and model:FindFirstChildOfClass("Humanoid") then
found[model] = true
table.insert(list, model)
if #list >= 20 then break end
end
end
for _, model in ipairs(list) do
local hl = new("Highlight", {
Name = "CWScan", Adornee = model, FillColor = Color3.fromRGB(255, 60, 80), FillTransparency = 0.55,
OutlineColor = C.CYAN, DepthMode = Enum.HighlightDepthMode.AlwaysOnTop,
}, model)
task.delay(dur, function() if hl.Parent then hl:Destroy() end end)
local root = model:FindFirstChild("HumanoidRootPart") or model.PrimaryPart
if special and root then -- L5 Deep Scan: distance tags
local bb = new("BillboardGui", {
Name = "CWScan", Adornee = root, Size = UDim2.new(0, 90, 0, 18), StudsOffset = Vector3.new(0, 3.5, 0), AlwaysOnTop = true,
}, model)
local tl = new("TextLabel", {
Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, TextColor3 = C.CYAN, Font = Enum.Font.Code, TextSize = 13, Text = "",
}, bb)
task.spawn(function()
local t0 = os.clock()
while bb.Parent and os.clock() - t0 < dur and not systemDestroyed do
if rootPart and rootPart.Parent and root.Parent then
tl.Text = string.format("%d studs", (root.Position - rootPart.Position).Magnitude)
end
task.wait(0.1)
end
if bb.Parent then bb:Destroy() end
end)
end
end
notify(string.format("MOTION SCAN: %d SIGNATURE%s", #list, #list == 1 and "" or "S"), C.CYAN)
end
-- ---------- PASSIVE TRIGGERS ----------
function onJump()
trackEvent("jumps", nil, 1)
if isEq("BionicJoints") then
recordUse("BionicJoints")
if mSpecial("BionicJoints") then -- L5 Spring Surge: every 3rd jump
jointJumps += 1
if jointJumps % 3 == 0 then
task.delay(0.05, function()
if systemDestroyed or not rootPart or not rootPart.Parent then return end
local v = rootPart.AssemblyLinearVelocity
rootPart.AssemblyLinearVelocity = Vector3.new(v.X, v.Y + 22, v.Z)
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 2, 12, C.CYAN, 0.3, true)
end)
end
end
end
uiDirty = true
end
function onLand()
local impact = -fallVelMin
fallVelMin = 0
if impact > 65 and isEq("TitaniumSkeleton") and rootPart and rootPart.Parent then
recordUse("TitaniumSkeleton")
local special = mSpecial("TitaniumSkeleton") -- L5 Shockwave Landing
stamina = math.min(getMaxStamina(), stamina + (special and 30 or 12))
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 3, special and 28 or 16, Color3.fromRGB(200, 230, 255), 0.35, true)
shakeCamera(0.6, 0.15)
end
end
-- ---------- CLEANUP (respawn / destroy) ----------
function endMobility()
mobToken += 1
isMobility, isThrusting, isGrappling, grappleStop = false, false, false, false
endBoard()
endSurge()
if rootPart then
for _, c in ipairs(rootPart:GetChildren()) do
if c.Name == "CWMob" or c.Name == "CWBoardForce" then c:Destroy() end
end
end
if mobFolder then mobFolder:ClearAllChildren() end
if mobBar then hideMobBar() end
end
ACTIVATE.Sandevistan = activateSandevistan
ACTIVATE.LaunchCannon = activateLaunchCannon
ACTIVATE.MantisBlades = activateMantis
ACTIVATE.GrappleLauncher = activateGrapple
ACTIVATE.RocketFist = activateRocketFist
ACTIVATE.DashKatana = activateKatana
ACTIVATE.RailgunBoots = activateRailgun
ACTIVATE.KineticBoard = toggleBoard
ACTIVATE.OverclockedHeart = activateSurge
ACTIVATE.MotionScanner = activateScanner
-- cooldown countdown (Adrenaline Surge ticks cooldowns twice as fast)
RunService.Heartbeat:Connect(function(dt)
if systemDestroyed then return end
local any = false
local rate = isSurging and 2 or 1
for id, v in pairs(cooldowns) do
if v > 0 then
cooldowns[id] = math.max(0, v - dt * rate)
any = true
end
end
if any and updateHotbars then updateHotbars() end
end)
-- ==========================================
-- HUD (top-left: steps, HP, stamina)
-- ==========================================
hudFrame = createCyberFrame(mainGui, UDim2.new(0, 480, 0, 54), UDim2.new(0, 16, 0, 16), C.GREEN, Color3.fromRGB(12, 16, 18), 0.1)
stepsLabel = new("TextLabel", {
Size = UDim2.new(0, 130, 1, 0), Position = UDim2.new(0, 10, 0, 0), BackgroundTransparency = 1, Text = "STEPS: 0",
TextColor3 = Color3.fromRGB(180, 255, 0), Font = Enum.Font.Code, TextSize = 18, TextXAlignment = Enum.TextXAlignment.Left,
}, hudFrame)
cyberBtn = new("TextButton", {
Size = UDim2.new(0, 145, 0, 38), Position = UDim2.new(0, 145, 0.5, -19), BackgroundColor3 = Color3.fromRGB(22, 34, 30),
Text = " CYBERWARE", TextColor3 = C.GREEN, Font = Enum.Font.GothamBold, TextSize = 13,
}, hudFrame)
new("UIStroke", { Color = C.GREEN }, cyberBtn)
new("ImageLabel", {
Size = UDim2.new(0, 22, 0, 22), Position = UDim2.new(0, 8, 0.5, -11), BackgroundTransparency = 1,
Image = "rbxassetid://6034509993", ImageColor3 = C.GREEN,
}, cyberBtn)
destroyBtn = new("TextButton", {
Size = UDim2.new(0, 82, 0, 38), Position = UDim2.new(0, 298, 0.5, -19), BackgroundColor3 = Color3.fromRGB(65, 22, 22),
Text = "DESTROY", TextColor3 = Color3.fromRGB(255, 110, 110), Font = Enum.Font.GothamBold, TextSize = 12,
}, hudFrame)
new("UIStroke", { Color = Color3.fromRGB(220, 60, 60) }, destroyBtn)
-- NEW: quest button
questBtn = new("TextButton", {
Size = UDim2.new(0, 90, 0, 38), Position = UDim2.new(0, 386, 0.5, -19), BackgroundColor3 = Color3.fromRGB(40, 34, 14),
Text = "QUEST", TextColor3 = C.YELLOW, Font = Enum.Font.GothamBold, TextSize = 12,
}, hudFrame)
new("UIStroke", { Color = C.YELLOW }, questBtn)
function makeBar(y, color)
local frame, stroke = createCyberFrame(mainGui, UDim2.new(0, 390, 0, 22), UDim2.new(0, 16, 0, y), color, Color3.fromRGB(12, 16, 18), 0.1)
local track = new("Frame", { Size = UDim2.new(1, -8, 1, -8), Position = UDim2.new(0, 4, 0, 4), BackgroundColor3 = Color3.fromRGB(25, 35, 32), BorderSizePixel = 0 }, frame)
local fill = new("Frame", { Size = UDim2.new(1, 0, 1, 0), BackgroundColor3 = color, BorderSizePixel = 0 }, track)
local label = new("TextLabel", {
Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Text = "", TextColor3 = Color3.fromRGB(240, 255, 245),
Font = Enum.Font.Code, TextSize = 11, ZIndex = 3,
}, track)
return fill, label, stroke
end
hpFill, hpLabel = makeBar(78, Color3.fromRGB(255, 70, 70))
staminaFill, staminaLabel, staminaStroke = makeBar(104, C.GREEN)
-- NEW: eddies / materials readout under the bars
eddiesLabel = new("TextLabel", {
Size = UDim2.new(0, 390, 0, 20), Position = UDim2.new(0, 16, 0, 130), BackgroundTransparency = 1, Text = "EDDIES: 0",
TextColor3 = C.YELLOW, Font = Enum.Font.Code, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left,
}, mainGui)
function updateHpBar()
if not humanoid or not humanoid.Parent or not hpFill.Parent then return end
local mh = math.max(1, humanoid.MaxHealth)
local r = math.clamp(humanoid.Health / mh, 0, 1)
hpFill.Size = UDim2.new(r, 0, 1, 0)
hpFill.BackgroundColor3 = r > 0.5 and Color3.fromRGB(255, 70, 70) or Color3.fromRGB(255, 40, 40):Lerp(Color3.fromRGB(255, 190, 40), r)
hpLabel.Text = string.format("HP %d / %d", math.floor(humanoid.Health + 0.5), math.floor(mh))
end
staminaFlashing = false
updateStaminaBar = function()
if systemDestroyed or not staminaFill.Parent then return end
local maxS = getMaxStamina()
local ratio = math.clamp(stamina / maxS, 0, 1)
staminaFill.Size = UDim2.new(ratio, 0, 1, 0)
if ratio > 0.5 then staminaFill.BackgroundColor3 = C.GREEN
elseif ratio > 0.25 then staminaFill.BackgroundColor3 = Color3.fromRGB(255, 170, 0)
else staminaFill.BackgroundColor3 = Color3.fromRGB(255, 60, 60) end
staminaLabel.Text = string.format("STAMINA %d / %d", math.floor(stamina + 0.5), maxS)
end
flashStaminaBar = function()
if systemDestroyed or staminaFlashing then return end
staminaFlashing = true
staminaStroke.Color = Color3.fromRGB(255, 50, 50)
task.delay(0.35, function()
staminaFlashing = false
if not systemDestroyed and staminaStroke.Parent then staminaStroke.Color = C.GREEN end
end)
end
uiTimer, resetTimer = 0, 0
RunService.Heartbeat:Connect(function(dt)
if systemDestroyed then return end
if isSandevistanActive then
stamina = math.max(0, stamina - sandyDrain() * dt)
lastStaminaUse = os.clock()
if stamina <= 0 then endSandevistan() flashStaminaBar() end
elseif stamina < getMaxStamina() and os.clock() - lastStaminaUse >= getRegenDelay() then
stamina = math.min(getMaxStamina(), stamina + getRegenRate() * dt)
end
-- Oxygen Booster: emergency injection when stamina is nearly empty
if isEq("OxygenBooster") and not isImplanting and humanoid and humanoid.Health > 0 and rootPart then
local maxS = getMaxStamina()
local cd = 45 * mCd("OxygenBooster") * (mSpecial("OxygenBooster") and 0.55 or 1)
if stamina / maxS < 0.15 and os.clock() - lastOxyInject >= cd then
lastOxyInject = os.clock()
stamina = math.min(maxS, stamina + maxS * oxygenRefill())
recordUse("OxygenBooster")
notify("OXYGEN BOOSTER: EMERGENCY INJECTION", C.CYAN)
createShockwaveRing(CFrame.new(rootPart.Position - Vector3.new(0, 2.8, 0)), 3, 14, C.CYAN, 0.35, true)
end
end
-- fall speed tracking (Titanium Skeleton landings)
if rootPart and humanoid and humanoid.FloorMaterial == Enum.Material.Air then
fallVelMin = math.min(fallVelMin, rootPart.AssemblyLinearVelocity.Y)
end
updateStaminaBar()
updateHpBar()
-- throttled UI / quest maintenance
uiTimer += dt
if uiTimer >= 0.25 then
uiTimer = 0
if uiDirty or questUiDirty then
uiDirty, questUiDirty = false, false
updateHudAndMenus()
end
end
resetTimer += dt
if resetTimer >= 1 then
resetTimer = 0
checkQuestResets()
if questFrame and questFrame.Visible then refreshQuestUI() end
end
end)
-- ==========================================
-- TOOLTIP
-- ==========================================
tooltip = new("Frame", {
Size = UDim2.new(0, 290, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundColor3 = Color3.fromRGB(16, 5, 8),
BackgroundTransparency = 0.04, BorderSizePixel = 0, Visible = false, ZIndex = 100,
}, mainGui)
ttStroke = new("UIStroke", { Color = C.RED, Thickness = 1.5 }, tooltip)
new("UIListLayout", { Padding = UDim.new(0, 4), SortOrder = Enum.SortOrder.LayoutOrder }, tooltip)
new("UIPadding", { PaddingTop = UDim.new(0, 8), PaddingBottom = UDim.new(0, 8), PaddingLeft = UDim.new(0, 10), PaddingRight = UDim.new(0, 10) }, tooltip)
function ttLabel(order, size, color, font)
return new("TextLabel", {
LayoutOrder = order, Size = UDim2.new(1, 0, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1,
TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left, TextColor3 = color, Font = font, TextSize = size, Text = "", ZIndex = 101,
}, tooltip)
end
ttName = ttLabel(1, 17, C.RED, Enum.Font.GothamBlack)
ttType = ttLabel(2, 11, Color3.fromRGB(190, 150, 150), Enum.Font.Code)
ttCost = ttLabel(3, 13, C.YELLOW, Enum.Font.Code)
ttDesc = ttLabel(4, 12, Color3.fromRGB(225, 215, 215), Enum.Font.Code)
tooltipTarget = nil
function showTooltip(id)
local it = ITEM_BY_ID[id]
if not it then return end
local rc = rarityColor(it.Rarity)
local rtxt = it.Rarity and (" // " .. RARITY[it.Rarity].Name) or ""
ttName.Text = string.upper(it.Name)
ttName.TextColor3 = rc
ttStroke.Color = rc
if it.Type == "Cyber" then ttType.Text = "CYBERWARE // " .. it.Category .. rtxt
elseif it.Type == "Item" then ttType.Text = "ITEM // HOTBAR" .. rtxt
else ttType.Text = "CLOTHING // PASSIVE" .. rtxt end
local cost = staminaCostOf(it)
local costText = cost and ("STAMINA COST: " .. cost) or "PASSIVE - NO STAMINA COST"
if it.Type == "Cyber" then costText ..= string.format(" MASTERY L%d", masteryLevel(id)) end
ttCost.Text = costText
ttDesc.Text = it.Desc
tooltip.Visible = true
end
function attachTooltip(gui, getId)
gui.MouseEnter:Connect(function()
local id = getId()
if id then showTooltip(id) tooltipTarget = gui end
end)
gui.MouseLeave:Connect(function()
if tooltipTarget == gui then tooltip.Visible = false tooltipTarget = nil end
end)
end
function guiShown(g)
while g and g:IsA("GuiObject") do
if not g.Visible then return false end
g = g.Parent
end
return true
end
RunService.RenderStepped:Connect(function()
if not tooltip.Visible then return end
if not tooltipTarget or not tooltipTarget.Parent or not guiShown(tooltipTarget) then
tooltip.Visible = false
tooltipTarget = nil
return
end
local m = UserInputService:GetMouseLocation() - GuiService:GetGuiInset()
local vp = camera.ViewportSize
tooltip.Position = UDim2.new(0, math.min(m.X + 18, vp.X - 300), 0, math.min(m.Y + 18, vp.Y - tooltip.AbsoluteSize.Y - 50))
end)
-- ==========================================
-- HOTBARS (passives / equipped cyberware / items)
-- ==========================================
function makeHotbar(width, y, headerText, height)
local f = createCyberFrame(mainGui, UDim2.new(0, width, 0, height or 68), UDim2.new(0, 16, 1, y), Color3.fromRGB(115, 185, 115), Color3.fromRGB(14, 18, 18), 0.2)
new("TextLabel", {
Size = UDim2.new(1, 0, 0, 16), Position = UDim2.new(0, 0, 0, -17), BackgroundColor3 = Color3.fromRGB(115, 185, 115),
Text = headerText, TextColor3 = Color3.fromRGB(10, 15, 10), Font = Enum.Font.Code, TextSize = 12,
}, f)
return f
end
-- Equipped cyberware (active): 4 columns, rows grow with the number of active implants
HB_COLS = 4
hbRows = math.ceil(#ACTIVE_CYBER / HB_COLS)
hbHeight = 8 + hbRows * 58
hotbarY = -(16 + hbHeight)
-- Passives (6 slots, 3 columns) stacked above the equipped bar
PASSIVE_SLOTS = 6
psRows = math.ceil(PASSIVE_SLOTS / 3)
psHeight = 8 + psRows * 58
passiveFrame = makeHotbar(340, hotbarY - 32 - psHeight, "Passives", psHeight)
passiveSlots, passiveIds = {}, {}
for i = 1, PASSIVE_SLOTS do
local col, row = (i - 1) % 3, math.floor((i - 1) / 3)
local b = new("TextButton", {
Size = UDim2.new(0, 104, 0, 52), Position = UDim2.new(0, 8 + col * 110, 0, 8 + row * 58), BackgroundColor3 = Color3.fromRGB(28, 32, 32),
Text = "EMPTY", TextColor3 = Color3.fromRGB(110, 110, 110), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true, AutoButtonColor = false,
}, passiveFrame)
passiveSlots[i] = b
attachTooltip(b, function() return passiveIds[i] end)
end
hotbarFrame = makeHotbar(8 + HB_COLS * 110, hotbarY, "Equipped Cyberware", hbHeight)
hotbarSlots = {}
for i, item in ipairs(ACTIVE_CYBER) do
local col, row = (i - 1) % HB_COLS, math.floor((i - 1) / HB_COLS)
local b = new("TextButton", {
Size = UDim2.new(0, 104, 0, 52), Position = UDim2.new(0, 8 + col * 110, 0, 8 + row * 58), BackgroundColor3 = Color3.fromRGB(28, 32, 32),
Text = "[" .. item.KeyText .. "]\nLOCKED", TextColor3 = Color3.fromRGB(130, 130, 130), Font = Enum.Font.Code, TextSize = 11,
TextWrapped = true, AutoButtonColor = false,
}, hotbarFrame)
new("UIStroke", { Color = rarityColor(item.Rarity), Thickness = 1.2 }, b)
hotbarSlots[item.Id] = b
attachTooltip(b, function() return owned[item.Id] and item.Id or nil end)
if item.Id == "Dasher" then
b.MouseButton1Down:Connect(beginDasherCharge)
b.MouseButton1Up:Connect(function() endDasherCharge() end)
b.MouseLeave:Connect(function() endDasherCharge() end)
elseif item.Id == "ShoulderThrusters" then
b.MouseButton1Down:Connect(beginThrusters)
b.MouseButton1Up:Connect(endThrusters)
b.MouseLeave:Connect(endThrusters)
else
b.MouseButton1Click:Connect(function()
local fn = ACTIVATE[item.Id]
if fn then fn() end
end)
end
end
-- Item hotbar (bottom-middle, 5 slots)
itemBar = createCyberFrame(mainGui, UDim2.new(0, 360, 0, 74), UDim2.new(0.5, -180, 1, -90), C.ORANGE, Color3.fromRGB(14, 10, 10), 0.15)
itemSlots = {}
numKeys = { Enum.KeyCode.One, Enum.KeyCode.Two, Enum.KeyCode.Three, Enum.KeyCode.Four, Enum.KeyCode.Five }
for i = 1, 5 do
local b = new("TextButton", {
Size = UDim2.new(0, 64, 0, 62), Position = UDim2.new(0, 6 + (i - 1) * 70, 0, 6), BackgroundColor3 = Color3.fromRGB(30, 22, 22),
Text = tostring(i), TextColor3 = Color3.fromRGB(120, 100, 100), Font = Enum.Font.Code, TextSize = 12, TextWrapped = true,
AutoButtonColor = false,
}, itemBar)
local st = new("UIStroke", { Color = Color3.fromRGB(90, 50, 40), Thickness = 1.5 }, b)
itemSlots[i] = { btn = b, stroke = st }
b.MouseButton1Click:Connect(function() selectSlot(i) end)
attachTooltip(b, function() return itemHotbar[i] or nil end)
end
ammoLabel = new("TextLabel", {
Size = UDim2.new(0, 360, 0, 22), Position = UDim2.new(0.5, -180, 1, -118), BackgroundTransparency = 1, Text = "",
TextColor3 = C.ORANGE, Font = Enum.Font.Code, TextSize = 15,
}, mainGui)
reloadTrack = new("Frame", {
Size = UDim2.new(0, 360, 0, 4), Position = UDim2.new(0.5, -180, 1, -96), BackgroundColor3 = Color3.fromRGB(40, 30, 20),
BorderSizePixel = 0, Visible = false,
}, mainGui)
reloadFill = new("Frame", { Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = C.ORANGE, BorderSizePixel = 0 }, reloadTrack)
updateAmmoUI = function(progress)
if systemDestroyed then return end
local show = inHotbar("Pistol") ~= nil
ammoLabel.Visible = show
if not show then reloadTrack.Visible = false return end
if reloading then
ammoLabel.Text = "PISTOL RELOADING..."
reloadTrack.Visible = true
reloadFill.Size = UDim2.new(math.clamp(progress or 0, 0, 1), 0, 1, 0)
else
ammoLabel.Text = string.format("PISTOL %d / %d", ammo, gunMag())
reloadTrack.Visible = false
end
end
-- ==========================================
-- IMPLANT PROCEDURE (surgery sequence)
-- ==========================================
IMPL_CYAN, IMPL_GREEN = Color3.fromRGB(0, 235, 255), Color3.fromRGB(0, 255, 170)
implantOverlay = new("Frame", {
Name = "ImplantOverlay", Size = UDim2.new(1, 0, 1, 100), Position = UDim2.new(0, 0, 0, -50), BackgroundColor3 = Color3.fromRGB(2, 6, 8),
BackgroundTransparency = 0.15, BorderSizePixel = 0, Active = true, Visible = false, ZIndex = 50,
}, mainGui)
implantPanel = createCyberFrame(implantOverlay, UDim2.new(0, 640, 0, 420), UDim2.new(0.5, -320, 0.5, -210), IMPL_CYAN, Color3.fromRGB(10, 16, 20), 0.05)
function mkLabel(parent, text, size, pos, color, textSize, font)
return new("TextLabel", {
BackgroundTransparency = 1, Size = size, Position = pos, Text = text, TextColor3 = color, TextSize = textSize,
Font = font or Enum.Font.Code, TextXAlignment = Enum.TextXAlignment.Left,
}, parent)
end
implantTitle = mkLabel(implantPanel, "", UDim2.new(1, -20, 0, 34), UDim2.new(0, 10, 0, 8), IMPL_CYAN, 16, Enum.Font.GothamBlack)
bodyArea = new("Frame", {
Size = UDim2.new(0, 220, 0, 340), Position = UDim2.new(0, 20, 0, 50), BackgroundColor3 = Color3.fromRGB(6, 14, 16),
BackgroundTransparency = 0.2, BorderSizePixel = 0, ClipsDescendants = true,
}, implantPanel)
new("UIStroke", { Color = Color3.fromRGB(0, 120, 130) }, bodyArea)
function bodyPart(cx, cy, w, h, round)
local f = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, cx, 0, cy), Size = UDim2.new(0, w, 0, h),
BackgroundColor3 = Color3.fromRGB(12, 38, 42), BackgroundTransparency = 0.3, BorderSizePixel = 0,
}, bodyArea)
new("UICorner", { CornerRadius = UDim.new(0, round or 4) }, f)
new("UIStroke", { Color = Color3.fromRGB(0, 150, 160), Thickness = 1.5 }, f)
end
bodyPart(110, 40, 52, 52, 10) bodyPart(110, 130, 90, 100, 6) bodyPart(176, 130, 30, 100, 6)
bodyPart(44, 130, 30, 100, 6) bodyPart(89, 243, 40, 120, 6) bodyPart(131, 243, 40, 120, 6)
new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, 110, 0, 130), Size = UDim2.new(0, 4, 0, 92),
BackgroundColor3 = Color3.fromRGB(0, 150, 160), BackgroundTransparency = 0.4, BorderSizePixel = 0,
}, bodyArea)
IMPLANT_TARGETS = {
Spine = { { x = 110, y = 130, w = 18, h = 96 } },
Arms = { { x = 176, y = 130, w = 30, h = 100 } },
BothArms = { { x = 176, y = 130, w = 30, h = 100 }, { x = 44, y = 130, w = 30, h = 100 } },
Legs = { { x = 89, y = 243, w = 40, h = 120 }, { x = 131, y = 243, w = 40, h = 120 } },
Chest = { { x = 110, y = 105, w = 64, h = 46 } },
-- v3 zones
LeftHand = { { x = 44, y = 168, w = 30, h = 34 } },
RightHand = { { x = 176, y = 168, w = 30, h = 34 } },
Shoulders = { { x = 66, y = 90, w = 34, h = 24 }, { x = 154, y = 90, w = 34, h = 24 } },
Hip = { { x = 72, y = 172, w = 30, h = 26 } },
Feet = { { x = 89, y = 296, w = 40, h = 34 }, { x = 131, y = 296, w = 40, h = 34 } },
Skeleton = { { x = 110, y = 130, w = 18, h = 100 }, { x = 110, y = 108, w = 70, h = 14 } },
Joints = { { x = 89, y = 214, w = 28, h = 22 }, { x = 131, y = 214, w = 28, h = 22 }, { x = 44, y = 130, w = 28, h = 22 }, { x = 176, y = 130, w = 28, h = 22 } },
Heart = { { x = 121, y = 108, w = 26, h = 26 } },
Face = { { x = 110, y = 40, w = 52, h = 26 } },
}
IMPLANT_COLORS = {
Spine = Color3.fromRGB(0, 255, 235), Arms = Color3.fromRGB(255, 140, 30), BothArms = Color3.fromRGB(255, 60, 80),
Legs = Color3.fromRGB(255, 170, 40), Chest = Color3.fromRGB(120, 200, 255),
LeftHand = Color3.fromRGB(255, 160, 50), RightHand = Color3.fromRGB(255, 110, 40), Shoulders = Color3.fromRGB(255, 190, 70),
Hip = Color3.fromRGB(255, 70, 90), Feet = Color3.fromRGB(255, 90, 90), Skeleton = Color3.fromRGB(200, 230, 255),
Joints = Color3.fromRGB(0, 235, 255), Heart = Color3.fromRGB(255, 50, 70), Face = Color3.fromRGB(0, 235, 255),
}
MATERIAL_COLORS = {
Color3.fromRGB(200, 210, 220), Color3.fromRGB(255, 170, 40), Color3.fromRGB(0, 235, 255),
Color3.fromRGB(255, 60, 90), Color3.fromRGB(150, 255, 120),
}
implantLog = mkLabel(implantPanel, "", UDim2.new(0, 360, 0, 160), UDim2.new(0, 260, 0, 50), IMPL_GREEN, 13)
implantLog.BackgroundTransparency = 0.6
implantLog.BackgroundColor3 = Color3.new(0, 0, 0)
implantLog.TextYAlignment = Enum.TextYAlignment.Top
implantLog.TextWrapped = true
mkLabel(implantPanel, "MATERIALS", UDim2.new(0, 200, 0, 14), UDim2.new(0, 260, 0, 216), Color3.fromRGB(150, 175, 180), 11)
materialSlots, materialSlotLabels = {}, {}
for k = 1, 5 do
local slot = new("Frame", {
Size = UDim2.new(0, 66, 0, 46), Position = UDim2.new(0, 260 + (k - 1) * 72, 0, 232), BackgroundColor3 = Color3.fromRGB(18, 30, 34), BorderSizePixel = 0,
}, implantPanel)
new("UIStroke", { Color = Color3.fromRGB(0, 150, 160) }, slot)
materialSlotLabels[k] = new("TextLabel", {
Size = UDim2.new(1, -4, 1, -4), Position = UDim2.new(0, 2, 0, 2), BackgroundTransparency = 1, Text = "",
TextColor3 = Color3.fromRGB(180, 230, 235), Font = Enum.Font.Code, TextSize = 9, TextWrapped = true,
}, slot)
materialSlots[k] = slot
end
implantProgressLabel = mkLabel(implantPanel, "", UDim2.new(0, 360, 0, 16), UDim2.new(0, 260, 0, 292), IMPL_CYAN, 12)
implantTrack = new("Frame", {
Size = UDim2.new(0, 360, 0, 16), Position = UDim2.new(0, 260, 0, 312), BackgroundColor3 = Color3.fromRGB(15, 28, 30), BorderSizePixel = 0,
}, implantPanel)
new("UIStroke", { Color = IMPL_CYAN }, implantTrack)
implantFill = new("Frame", { Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = IMPL_CYAN, BorderSizePixel = 0 }, implantTrack)
implantWarning = mkLabel(implantPanel, "WARNING: TISSUE REJECTION / CYBERPSYCHOSIS RISK DETECTED", UDim2.new(0, 360, 0, 36), UDim2.new(0, 260, 0, 340), Color3.fromRGB(255, 70, 70), 11)
implantWarning.TextWrapped = true
implantWarning.TextYAlignment = Enum.TextYAlignment.Top
function runImplantProcedure(item)
if isImplanting or systemDestroyed then return end
isImplanting = true
endDasherCharge()
endThrusters()
endBoard()
local hum = humanoid
local prevJumpPower, prevJumpHeight
if hum and hum.Parent then
prevJumpPower, prevJumpHeight = hum.JumpPower, hum.JumpHeight
hum.WalkSpeed, hum.JumpPower, hum.JumpHeight = 0, 0, 0
end
local DURATION = IMPLANT_TIME
local slotColor = IMPLANT_COLORS[item.Zone] or IMPL_GREEN
local targets = IMPLANT_TARGETS[item.Zone] or IMPLANT_TARGETS.Spine
local mats = item.Materials
implantTitle.Text = "// RIPPERDOC PROCEDURE - INSTALLING: " .. string.upper(item.Name)
implantTitle.TextColor3 = IMPL_CYAN
implantFill.Size = UDim2.new(0, 0, 1, 0)
implantFill.BackgroundColor3 = IMPL_CYAN
implantProgressLabel.Text = "IMPLANT PROGRESS: 0%"
for k = 1, 5 do
materialSlots[k].BackgroundColor3 = Color3.fromRGB(18, 30, 34)
materialSlotLabels[k].Text = mats[k] or ""
materialSlotLabels[k].TextColor3 = Color3.fromRGB(180, 230, 235)
end
implantOverlay.Visible = true
local glows = {}
for _, t in ipairs(targets) do
local g = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0, t.x, 0, t.y), Size = UDim2.new(0, t.w, 0, t.h),
BackgroundColor3 = slotColor, BackgroundTransparency = 1, BorderSizePixel = 0, ZIndex = 3,
}, bodyArea)
new("UICorner", { CornerRadius = UDim.new(0, 4) }, g)
new("UIStroke", { Color = slotColor, Thickness = 2 }, g)
table.insert(glows, g)
end
local scan = new("Frame", { Size = UDim2.new(1, 0, 0, 2), BackgroundColor3 = IMPL_CYAN, BorderSizePixel = 0, ZIndex = 4 }, bodyArea)
local scanTween = TweenService:Create(scan, TweenInfo.new(1.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { Position = UDim2.new(0, 0, 1, -2) })
scanTween:Play()
local function launchMaterial(k)
local startPos = UDim2.new(0, 260 + (k - 1) * 72 + 33, 0, 232 + 23)
local tgt = targets[((k - 1) % #targets) + 1]
local endPos = UDim2.new(0, 20 + tgt.x, 0, 50 + tgt.y)
materialSlots[k].BackgroundColor3 = Color3.fromRGB(8, 14, 16)
materialSlotLabels[k].TextColor3 = Color3.fromRGB(90, 110, 115)
local m = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.new(0, 16, 0, 16), Position = startPos, BackgroundColor3 = MATERIAL_COLORS[k],
BorderSizePixel = 0, ZIndex = 6,
}, implantPanel)
new("UICorner", { CornerRadius = UDim.new(0, 3) }, m)
new("UIStroke", { Color = Color3.new(1, 1, 1) }, m)
local fly = TweenService:Create(m, TweenInfo.new(0.9, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut), {
Position = endPos, Rotation = 360, Size = UDim2.new(0, 8, 0, 8),
})
fly:Play()
fly.Completed:Connect(function()
m:Destroy()
if systemDestroyed then return end
for _, g in ipairs(glows) do
g.BackgroundTransparency = 0.1
TweenService:Create(g, TweenInfo.new(0.35), { BackgroundTransparency = 1 - 0.18 * k }):Play()
end
for _ = 1, 5 do
local sp = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Size = UDim2.new(0, 4, 0, 4), Position = endPos,
BackgroundColor3 = MATERIAL_COLORS[k], BorderSizePixel = 0, ZIndex = 6,
}, implantPanel)
local tw = TweenService:Create(sp, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Position = endPos + UDim2.new(0, math.random(-30, 30), 0, math.random(-30, 30)), BackgroundTransparency = 1,
})
tw:Play()
tw.Completed:Connect(function() sp:Destroy() end)
end
end)
end
local statusEvents = {
{ 0.00, "ADMINISTERING ANESTHETIC" }, { 0.12, "SURGICAL LASERS ONLINE" }, { 0.24, "OPENING INSTALL PORT" },
{ 0.38, "SEATING " .. string.upper(item.Name) .. " HARDWARE" }, { 0.54, "SPLICING NEURAL PATHWAYS" },
{ 0.70, "SYNCING WITH NERVOUS SYSTEM" }, { 0.84, "CALIBRATING IMPLANT" }, { 0.94, "RUNNING FINAL DIAGNOSTICS" },
}
local matTimes = { 0.08, 0.24, 0.40, 0.56, 0.72 }
local lines = {}
local function renderLog(blink)
local out = {}
for i, l in ipairs(lines) do
if i < #lines then table.insert(out, "> " .. l .. " [OK]")
else table.insert(out, "> " .. l .. (blink and " _" or " ")) end
end
implantLog.Text = table.concat(out, "\n")
end
local startT = os.clock()
local nextEvent, nextMat = 1, 1
while not systemDestroyed do
local t = os.clock() - startT
if t >= DURATION then break end
while nextEvent <= #statusEvents and t >= statusEvents[nextEvent][1] * DURATION do
table.insert(lines, statusEvents[nextEvent][2])
if #lines > 9 then table.remove(lines, 1) end
nextEvent += 1
end
while nextMat <= #mats and t >= matTimes[nextMat] * DURATION do
launchMaterial(nextMat)
nextMat += 1
end
local pct = math.clamp(t / DURATION, 0, 1)
implantFill.Size = UDim2.new(pct, 0, 1, 0)
implantProgressLabel.Text = string.format("IMPLANT PROGRESS: %d%% T-%.1fs", math.floor(pct * 100), DURATION - t)
renderLog(math.floor(t * 3) % 2 == 0)
implantTitle.TextColor3 = (math.random() < 0.08) and Color3.new(1, 1, 1) or IMPL_CYAN
implantWarning.TextTransparency = (math.floor(t * 3) % 2 == 0) and 0 or 0.55
task.wait(0.05)
end
scanTween:Cancel()
scan:Destroy()
implantWarning.TextTransparency = 0
local function restorePlayer()
isImplanting = false
if hum and hum.Parent then
hum.JumpPower = prevJumpPower or hum.JumpPower
hum.JumpHeight = prevJumpHeight or hum.JumpHeight
if hum == humanoid then
restoreSpeed()
if applyJumpStats then applyJumpStats() end -- re-apply Bionic Joints jump boost
end
end
end
if systemDestroyed then restorePlayer() return end
owned[item.Id] = true
equipCyber(item.Id)
applyStats()
refreshVisualAugments()
updateHudAndMenus()
notify("INSTALLED: " .. item.Name, rarityColor(item.Rarity))
implantFill.Size = UDim2.new(1, 0, 1, 0)
implantProgressLabel.Text = "IMPLANT PROGRESS: 100%"
for _, g in ipairs(glows) do TweenService:Create(g, TweenInfo.new(0.2), { BackgroundTransparency = 0.05 }):Play() end
if math.random() < IMPLANT_INJURY_CHANCE then
table.insert(lines, "IMPLANT SEATED - TISSUE TRAUMA DETECTED")
table.insert(lines, "VITALS: -" .. IMPLANT_INJURY_DAMAGE .. " HP")
implantFill.BackgroundColor3 = Color3.fromRGB(255, 60, 60)
implantTitle.Text = "// IMPLANT COMPLETE - INJURY SUSTAINED"
implantTitle.TextColor3 = Color3.fromRGB(255, 90, 90)
local h = humanoid
if h and h.Parent and h.Health > 0 then
local nh = h.Health - IMPLANT_INJURY_DAMAGE
if not IMPLANT_INJURY_CAN_KILL then nh = math.max(1, nh) end
h.Health = math.max(0, nh)
end
injuryFlash.BackgroundTransparency = 0.3
TweenService:Create(injuryFlash, TweenInfo.new(0.9, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), { BackgroundTransparency = 1 }):Play()
shakeCamera(1.5, 0.4)
else
table.insert(lines, "IMPLANT SEATED - NO COMPLICATIONS")
implantTitle.Text = "// IMPLANT COMPLETE - SUCCESS"
implantTitle.TextColor3 = IMPL_GREEN
end
while #lines > 9 do table.remove(lines, 1) end
renderLog(false)
task.wait(2.4)
for _, g in ipairs(glows) do g:Destroy() end
if not systemDestroyed then implantOverlay.Visible = false end
restorePlayer()
end
-- ==========================================
-- CYBERWARE MENU (Cyberpunk 2077 style)
-- ==========================================
menuOverlay = new("Frame", {
Size = UDim2.new(1, 0, 1, 0), BackgroundColor3 = Color3.new(1, 1, 1), BackgroundTransparency = 0.04, Visible = false, ZIndex = 10,
}, mainGui)
new("UIGradient", {
Rotation = 90,
Color = ColorSequence.new({ ColorSequenceKeypoint.new(0, Color3.fromRGB(58, 10, 16)), ColorSequenceKeypoint.new(1, Color3.fromRGB(8, 3, 6)) }),
}, menuOverlay)
menuRoot = new("Frame", {
AnchorPoint = Vector2.new(0.5, 0.5), Position = UDim2.new(0.5, 0, 0.5, 0), Size = UDim2.new(0, 1200, 0, 660), BackgroundTransparency = 1,
}, menuOverlay)
menuScale = new("UIScale", {}, menuRoot)
windowScales = {} -- { sc = UIScale, w = , h = }
function rescaleMenu()
local vp = camera.ViewportSize
menuScale.Scale = math.clamp(math.min(vp.X / 1240, (vp.Y - 40) / 700), 0.35, 1.2)
for _, e in ipairs(windowScales) do
e.sc.Scale = math.clamp(math.min(vp.X / (e.w + 60), (vp.Y - 40) / (e.h + 70)), 0.4, 1.1)
end
end
camera:GetPropertyChangedSignal("ViewportSize"):Connect(rescaleMenu)
rescaleMenu()
new("TextLabel", {
Position = UDim2.new(0, 440, 0, 0), Size = UDim2.new(0, 320, 0, 24), BackgroundTransparency = 1, Text = "// CYBERWARE",
TextColor3 = C.RED, Font = Enum.Font.GothamBlack, TextSize = 18,
}, menuRoot)
-- body preview
viewportFrame = new("ViewportFrame", {
Size = UDim2.new(0, 320, 0, 540), Position = UDim2.new(0, 440, 0, 30), BackgroundColor3 = Color3.fromRGB(30, 8, 12), BackgroundTransparency = 0.45,
}, menuRoot)
new("UIStroke", { Color = Color3.fromRGB(120, 30, 34) }, viewportFrame)
vpCamera = new("Camera", { FieldOfView = 55 }, viewportFrame)
viewportFrame.CurrentCamera = vpCamera
updateViewportDummy = function()
local old = viewportFrame:FindFirstChild("PreviewDummy")
local rot = old and old:GetPivot().Rotation or CFrame.new()
if old then old:Destroy() end
local dummy = new("Model", { Name = "PreviewDummy" })
local root = new("Part", { Name = "HumanoidRootPart", Size = Vector3.new(2, 2, 1), Transparency = 1, CFrame = CFrame.new(), Anchored = true }, dummy)
dummy.PrimaryPart = root
local function makePart(name, size, color, cframe)
return new("Part", { Name = name, Size = size, Color = color, Material = PLASTIC, CFrame = cframe, Anchored = true }, dummy)
end
local glassRed, glassTeal = Color3.fromRGB(205, 85, 95), Color3.fromRGB(40, 110, 120)
local head = makePart("Head", Vector3.new(2, 1, 1), glassRed, CFrame.new(0, 1.5, 0))
local torso = makePart("Torso", Vector3.new(2, 2, 1), glassRed, CFrame.new(0, 0, 0))
local rightArm = makePart("Right Arm", Vector3.new(1, 2, 1), glassRed, CFrame.new(1.5, 0, 0))
local leftArm = makePart("Left Arm", Vector3.new(1, 2, 1), glassRed, CFrame.new(-1.5, 0, 0))
local leftLeg = makePart("Left Leg", Vector3.new(1, 2, 1), glassTeal, CFrame.new(-0.5, -2, 0))
local rightLeg = makePart("Right Leg", Vector3.new(1, 2, 1), glassTeal, CFrame.new(0.5, -2, 0))
for _, p in ipairs({ head, torso, rightArm, leftArm, leftLeg, rightLeg }) do p.Transparency = 0.2 end
local function adder(base)
return function(name, size, color, material, offset)
local p = makePart(name, size, color, base.CFrame * offset)
p.Material = material
if name == "Muzzle" then p.Transparency = 1 end
return p
end
end
if isEq("LaunchCannon") then buildCannonParts(adder(rightArm)) end
if isEq("MantisBlades") then
if not isEq("LaunchCannon") then buildMantisParts(adder(rightArm), 1) end
buildMantisParts(adder(leftArm), -1)
end
if isEq("Sandevistan") then buildSandevistanParts(adder(torso)) end
if isEq("Dasher") then
buildDasherParts(adder(leftLeg))
buildDasherParts(adder(rightLeg))
end
if wornJacket then buildJacketParts(adder(torso), adder(rightArm), adder(leftArm)) end
-- v3 implants
if isEq("GrappleLauncher") then buildGrappleParts(adder(leftArm)) end
if isEq("RocketFist") then buildRocketFistParts(adder(rightArm)) end
if isEq("ShoulderThrusters") then buildThrusterParts(adder(torso)) end
if isEq("DashKatana") then buildKatanaParts(adder(torso)) end
if isEq("RailgunBoots") then buildRailBootParts(adder(leftLeg)) buildRailBootParts(adder(rightLeg)) end
if isEq("KineticBoard") then buildBoardEmitterParts(adder(leftLeg)) buildBoardEmitterParts(adder(rightLeg)) end
if isEq("TitaniumSkeleton") then buildTitaniumParts(adder(torso), adder(rightArm), adder(leftArm)) end
if isEq("BionicJoints") then
for _, p in ipairs({ rightArm, leftArm, leftLeg, rightLeg }) do buildJointParts(adder(p)) end
end
if isEq("OverclockedHeart") then buildHeartParts(adder(torso)) end
if isEq("OxygenBooster") then buildOxygenParts(adder(torso)) end
if isEq("MotionScanner") then buildScannerParts(adder(head)) end
dummy:PivotTo(rot)
dummy.Parent = viewportFrame
vpCamera.CFrame = CFrame.new(Vector3.new(0, -0.4, 9), Vector3.new(0, -0.5, 0))
end
RunService.RenderStepped:Connect(function()
if systemDestroyed or not menuOverlay.Visible then return end
local d = viewportFrame:FindFirstChild("PreviewDummy")
if d then d:PivotTo(CFrame.Angles(0, os.clock() * 0.7, 0)) end
end)
-- equipment slots
slotWidgets = {}
local menuUnequip -- defined below
local inventoryFrame
invTab = "Cyber"
function makeSlot(x, y, cat, j)
local btn = new("TextButton", {
Size = UDim2.new(0, 84, 0, 84), Position = UDim2.new(0, x, 0, y), BackgroundColor3 = C.SLOT, BackgroundTransparency = 0.15,
AutoButtonColor = false, Text = "+", TextColor3 = Color3.fromRGB(160, 42, 46), Font = Enum.Font.Code, TextSize = 34,
TextWrapped = true,
}, menuRoot)
new("UIStroke", { Color = C.SLOTLINE, Thickness = 1.5 }, btn)
local bar = new("Frame", { Size = UDim2.new(0, 4, 1, 0), BackgroundColor3 = C.ORANGE, BorderSizePixel = 0, Visible = false }, btn)
local corner = new("Frame", {
Size = UDim2.new(0, 14, 0, 6), Position = UDim2.new(1, -14, 1, -6), BackgroundColor3 = C.CYAN, BorderSizePixel = 0, Visible = false,
}, btn)
btn.MouseButton1Click:Connect(function()
local id = equipped[cat][j]
if id then
menuUnequip(id)
elseif CATEGORY_HAS_ITEMS[cat] then
invTab = "Cyber"
inventoryFrame.Visible = true
updateHudAndMenus()
end
end)
attachTooltip(btn, function() return equipped[cat][j] or nil end)
return { btn = btn, bar = bar, corner = corner }
end
function buildCategory(c, rowIdx, side)
local y = 60 + (rowIdx - 1) * 104
slotWidgets[c.Name] = {}
new("TextLabel", {
Position = UDim2.new(0, side == "Left" and 20 or 780, 0, y - 24), Size = UDim2.new(0, 400, 0, 22), BackgroundTransparency = 1,
Text = c.Name, TextColor3 = C.RED, Font = Enum.Font.GothamMedium, TextSize = 17,
TextXAlignment = side == "Left" and Enum.TextXAlignment.Right or Enum.TextXAlignment.Left,
}, menuRoot)
for j = 1, c.Slots do
local x = side == "Left" and (420 - (c.Slots - j + 1) * 90 + 6) or (780 + (j - 1) * 90)
slotWidgets[c.Name][j] = makeSlot(x, y, c.Name, j)
end
end
for i, c in ipairs(SLOT_LAYOUT.Left) do buildCategory(c, i, "Left") end
for i, c in ipairs(SLOT_LAYOUT.Right) do buildCategory(c, i, "Right") end
-- stat meters (left: stamina, right: health)
function makeMeter(x, color, title)
new("TextLabel", {
Position = UDim2.new(0, x - 18, 0, 60), Size = UDim2.new(0, 100, 0, 20), BackgroundTransparency = 1, Text = title,
TextColor3 = color, Font = Enum.Font.Code, TextSize = 13,
}, menuRoot)
local bars = {}
for i = 1, 26 do
bars[i] = new("Frame", {
Size = UDim2.new(0, (i % 3 == 0) and 46 or 64, 0, 6), Position = UDim2.new(0, x, 0, 580 - i * 16), BackgroundColor3 = Color3.fromRGB(60, 30, 32),
BorderSizePixel = 0,
}, menuRoot)
end
local tag = new("TextLabel", {
Size = UDim2.new(0, 60, 0, 22), BackgroundColor3 = color, BorderSizePixel = 0, Text = "", TextColor3 = Color3.fromRGB(10, 10, 10),
Font = Enum.Font.GothamBlack, TextSize = 14, Visible = false,
}, menuRoot)
return function(val, scaleMax)
local n = math.clamp(math.floor(val / scaleMax * 26 + 0.5), 0, 26)
for i = 1, 26 do bars[i].BackgroundColor3 = i <= n and color or Color3.fromRGB(60, 30, 32) end
tag.Visible = n > 0
tag.Text = tostring(val)
if n > 0 then tag.Position = UDim2.new(0, x + 70, 0, 580 - n * 16 - 8) end
end
end
updateStaminaMeter = makeMeter(50, C.YELLOW, "STAMINA")
updateHealthMeter = makeMeter(1090, C.CYAN, "HEALTH")
-- windows (parent defaults to the cyberware menu; quest log lives directly on the HUD gui)
function makeWindow(title, w, h, parent, z)
local f = createCyberFrame(parent or menuOverlay, UDim2.new(0, w, 0, h), UDim2.new(0.5, -w / 2, 0.5, -h / 2), C.RED, Color3.fromRGB(22, 6, 10), 0.03)
f.Visible = false
f.ZIndex = z or 20
local sc = new("UIScale", {}, f)
table.insert(windowScales, { sc = sc, w = w, h = h })
new("TextLabel", {
Size = UDim2.new(1, 0, 0, 34), BackgroundColor3 = Color3.fromRGB(80, 14, 20), Text = " // " .. title, TextColor3 = C.RED,
Font = Enum.Font.GothamBlack, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left,
}, f)
local close = new("TextButton", {
Size = UDim2.new(0, 34, 0, 34), Position = UDim2.new(1, -34, 0, 0), BackgroundColor3 = Color3.fromRGB(140, 35, 35), Text = "X",
TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.GothamBold, TextSize = 16,
}, f)
close.MouseButton1Click:Connect(function() f.Visible = false end)
rescaleMenu()
return f
end
function makeScroll(parent, pos, size)
local s = new("ScrollingFrame", {
Position = pos, Size = size, BackgroundTransparency = 1, BorderSizePixel = 0, ScrollBarThickness = 5,
AutomaticCanvasSize = Enum.AutomaticSize.Y, CanvasSize = UDim2.new(0, 0, 0, 0),
}, parent)
return s
end
function walletLabel(frame)
return new("TextLabel", {
Size = UDim2.new(1, -44, 0, 34), BackgroundTransparency = 1, Text = "", TextColor3 = C.YELLOW, Font = Enum.Font.Code,
TextSize = 12, TextXAlignment = Enum.TextXAlignment.Right,
}, frame)
end
-- requirement strings (green = have, red = missing)
function reqText(mats, it, sep)
local parts = {}
for _, m in ipairs(MATERIALS) do
local need = mats[m.Id]
if need then
local have = matInv[m.Id]
table.insert(parts, string.format('%s %d/%d', have >= need and "#78ff9a" or "#ff7070", m.Name, have, need))
end
end
if it.Blueprint then
table.insert(parts, blueprints[it.Id] and 'BLUEPRINT: OWNED' or 'BLUEPRINT: REQUIRED')
end
return table.concat(parts, sep)
end
-- INVENTORY (cyberware / items / clothing / materials / blueprints)
inventoryFrame = makeWindow("INVENTORY", 660, 440)
tabButtons = {}
tabDefs = { { "Cyber", "CYBERWARE" }, { "Item", "ITEMS" }, { "Clothing", "CLOTHING" }, { "Material", "MATERIALS" }, { "Blueprint", "BLUEPRINTS" } }
for i, td in ipairs(tabDefs) do
local b = new("TextButton", {
Size = UDim2.new(0, 120, 0, 28), Position = UDim2.new(0, 14 + (i - 1) * 126, 0, 42), BackgroundColor3 = Color3.fromRGB(50, 12, 16),
Text = td[2], TextColor3 = C.RED, Font = Enum.Font.Code, TextSize = 13,
}, inventoryFrame)
new("UIStroke", { Color = C.SLOTLINE }, b)
b.MouseButton1Click:Connect(function() invTab = td[1] updateHudAndMenus() end)
tabButtons[td[1]] = b
end
invScroll = makeScroll(inventoryFrame, UDim2.new(0, 14, 0, 80), UDim2.new(1, -28, 1, -94))
new("UIGridLayout", { CellSize = UDim2.new(0, 98, 0, 98), CellPadding = UDim2.new(0, 8, 0, 8), SortOrder = Enum.SortOrder.LayoutOrder }, invScroll)
invEmpty = new("TextLabel", {
Size = UDim2.new(1, -28, 0, 40), Position = UDim2.new(0, 14, 0, 100), BackgroundTransparency = 1, Text = "NOTHING OWNED IN THIS CATEGORY",
TextColor3 = Color3.fromRGB(150, 80, 80), Font = Enum.Font.Code, TextSize = 14,
}, inventoryFrame)
function toggleItem(id)
local it = ITEM_BY_ID[id]
if not owned[id] then return end
if it.Type == "Cyber" then
if isEq(id) then
unequipCyber(id)
if id == "Sandevistan" then endSandevistan() end
if id == "Dasher" then endDasherCharge() end
if id == "ShoulderThrusters" then endThrusters() end
if id == "KineticBoard" then endBoard() end
if id == "OverclockedHeart" then endSurge() end
else
equipCyber(id)
end
applyStats()
refreshVisualAugments()
elseif it.Type == "Item" then
if inHotbar(id) then removeFromHotbar(id) else addToHotbar(id) end
elseif it.Type == "Clothing" then
wornJacket = not wornJacket
applyStats()
refreshVisualAugments()
end
updateHudAndMenus()
end
menuUnequip = function(id) toggleItem(id) end
invCells, matCells, bpCells = {}, {}, {}
function styleCell(cell, color)
new("UIStroke", { Color = color, Thickness = 1.5 }, cell)
new("Frame", { Size = UDim2.new(0, 4, 1, 0), BackgroundColor3 = color, BorderSizePixel = 0 }, cell)
end
for i, it in ipairs(ITEMS) do
local cell = new("TextButton", {
LayoutOrder = i, BackgroundColor3 = Color3.fromRGB(46, 14, 18), Text = "", TextColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.Code, TextSize = 12, TextWrapped = true, AutoButtonColor = false, Visible = false,
}, invScroll)
styleCell(cell, rarityColor(it.Rarity))
cell.MouseButton1Click:Connect(function() toggleItem(it.Id) end)
attachTooltip(cell, function() return it.Id end)
invCells[it.Id] = cell
end
for i, m in ipairs(MATERIALS) do
local cell = new("TextLabel", {
LayoutOrder = 100 + i, BackgroundColor3 = Color3.fromRGB(46, 14, 18), Text = "", TextColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.Code, TextSize = 12, TextWrapped = true, Visible = false,
}, invScroll)
styleCell(cell, rarityColor(m.Rarity))
matCells[m.Id] = cell
end
for i, it in ipairs(ITEMS) do
if it.Blueprint then
local cell = new("TextLabel", {
LayoutOrder = 200 + i, BackgroundColor3 = Color3.fromRGB(46, 14, 18), Text = "", TextColor3 = Color3.new(1, 1, 1),
Font = Enum.Font.Code, TextSize = 12, TextWrapped = true, Visible = false,
}, invScroll)
styleCell(cell, rarityColor(it.Rarity))
bpCells[it.Id] = cell
end
end
-- RIPPERDOC SHOP
shopFrame = makeWindow("RIPPERDOC WARES - CHROME & GEAR", 600, 500)
shopWallet = walletLabel(shopFrame)
shopScroll = makeScroll(shopFrame, UDim2.new(0, 10, 0, 44), UDim2.new(1, -20, 1, -54))
new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }, shopScroll)
-- state of a shop entry: OWNED / LOCKED (blueprint) / NEED_MATS / NEED_CUR / READY
function shopState(it)
if owned[it.Id] then return "OWNED" end
if it.Blueprint and not blueprints[it.Id] then return "LOCKED" end
if it.ShopMats then
for m, n in pairs(it.ShopMats) do if matInv[m] < n then return "NEED_MATS" end end
end
if it.Eddies then
if eddies < it.Eddies then return "NEED_CUR" end
elseif steps < it.Cost then
return "NEED_CUR"
end
return "READY"
end
function priceText(it)
if it.Eddies then return fmt(it.Eddies) .. " EDDIES" end
return it.Cost .. " STEPS"
end
buyButtons, shopReqLabels = {}, {}
for i, it in ipairs(ITEMS) do
local rc = rarityColor(it.Rarity)
local row = createCyberFrame(shopScroll, UDim2.new(1, -10, 0, 108), UDim2.new(), rc, Color3.fromRGB(34, 10, 14), 0.1)
row.LayoutOrder = i
new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 22), Position = UDim2.new(0, 10, 0, 6), BackgroundTransparency = 1,
Text = it.Name .. " [" .. RARITY[it.Rarity].Name .. "] (" .. (it.Category or it.Type) .. ")", TextColor3 = rc, Font = Enum.Font.GothamBold,
TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left,
}, row)
new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 40), Position = UDim2.new(0, 10, 0, 28), BackgroundTransparency = 1, Text = it.Desc,
TextColor3 = Color3.fromRGB(215, 190, 190), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top,
}, row)
shopReqLabels[it.Id] = new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 36), Position = UDim2.new(0, 10, 0, 68), BackgroundTransparency = 1, Text = "", RichText = true,
TextColor3 = Color3.fromRGB(200, 200, 200), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top,
}, row)
local buy = new("TextButton", {
Size = UDim2.new(0, 140, 0, 46), Position = UDim2.new(1, -152, 0.5, -23), BackgroundColor3 = Color3.fromRGB(90, 22, 28),
Text = priceText(it), TextColor3 = C.YELLOW, Font = Enum.Font.GothamBlack, TextSize = 13, TextWrapped = true,
}, row)
new("UIStroke", { Color = C.RED }, buy)
buyButtons[it.Id] = buy
attachTooltip(row, function() return it.Id end)
buy.MouseButton1Click:Connect(function()
local st = shopState(it)
if st == "OWNED" or isImplanting then return end
if st ~= "READY" then
buy.Text = (st == "LOCKED" and "NEED BLUEPRINT!") or (st == "NEED_MATS" and "NEED MATERIALS!")
or (it.Eddies and "NEED EDDIES!" or "NEED STEPS!")
buy.BackgroundColor3 = Color3.fromRGB(150, 20, 20)
task.delay(0.8, function() updateHudAndMenus() end)
return
end
-- pay: currency + required materials
if it.Eddies then eddies -= it.Eddies else steps -= it.Cost end
if it.ShopMats then
for m, n in pairs(it.ShopMats) do matInv[m] -= n end
end
if it.Type == "Cyber" then
updateHudAndMenus()
task.spawn(runImplantProcedure, it)
else
owned[it.Id] = true
if it.Id == "Pistol" then addToHotbar("Pistol") end
if it.Id == "DavidJacket" then wornJacket = true applyStats() refreshVisualAugments() end
updateHudAndMenus()
end
end)
end
-- shop: materials supply (common/uncommon for steps, rare+ for eddies, top tiers are quest/loot only)
new("TextLabel", {
LayoutOrder = 500, Size = UDim2.new(1, -10, 0, 26), BackgroundTransparency = 1, Text = "// MATERIALS SUPPLY", TextColor3 = C.RED,
Font = Enum.Font.GothamBlack, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left,
}, shopScroll)
matShopRows = {}
for i, m in ipairs(MATERIALS) do
local rc = rarityColor(m.Rarity)
local row = createCyberFrame(shopScroll, UDim2.new(1, -10, 0, 52), UDim2.new(), rc, Color3.fromRGB(34, 10, 14), 0.1)
row.LayoutOrder = 500 + i
local nameL = new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 22), Position = UDim2.new(0, 10, 0, 6), BackgroundTransparency = 1, Text = "", TextColor3 = rc,
Font = Enum.Font.GothamBold, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left,
}, row)
new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 18), Position = UDim2.new(0, 10, 0, 28), BackgroundTransparency = 1,
Text = m.Currency and "Sold by the Ripperdoc." or "Not sold - quest rewards and rare finds only.",
TextColor3 = Color3.fromRGB(190, 160, 160), Font = Enum.Font.Code, TextSize = 11, TextXAlignment = Enum.TextXAlignment.Left,
}, row)
local btn = new("TextButton", {
Size = UDim2.new(0, 140, 0, 38), Position = UDim2.new(1, -152, 0.5, -19), BackgroundColor3 = Color3.fromRGB(90, 22, 28),
Text = m.Currency and (m.Qty .. "x " .. fmt(m.Price) .. (m.Currency == "eddies" and " EDDIES" or " STEPS")) or "QUEST / LOOT ONLY",
TextColor3 = m.Currency and C.YELLOW or Color3.fromRGB(150, 150, 150), Font = Enum.Font.GothamBlack, TextSize = 12, TextWrapped = true,
}, row)
new("UIStroke", { Color = rc }, btn)
matShopRows[m.Id] = { name = nameL, btn = btn }
btn.MouseButton1Click:Connect(function()
if not m.Currency then return end
local have = (m.Currency == "eddies") and eddies or steps
if have < m.Price then
btn.Text = m.Currency == "eddies" and "NEED EDDIES!" or "NEED STEPS!"
task.delay(0.6, function() updateHudAndMenus() end)
return
end
if m.Currency == "eddies" then eddies -= m.Price else steps -= m.Price end
matInv[m.Id] += m.Qty
updateHudAndMenus()
end)
end
-- UPGRADES (+ cyberware mastery rows)
upgradeFrame = makeWindow("UPGRADE BENCH", 540, 450)
upScroll = makeScroll(upgradeFrame, UDim2.new(0, 10, 0, 44), UDim2.new(1, -20, 1, -54))
new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }, upScroll)
upRows = {}
for i, up in ipairs(UPGRADES) do
local row = createCyberFrame(upScroll, UDim2.new(1, -10, 0, 66), UDim2.new(), rarityColor(ITEM_BY_ID[up.Item].Rarity), Color3.fromRGB(34, 10, 14), 0.1)
row.LayoutOrder = i
row.Visible = false
local nameL = new("TextLabel", {
Size = UDim2.new(0.62, 0, 0, 22), Position = UDim2.new(0, 10, 0, 6), BackgroundTransparency = 1, Text = "",
TextColor3 = C.ORANGE, Font = Enum.Font.GothamBold, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left,
}, row)
new("TextLabel", {
Size = UDim2.new(0.62, 0, 0, 30), Position = UDim2.new(0, 10, 0, 30), BackgroundTransparency = 1, Text = up.Desc,
TextColor3 = Color3.fromRGB(215, 190, 190), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top,
}, row)
local btn = new("TextButton", {
Size = UDim2.new(0, 130, 0, 40), Position = UDim2.new(1, -142, 0.5, -20), BackgroundColor3 = Color3.fromRGB(90, 22, 28),
Text = "", TextColor3 = C.YELLOW, Font = Enum.Font.GothamBlack, TextSize = 13,
}, row)
new("UIStroke", { Color = C.RED }, btn)
btn.MouseButton1Click:Connect(function()
local lvl = upl(up.Id)
if lvl >= upMax(up) then return end
local cost = up.Cost * (lvl + 1)
if steps >= cost then
steps -= cost
upLevel[up.Id] = lvl + 1
if up.Id == "GunMag" then ammo = math.min(gunMag(), ammo + 2) end
applyStats() -- passive-affecting upgrades (plating, joint springs) apply immediately
updateHudAndMenus()
else
btn.Text = "NEED STEPS!"
task.delay(0.6, function() updateHudAndMenus() end)
end
end)
upRows[up.Id] = { row = row, name = nameL, btn = btn }
end
masteryRows = {}
for i, it in ipairs(ITEMS) do
if it.Type == "Cyber" then
local rc = rarityColor(it.Rarity)
local row = createCyberFrame(upScroll, UDim2.new(1, -10, 0, 74), UDim2.new(), rc, Color3.fromRGB(24, 12, 30), 0.1)
row.LayoutOrder = 1000 + i
row.Visible = false
local nameL = new("TextLabel", {
Size = UDim2.new(1, -20, 0, 22), Position = UDim2.new(0, 10, 0, 6), BackgroundTransparency = 1, Text = "", TextColor3 = rc,
Font = Enum.Font.GothamBold, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left,
}, row)
local descL = new("TextLabel", {
Size = UDim2.new(1, -20, 0, 30), Position = UDim2.new(0, 10, 0, 28), BackgroundTransparency = 1, Text = "",
TextColor3 = Color3.fromRGB(215, 190, 215), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top,
}, row)
local track = new("Frame", { Size = UDim2.new(1, -20, 0, 6), Position = UDim2.new(0, 10, 1, -12), BackgroundColor3 = Color3.fromRGB(40, 20, 40), BorderSizePixel = 0 }, row)
local fill = new("Frame", { Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = rc, BorderSizePixel = 0 }, track)
masteryRows[it.Id] = { row = row, name = nameL, desc = descL, fill = fill }
end
end
-- CRAFTING (FABRICATOR)
craftFrame = makeWindow("FABRICATOR - CYBERWARE CRAFTING", 640, 480)
craftWallet = walletLabel(craftFrame)
craftScroll = makeScroll(craftFrame, UDim2.new(0, 10, 0, 44), UDim2.new(1, -20, 1, -54))
new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }, craftScroll)
function craftState(it)
if owned[it.Id] then return "OWNED" end
if it.Blueprint and not blueprints[it.Id] then return "NO_BLUEPRINT" end
for m, n in pairs(it.Recipe) do if matInv[m] < n then return "NO_MATS" end end
return "READY"
end
function missingText(it)
local miss = {}
for _, m in ipairs(MATERIALS) do
local need = it.Recipe[m.Id]
if need and matInv[m.Id] < need then table.insert(miss, (need - matInv[m.Id]) .. "x " .. m.Name) end
end
return #miss > 0 and ('MISSING: ' .. table.concat(miss, ", ") .. "") or ""
end
function craftItem(it)
if craftState(it) ~= "READY" then return end
for m, n in pairs(it.Recipe) do matInv[m] -= n end -- consume materials (blueprint is kept)
owned[it.Id] = true -- delivered to inventory, unequipped
notify("CRAFTED: " .. it.Name .. " (check INVENTORY)", rarityColor(it.Rarity))
updateHudAndMenus()
end
craftRows = {}
for i, it in ipairs(CRAFTABLE) do
local rc = rarityColor(it.Rarity)
local row = createCyberFrame(craftScroll, UDim2.new(1, -10, 0, 148), UDim2.new(), rc, Color3.fromRGB(34, 10, 14), 0.1)
row.LayoutOrder = i
new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 22), Position = UDim2.new(0, 10, 0, 6), BackgroundTransparency = 1,
Text = string.upper(it.Name) .. " [" .. RARITY[it.Rarity].Name .. "] (" .. it.Category .. ")", TextColor3 = rc,
Font = Enum.Font.GothamBold, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Left,
}, row)
local info = new("TextLabel", {
Size = UDim2.new(0.66, 0, 0, 114), Position = UDim2.new(0, 10, 0, 30), BackgroundTransparency = 1, Text = "", RichText = true,
TextColor3 = Color3.fromRGB(215, 215, 215), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top,
}, row)
local btn = new("TextButton", {
Size = UDim2.new(0, 140, 0, 46), Position = UDim2.new(1, -152, 0.5, -23), BackgroundColor3 = Color3.fromRGB(90, 22, 28),
Text = "CRAFT", TextColor3 = C.YELLOW, Font = Enum.Font.GothamBlack, TextSize = 13, TextWrapped = true,
}, row)
new("UIStroke", { Color = C.RED }, btn)
btn.MouseButton1Click:Connect(function() craftItem(it) end)
attachTooltip(row, function() return it.Id end)
craftRows[it.Id] = { info = info, btn = btn }
end
-- QUEST LOG (opened from the HUD, built with the same makeWindow / makeScroll patterns)
questFrame = makeWindow("QUEST LOG", 760, 520, mainGui, 45)
questFrame.Active = true -- swallow clicks so the window never fires abilities underneath
questTab = "Main"
questTabButtons = {}
for i, cd in ipairs(QUEST_CATEGORIES) do
local b = new("TextButton", {
Size = UDim2.new(0, 118, 0, 34), Position = UDim2.new(0, 16 + (i - 1) * 122, 0, 42), BackgroundColor3 = Color3.fromRGB(50, 12, 16),
Text = cd[2], TextColor3 = C.RED, Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
}, questFrame)
new("UIStroke", { Color = C.SLOTLINE }, b)
b.MouseButton1Click:Connect(function() questTab = cd[1] refreshQuestUI() end)
questTabButtons[cd[1]] = b
end
questTimerLabel = new("TextLabel", {
Size = UDim2.new(1, -32, 0, 16), Position = UDim2.new(0, 16, 0, 80), BackgroundTransparency = 1, Text = "",
TextColor3 = Color3.fromRGB(190, 160, 160), Font = Enum.Font.Code, TextSize = 11, TextXAlignment = Enum.TextXAlignment.Left,
}, questFrame)
questScroll = makeScroll(questFrame, UDim2.new(0, 10, 0, 100), UDim2.new(1, -20, 1, -110))
new("UIListLayout", { Padding = UDim.new(0, 8), SortOrder = Enum.SortOrder.LayoutOrder }, questScroll)
function describeRewards(r)
local parts = {}
if r.Eddies then table.insert(parts, fmt(r.Eddies) .. " Eddies") end
if r.Steps then table.insert(parts, fmt(r.Steps) .. " Steps") end
if r.Mats then
for _, m in ipairs(MATERIALS) do if r.Mats[m.Id] then table.insert(parts, r.Mats[m.Id] .. "x " .. m.Name) end end
end
if r.Blueprints then
for _, id in ipairs(r.Blueprints) do table.insert(parts, "Blueprint: " .. ITEM_BY_ID[id].Name) end
end
return "REWARDS: " .. table.concat(parts, " | ")
end
questUI = {}
for order, q in ipairs(QUESTS) do
local n = #q.Objectives
local rewardY = 64 + n * 30 + 4
local rc = rarityColor(q.Rarity)
local card = createCyberFrame(questScroll, UDim2.new(1, -10, 0, rewardY + 46), UDim2.new(), rc, Color3.fromRGB(34, 10, 14), 0.1)
card.LayoutOrder = order
card.Visible = false
new("TextLabel", {
Size = UDim2.new(0.55, 0, 0, 22), Position = UDim2.new(0, 10, 0, 6), BackgroundTransparency = 1, Text = q.Name, TextColor3 = rc,
Font = Enum.Font.GothamBlack, TextSize = 14, TextXAlignment = Enum.TextXAlignment.Left,
}, card)
new("TextLabel", {
Size = UDim2.new(0.45, -12, 0, 22), Position = UDim2.new(0.55, 0, 0, 6), BackgroundTransparency = 1,
Text = RARITY[q.Rarity].Name .. " // " .. string.upper(q.Difficulty), TextColor3 = rc, Font = Enum.Font.Code, TextSize = 12,
TextXAlignment = Enum.TextXAlignment.Right,
}, card)
new("TextLabel", {
Size = UDim2.new(1, -20, 0, 30), Position = UDim2.new(0, 10, 0, 30), BackgroundTransparency = 1, Text = q.Desc,
TextColor3 = Color3.fromRGB(215, 190, 190), Font = Enum.Font.Code, TextSize = 11, TextWrapped = true,
TextXAlignment = Enum.TextXAlignment.Left, TextYAlignment = Enum.TextYAlignment.Top,
}, card)
local objLabels, objFills = {}, {}
for i, o in ipairs(q.Objectives) do
local y = 64 + (i - 1) * 30
objLabels[i] = new("TextLabel", {
Size = UDim2.new(0.54, -10, 0, 22), Position = UDim2.new(0, 10, 0, y), BackgroundTransparency = 1, Text = "", TextColor3 = Color3.fromRGB(225, 215, 215),
Font = Enum.Font.Code, TextSize = 11, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left,
}, card)
local track = new("Frame", {
Size = UDim2.new(0.42, -10, 0, 14), Position = UDim2.new(0.58, 0, 0, y + 4), BackgroundColor3 = Color3.fromRGB(40, 16, 20), BorderSizePixel = 0,
}, card)
new("UIStroke", { Color = C.SLOTLINE }, track)
objFills[i] = new("Frame", { Size = UDim2.new(0, 0, 1, 0), BackgroundColor3 = rc, BorderSizePixel = 0 }, track)
end
new("TextLabel", {
Size = UDim2.new(1, -170, 0, 40), Position = UDim2.new(0, 10, 0, rewardY), BackgroundTransparency = 1, Text = describeRewards(q.Rewards),
TextColor3 = C.YELLOW, Font = Enum.Font.Code, TextSize = 11, TextWrapped = true, TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
}, card)
local claim = new("TextButton", {
Size = UDim2.new(0, 140, 0, 36), Position = UDim2.new(1, -150, 0, rewardY + 2), BackgroundColor3 = Color3.fromRGB(90, 22, 28),
Text = "", TextColor3 = C.YELLOW, Font = Enum.Font.GothamBlack, TextSize = 13, AutoButtonColor = false,
}, card)
new("UIStroke", { Color = C.RED }, claim)
claim.MouseButton1Click:Connect(function() claimQuest(q) end)
questUI[q.Id] = { card = card, labels = objLabels, fills = objFills, claim = claim }
end
refreshQuestUI = function()
if systemDestroyed or not mainGui.Parent then return end
local claimable = 0
for _, q in ipairs(QUESTS) do
if questUnlocked(q) and not questClaimed[q.Id] and questComplete(q) then claimable += 1 end
end
questBtn.Text = claimable > 0 and ("QUEST (" .. claimable .. ")") or "QUEST"
questBtn.TextColor3 = claimable > 0 and C.GREEN or C.YELLOW
if not questFrame.Visible then return end
for key, b in pairs(questTabButtons) do
b.BackgroundColor3 = (key == questTab) and Color3.fromRGB(120, 24, 30) or Color3.fromRGB(50, 12, 16)
end
if QUEST_RESET[questTab] then
questTimerLabel.Text = string.upper(questTab) .. " QUESTS RESET IN " .. fmtTime(resetAt[questTab] - os.time())
elseif questTab == "Main" then
questTimerLabel.Text = "MAIN QUESTS UNLOCK IN ORDER - CLAIM A QUEST TO REVEAL THE NEXT"
else
questTimerLabel.Text = "PROGRESS IS TRACKED AUTOMATICALLY - CLAIM EACH REWARD ONCE"
end
for _, q in ipairs(QUESTS) do
local ui = questUI[q.Id]
ui.card.Visible = (q.Cat == questTab)
if ui.card.Visible then
local unlocked = questUnlocked(q)
local prog = questProgress[q.Id]
for i, o in ipairs(q.Objectives) do
local p = prog[i]
local done = p >= o.Target
ui.labels[i].Text = (done and "[x] " or "[ ] ") .. o.Text .. " (" .. fmt(p) .. "/" .. fmt(o.Target) .. ")"
ui.labels[i].TextColor3 = done and C.GREEN or (unlocked and Color3.fromRGB(225, 215, 215) or Color3.fromRGB(130, 120, 120))
ui.fills[i].Size = UDim2.new(math.clamp(p / o.Target, 0, 1), 0, 1, 0)
end
local c = ui.claim
if questClaimed[q.Id] then
c.Text, c.BackgroundColor3, c.TextColor3 = "CLAIMED", Color3.fromRGB(45, 55, 65), Color3.fromRGB(160, 180, 195)
elseif not unlocked then
c.Text, c.BackgroundColor3, c.TextColor3 = "LOCKED", Color3.fromRGB(35, 30, 32), Color3.fromRGB(130, 120, 120)
elseif questComplete(q) then
c.Text, c.BackgroundColor3, c.TextColor3 = "CLAIM REWARD", Color3.fromRGB(25, 90, 60), C.GREEN
else
c.Text, c.BackgroundColor3, c.TextColor3 = "IN PROGRESS", Color3.fromRGB(60, 24, 28), Color3.fromRGB(190, 150, 150)
end
end
end
end
-- bottom buttons
function menuButton(text, x, color, strokeColor)
local b = new("TextButton", {
Size = UDim2.new(0, 150, 0, 44), Position = UDim2.new(0, x, 0, 600), BackgroundColor3 = color, Text = text,
TextColor3 = Color3.fromRGB(255, 225, 220), Font = Enum.Font.GothamBlack, TextSize = 14,
}, menuRoot)
new("UIStroke", { Color = strokeColor, Thickness = 2 }, b)
return b
end
invBtn = menuButton("INVENTORY", 250, Color3.fromRGB(70, 16, 22), C.RED)
shopBtn = menuButton("RIPPERDOC SHOP", 410, Color3.fromRGB(70, 16, 22), C.RED)
upgBtn = menuButton("UPGRADES", 570, Color3.fromRGB(70, 16, 22), C.RED)
craftBtn = menuButton("CRAFTING", 730, Color3.fromRGB(70, 16, 22), C.RED)
exitMenuBtn = menuButton("EXIT", 890, Color3.fromRGB(110, 40, 36), Color3.fromRGB(220, 90, 80))
function closeWindows()
inventoryFrame.Visible, shopFrame.Visible, upgradeFrame.Visible, craftFrame.Visible = false, false, false, false
tooltip.Visible = false
end
invBtn.MouseButton1Click:Connect(function() closeWindows() inventoryFrame.Visible = true updateHudAndMenus() end)
shopBtn.MouseButton1Click:Connect(function() closeWindows() shopFrame.Visible = true updateHudAndMenus() end)
upgBtn.MouseButton1Click:Connect(function() closeWindows() upgradeFrame.Visible = true updateHudAndMenus() end)
craftBtn.MouseButton1Click:Connect(function() closeWindows() craftFrame.Visible = true updateHudAndMenus() end)
exitMenuBtn.MouseButton1Click:Connect(function() menuOverlay.Visible = false closeWindows() end)
-- ==========================================
-- UI REFRESH
-- ==========================================
updateHotbars = function()
if systemDestroyed or not mainGui.Parent then return end
for _, item in ipairs(ACTIVE_CYBER) do
local hot = hotbarSlots[item.Id]
if not owned[item.Id] then
hot.Text = "[" .. item.KeyText .. "]\nLOCKED"
hot.BackgroundColor3 = Color3.fromRGB(28, 32, 32)
hot.TextColor3 = Color3.fromRGB(130, 130, 130)
elseif isEq(item.Id) then
local cd = cooldowns[item.Id]
if cd > 0 then
hot.Text = "[" .. item.KeyText .. "]\nCD: " .. string.format("%.1f", cd) .. "s"
hot.BackgroundColor3 = Color3.fromRGB(50, 25, 25)
hot.TextColor3 = Color3.fromRGB(255, 110, 110)
else
local active = (item.Id == "KineticBoard" and isBoardActive) or (item.Id == "OverclockedHeart" and isSurging)
hot.Text = "[" .. item.KeyText .. "]\n" .. (item.Short or item.Name) .. (item.Hold and "\n(HOLD)" or "") .. (active and "\nACTIVE" or "")
hot.BackgroundColor3 = active and Color3.fromRGB(20, 100, 85) or Color3.fromRGB(25, 65, 50)
hot.TextColor3 = C.GREEN
end
else
hot.Text = "[" .. item.KeyText .. "]\nUNEQUIPPED"
hot.BackgroundColor3 = Color3.fromRGB(35, 35, 38)
hot.TextColor3 = Color3.fromRGB(160, 160, 160)
end
end
end
updateHudAndMenus = function()
if systemDestroyed or not mainGui.Parent then return end
stepsLabel.Text = "STEPS: " .. tostring(steps)
local matTotal = 0
for _, m in ipairs(MATERIALS) do matTotal += matInv[m.Id] end
eddiesLabel.Text = "EDDIES: " .. fmt(eddies) .. " MATERIALS: " .. matTotal
local wallet = string.format("STEPS %s EDDIES %s", fmt(steps), fmt(eddies))
shopWallet.Text, craftWallet.Text = wallet, wallet
updateHotbars()
-- menu equipment slots
for cat, widgets in pairs(slotWidgets) do
for j, w in ipairs(widgets) do
local id = equipped[cat][j]
if id then
local it = ITEM_BY_ID[id]
w.btn.Text = it.Name
w.btn.TextSize = 12
w.btn.TextColor3 = rarityColor(it.Rarity):Lerp(Color3.new(1, 1, 1), 0.6)
w.btn.BackgroundColor3 = Color3.fromRGB(18, 44, 54)
w.bar.Visible, w.corner.Visible = true, true
w.bar.BackgroundColor3 = rarityColor(it.Rarity)
else
w.btn.Text = "+"
w.btn.TextSize = 34
w.btn.TextColor3 = Color3.fromRGB(160, 42, 46)
w.btn.BackgroundColor3 = C.SLOT
w.bar.Visible, w.corner.Visible = false, false
end
end
end
-- meters (scale grows past 400 so heavy builds don't saturate)
updateStaminaMeter(getMaxStamina(), math.max(400, getMaxStamina()))
updateHealthMeter(getMaxHealth(), math.max(400, getMaxHealth()))
-- passives (6 slots): equipped passive cyberware + worn jacket
local list = {}
for _, it in ipairs(ITEMS) do
if it.Type == "Cyber" and it.Passive and isEq(it.Id) then table.insert(list, it.Id) end
end
if wornJacket then table.insert(list, "DavidJacket") end
for i = 1, PASSIVE_SLOTS do
local id = list[i]
passiveIds[i] = id
if id then
passiveSlots[i].Text = ITEM_BY_ID[id].Name
passiveSlots[i].TextColor3 = C.GREEN
passiveSlots[i].BackgroundColor3 = Color3.fromRGB(25, 65, 50)
else
passiveSlots[i].Text = "EMPTY"
passiveSlots[i].TextColor3 = Color3.fromRGB(110, 110, 110)
passiveSlots[i].BackgroundColor3 = Color3.fromRGB(28, 32, 32)
end
end
-- item hotbar
for i = 1, 5 do
local id = itemHotbar[i]
local s = itemSlots[i]
if id then
s.btn.Text = i .. "\n" .. ITEM_BY_ID[id].Name
s.btn.TextColor3 = Color3.fromRGB(255, 235, 215)
s.btn.BackgroundColor3 = Color3.fromRGB(60, 36, 22)
else
s.btn.Text = tostring(i)
s.btn.TextColor3 = Color3.fromRGB(120, 100, 100)
s.btn.BackgroundColor3 = Color3.fromRGB(30, 22, 22)
end
s.stroke.Color = (selectedSlot == i) and C.ORANGE or Color3.fromRGB(90, 50, 40)
s.stroke.Thickness = (selectedSlot == i) and 3 or 1.5
end
updateAmmoUI(0)
-- shop: rarity, requirements, price, locked / owned states
for _, it in ipairs(ITEMS) do
local b = buyButtons[it.Id]
local st = shopState(it)
if it.ShopMats then
shopReqLabels[it.Id].Text = "REQUIRES: " .. reqText(it.ShopMats, it, " | ")
else
shopReqLabels[it.Id].Text = "REQUIRES: NOTHING BUT " .. string.upper(it.Cost and "STEPS" or "EDDIES")
end
if st == "OWNED" then
b.Text = "OWNED"
b.BackgroundColor3 = Color3.fromRGB(45, 55, 65)
b.TextColor3 = Color3.fromRGB(160, 180, 195)
elseif st == "LOCKED" then
b.Text = "LOCKED\nBLUEPRINT REQUIRED"
b.BackgroundColor3 = Color3.fromRGB(35, 30, 32)
b.TextColor3 = Color3.fromRGB(150, 130, 130)
elseif st == "READY" then
b.Text = priceText(it)
b.BackgroundColor3 = Color3.fromRGB(90, 22, 28)
b.TextColor3 = C.YELLOW
else
b.Text = priceText(it)
b.BackgroundColor3 = Color3.fromRGB(60, 24, 28)
b.TextColor3 = Color3.fromRGB(170, 140, 100)
end
end
for _, m in ipairs(MATERIALS) do
local r = matShopRows[m.Id]
r.name.Text = m.Name .. " [" .. RARITY[m.Rarity].Name .. "] OWNED: " .. matInv[m.Id]
if m.Currency then
local have = (m.Currency == "eddies") and eddies or steps
r.btn.TextColor3 = have >= m.Price and C.YELLOW or Color3.fromRGB(170, 140, 100)
r.btn.Text = m.Qty .. "x " .. fmt(m.Price) .. (m.Currency == "eddies" and " EDDIES" or " STEPS")
end
end
-- inventory
local any = false
for _, it in ipairs(ITEMS) do
local cell = invCells[it.Id]
local show = owned[it.Id] and it.Type == invTab
cell.Visible = show
if show then
any = true
local status, col
if it.Type == "Cyber" then
if isEq(it.Id) then status, col = "EQUIPPED", C.GREEN else status, col = "UNEQUIPPED", Color3.fromRGB(180, 150, 150) end
elseif it.Type == "Item" then
if inHotbar(it.Id) then status, col = "IN HOTBAR", C.GREEN else status, col = "CLICK TO ADD", Color3.fromRGB(180, 150, 150) end
else
if wornJacket then status, col = "WORN", C.GREEN else status, col = "CLICK TO WEAR", Color3.fromRGB(180, 150, 150) end
end
cell.Text = it.Name .. "\n" .. RARITY[it.Rarity].Name .. "\n" .. status
cell.TextColor3 = col
end
end
for _, m in ipairs(MATERIALS) do
local cell = matCells[m.Id]
local show = invTab == "Material"
cell.Visible = show
if show then
any = true
cell.Text = m.Name .. "\n" .. RARITY[m.Rarity].Name .. "\nx" .. matInv[m.Id]
cell.TextColor3 = matInv[m.Id] > 0 and rarityColor(m.Rarity) or Color3.fromRGB(110, 100, 100)
end
end
for id, cell in pairs(bpCells) do
local show = invTab == "Blueprint" and blueprints[id]
cell.Visible = show
if show then
any = true
cell.Text = "BLUEPRINT\n" .. ITEM_BY_ID[id].Name .. "\n" .. RARITY[ITEM_BY_ID[id].Rarity].Name
cell.TextColor3 = rarityColor(ITEM_BY_ID[id].Rarity)
end
end
invEmpty.Visible = not any
for key, b in pairs(tabButtons) do
b.BackgroundColor3 = (key == invTab) and Color3.fromRGB(120, 24, 30) or Color3.fromRGB(50, 12, 16)
end
-- upgrades
for _, up in ipairs(UPGRADES) do
local r = upRows[up.Id]
local lvl = upl(up.Id)
local mx = upMax(up)
r.row.Visible = owned[up.Item]
local pips = string.rep("■", lvl) .. string.rep("□", mx - lvl)
r.name.Text = up.Name .. " [" .. ITEM_BY_ID[up.Item].Name .. "] " .. pips
if lvl >= mx then
r.btn.Text = "MAXED"
r.btn.BackgroundColor3 = Color3.fromRGB(45, 55, 65)
else
r.btn.Text = "UPGRADE: " .. (up.Cost * (lvl + 1)) .. " STEPS"
r.btn.BackgroundColor3 = Color3.fromRGB(90, 22, 28)
end
end
-- mastery
for id, r in pairs(masteryRows) do
local it = ITEM_BY_ID[id]
local lvl = masteryLevel(id)
local u = usage[id] or 0
r.row.Visible = owned[id]
r.name.Text = "MASTERY [" .. it.Name .. "] LV" .. lvl .. " " .. string.rep("■", lvl) .. string.rep("□", 5 - lvl)
if lvl >= 5 then
r.desc.Text = u .. " uses | MAX - " .. perkText(it, 5)
r.fill.Size = UDim2.new(1, 0, 1, 0)
else
local lo, hi = masteryThreshold(id, lvl), masteryThreshold(id, lvl + 1)
r.desc.Text = u .. "/" .. hi .. " uses | NEXT (L" .. (lvl + 1) .. "): " .. perkText(it, lvl + 1)
r.fill.Size = UDim2.new(math.clamp((u - lo) / math.max(1, hi - lo), 0, 1), 0, 1, 0)
end
end
-- crafting
for _, it in ipairs(CRAFTABLE) do
local r = craftRows[it.Id]
local st = craftState(it)
local lines = reqText(it.Recipe, it, "\n")
local miss = missingText(it)
r.info.Text = lines .. (miss ~= "" and ("\n" .. miss) or "")
if st == "OWNED" then
r.btn.Text, r.btn.BackgroundColor3, r.btn.TextColor3 = "OWNED", Color3.fromRGB(45, 55, 65), Color3.fromRGB(160, 180, 195)
elseif st == "NO_BLUEPRINT" then
r.btn.Text, r.btn.BackgroundColor3, r.btn.TextColor3 = "LOCKED\nNEED BLUEPRINT", Color3.fromRGB(35, 30, 32), Color3.fromRGB(150, 130, 130)
elseif st == "NO_MATS" then
r.btn.Text, r.btn.BackgroundColor3, r.btn.TextColor3 = "MISSING\nMATERIALS", Color3.fromRGB(60, 24, 28), Color3.fromRGB(170, 140, 100)
else
r.btn.Text, r.btn.BackgroundColor3, r.btn.TextColor3 = "CRAFT", Color3.fromRGB(25, 90, 60), C.GREEN
end
end
refreshQuestUI()
end
-- passive walk-speed bonus (Bionic Joints) applied on top of the captured base speed
function applyPassiveSpeed()
if not humanoid or not humanoid.Parent then return end
local nb = walkBonus()
local d = nb - appliedWalkBonus
if d ~= 0 then
baseWalkSpeed += d
appliedWalkBonus = nb
restoreSpeed()
end
end
-- passive jump boost (Bionic Joints); skipped while the surgery procedure has jump locked to 0
function applyJumpStats()
if not humanoid or not humanoid.Parent or isImplanting then return end
local m = jumpMult()
humanoid.JumpPower = baseJumpPower * m
humanoid.JumpHeight = baseJumpHeight * m
end
applyStats = function()
local mh, ms = getMaxHealth(), getMaxStamina()
if humanoid and humanoid.Parent then
local diff = mh - lastMaxHP
humanoid.MaxHealth = mh
if humanoid.Health > 0 then
if diff > 0 then humanoid.Health = math.min(mh, humanoid.Health + diff)
else humanoid.Health = math.min(humanoid.Health, mh) end
end
end
local sd = ms - lastMaxStam
if sd > 0 then stamina = math.min(ms, stamina + sd) else stamina = math.min(stamina, ms) end
lastMaxHP, lastMaxStam = mh, ms
applyPassiveSpeed()
applyJumpStats()
end
function destroyAllSystem()
systemDestroyed = true
isImplanting = false
endDasherCharge()
endMobility()
restoreArms()
if colorCorrection then colorCorrection.Enabled = false end
if humanoid and humanoid.Parent then
humanoid.CameraOffset = Vector3.zero
humanoid.WalkSpeed = baseWalkSpeed - appliedWalkBonus
humanoid.JumpPower, humanoid.JumpHeight = baseJumpPower, baseJumpHeight
end
if character then
for _, n in ipairs({ "PlayerCyberwareAugments", "HeldPistol", "CWBoard", "CWKatana" }) do
local m = character:FindFirstChild(n)
if m then m:Destroy() end
end
end
if mobFolder then mobFolder:Destroy() end
if mainGui then mainGui:Destroy() end
end
cyberBtn.MouseButton1Click:Connect(function()
if systemDestroyed then return end
questFrame.Visible = false
menuOverlay.Visible = not menuOverlay.Visible
closeWindows()
if menuOverlay.Visible then
rescaleMenu()
updateViewportDummy()
end
updateHudAndMenus()
end)
questBtn.MouseButton1Click:Connect(function()
if systemDestroyed then return end
if menuOverlay.Visible then menuOverlay.Visible = false closeWindows() end
questFrame.Visible = not questFrame.Visible
tooltip.Visible = false
refreshQuestUI()
end)
destroyBtn.MouseButton1Click:Connect(destroyAllSystem)
-- ==========================================
-- STEP GRIND (no more neon walking marks)
-- ==========================================
distanceAccumulator = 0
lastPosition = nil
function triggerStepEarnEffect()
if systemDestroyed or not stepsLabel.Parent then return end
stepsLabel.TextColor3 = Color3.fromRGB(0, 255, 255)
TweenService:Create(stepsLabel, TweenInfo.new(0.25), { TextColor3 = Color3.fromRGB(180, 255, 0) }):Play()
local pop = new("TextLabel", {
Size = UDim2.new(0, 90, 0, 20), Position = UDim2.new(0, 85 + math.random(-15, 15), 0, 56), BackgroundTransparency = 1,
Text = "+1 STEP", TextColor3 = C.GREEN, Font = Enum.Font.GothamBlack, TextSize = 14,
}, mainGui)
local tw = TweenService:Create(pop, TweenInfo.new(0.55, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {
Position = pop.Position + UDim2.new(0, 0, 0, -24), TextTransparency = 1,
})
tw:Play()
tw.Completed:Connect(function() pop:Destroy() end)
end
RunService.Heartbeat:Connect(function()
if systemDestroyed or not character or not rootPart or not humanoid or humanoid.Health <= 0 then return end
local currentPos = rootPart.Position
if lastPosition then
local flat = Vector3.new(currentPos.X - lastPosition.X, 0, currentPos.Z - lastPosition.Z).Magnitude
if flat > 0.02 and flat < 20 then
distanceAccumulator += flat
if distanceAccumulator >= STEP_DISTANCE_REQUIRED then
local earned = math.floor(distanceAccumulator / STEP_DISTANCE_REQUIRED)
distanceAccumulator %= STEP_DISTANCE_REQUIRED
steps += earned
stepsTaken += earned -- lifetime steps for quests
trackEvent("steps", nil, earned)
for _ = 1, math.min(earned, 5) do rollStepLoot() end
updateHudAndMenus()
triggerStepEarnEffect()
end
end
end
lastPosition = currentPos
end)
-- ==========================================
-- CHARACTER SETUP + INPUT
-- ==========================================
function setupCharacter(newChar)
if systemDestroyed then return end
endSandevistan()
endDasherCharge()
endMobility() -- clears thrusters / grapple / board / surge / FX from the previous body
isDashing, isCannonJumping, isSlashing, dasherCharging = false, false, false, false
slashPose = nil
heldGunModel = nil
autoRotateSuppressed = false
fallVelMin = 0
character = newChar
humanoid = character:WaitForChild("Humanoid")
rootPart = character:WaitForChild("HumanoidRootPart")
baseWalkSpeed = humanoid.WalkSpeed
baseJumpPower, baseJumpHeight = humanoid.JumpPower, humanoid.JumpHeight
appliedWalkBonus = 0
lastPosition = rootPart.Position
distanceAccumulator = 0
rayParams.FilterDescendantsInstances = { character }
setupArmRig()
lastMaxHP, lastMaxStam = getMaxHealth(), getMaxStamina()
humanoid.MaxHealth = lastMaxHP
humanoid.Health = lastMaxHP
stamina = lastMaxStam
-- jump quests + passive triggers
humanoid.StateChanged:Connect(function(_, new)
if systemDestroyed then return end
if new == Enum.HumanoidStateType.Jumping then
if not isCannonJumping and not isImplanting then onJump() end
elseif new == Enum.HumanoidStateType.Landed then
onLand()
end
end)
applyPassiveSpeed()
applyJumpStats()
refreshVisualAugments()
refreshHeldGun()
updateHotbars()
if menuOverlay.Visible then updateViewportDummy() end
end
if player.Character then setupCharacter(player.Character) end
player.CharacterAdded:Connect(setupCharacter)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed or systemDestroyed then return end
local kc = input.KeyCode
if kc == DESTROY_KEY then
destroyAllSystem()
elseif isImplanting then
return
elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
if menuVisible() or questFrame.Visible then return end
if gunReady() then shootGun()
elseif isEq("MantisBlades") then activateMantis() end
elseif kc == Enum.KeyCode.Q then activateSandevistan()
elseif kc == Enum.KeyCode.G then beginDasherCharge()
elseif kc == Enum.KeyCode.F then activateLaunchCannon()
elseif kc == Enum.KeyCode.E then activateMantis()
elseif kc == Enum.KeyCode.R then if gunReady() then reloadGun() end
elseif kc == Enum.KeyCode.H then activateGrapple()
elseif kc == Enum.KeyCode.X then activateRocketFist()
elseif kc == Enum.KeyCode.Z then beginThrusters()
elseif kc == Enum.KeyCode.C then activateKatana()
elseif kc == Enum.KeyCode.B then activateRailgun()
elseif kc == Enum.KeyCode.V then toggleBoard()
elseif kc == Enum.KeyCode.T then activateSurge()
elseif kc == Enum.KeyCode.N then activateScanner()
else
for i, k in ipairs(numKeys) do
if kc == k then selectSlot(i) end
end
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.G then endDasherCharge() end
if input.KeyCode == Enum.KeyCode.Z then endThrusters() end
end)
updateStaminaBar()
updateHudAndMenus()
refreshQuestUI()