-- TACTICAL F3X AWP SNIPER + REALISTIC CS:GO OPERATOR RIG + CUSTOM MOVEMENT + DRAWING HUD + SFX (v3) -- Controls: -- F or 1 : Draw AWP (First-Person) / Holster to back (Third-Person Operator) -- Left Click : Shoot (Physical tracer bullet -> Deletes hit player's part via F3X Remove) -- Right Click : Hold Scope | Q: Toggle Scope | Wheel: Zoom (2x - 10x) -- R : Reload (Tactical vs Empty) | V: Inspect | T: Cycle Theme | B: Rescan | F6: Stop & Restore -- LeftShift : Tactical Walk | LeftCtrl / C: Crouch | Z / X: Peek Lean | Space: Jump -- Globals: -- _G.WuzSniperSmooth = true/false | _G.WuzSniperCustomMove = true/false | _G.WuzSniperSeeBody = false/true -- _G.WuzSniperDeleteWorld = false/true | _G.WuzSniperIgnoreAccessories = true/false -- _G.WuzSniperAutoRescope = true/false | _G.WuzSniperRecoilKick = true/false | _G.WuzSniperBreathSway = true/false -- _G.WuzSniperVolume = 0.85 | _G.WuzSniperMute = false | _G.WuzSniperSoundMode = "synth"|"roblox"|"classic" -- _G.WuzSniperStop = true | _G.WuzSniperRemove() | _G.WuzSniperSetTheme(1..5 or name) | _G.WuzSniperStats() local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UIS = game:GetService("UserInputService") local GuiService = game:GetService("GuiService") local SoundService = game:GetService("SoundService") local Debris = game:GetService("Debris") assert(typeof(Drawing) == "table" and Drawing.new, "[WuzSniper] Drawing API nao suportada neste executor!") local plr = Players.LocalPlayer local env = (getgenv and getgenv()) or _G if env.WuzSniperCleanup then pcall(env.WuzSniperCleanup) end _G.WuzSniperStop = false if _G.WuzSniperSmooth == nil then _G.WuzSniperSmooth = true end if _G.WuzSniperCustomMove == nil then _G.WuzSniperCustomMove = true end if _G.WuzSniperSeeBody == nil then _G.WuzSniperSeeBody = false end if _G.WuzSniperDeleteWorld == nil then _G.WuzSniperDeleteWorld = false end if _G.WuzSniperIgnoreAccessories == nil then _G.WuzSniperIgnoreAccessories = true end if _G.WuzSniperAutoRescope == nil then _G.WuzSniperAutoRescope = true end if _G.WuzSniperRecoilKick == nil then _G.WuzSniperRecoilKick = true end if _G.WuzSniperBreathSway == nil then _G.WuzSniperBreathSway = false end if _G.WuzSniperCrosshair == nil then _G.WuzSniperCrosshair = true end if _G.WuzSniperScopeBlur == nil then _G.WuzSniperScopeBlur = true end if _G.WuzSniperVolume == nil then _G.WuzSniperVolume = 0.85 end if _G.WuzSniperMute == nil then _G.WuzSniperMute = false end local RENDER_STEP_NAME = "WuzSniper_FPSRender" ------------------------------------------------------------------- -- THEMES & SCULPTED CS:GO OPERATOR + REALISTIC AWP GEOMETRY ------------------------------------------------------------------- local THEMES = { { name = "Phantom Obsidian (SAS Crimson)", armor = Color3.fromRGB(30, 33, 39), frame = Color3.fromRGB(46, 50, 58), trim = Color3.fromRGB(132, 138, 150), piston = Color3.fromRGB(110, 118, 132), glow = Color3.fromRGB(255, 62, 68), core = Color3.fromRGB(255, 212, 148), gearDark = Color3.fromRGB(24, 26, 32), gearCloth = Color3.fromRGB(42, 46, 55), gearArmor = Color3.fromRGB(34, 38, 46), gearAccent = Color3.fromRGB(76, 82, 94), gearLeather = Color3.fromRGB(28, 25, 24), brass = Color3.fromRGB(198, 162, 74), visor = Color3.fromRGB(196, 48, 56), optic = Color3.fromRGB(34, 68, 86), }, { name = "Arctic Spec-Ops (Cyan)", armor = Color3.fromRGB(214, 222, 232), frame = Color3.fromRGB(44, 52, 66), trim = Color3.fromRGB(74, 132, 198), piston = Color3.fromRGB(148, 162, 182), glow = Color3.fromRGB(0, 226, 255), core = Color3.fromRGB(212, 248, 255), gearDark = Color3.fromRGB(34, 40, 50), gearCloth = Color3.fromRGB(184, 194, 208), gearArmor = Color3.fromRGB(52, 62, 78), gearAccent = Color3.fromRGB(112, 128, 148), gearLeather = Color3.fromRGB(38, 42, 48), brass = Color3.fromRGB(196, 164, 84), visor = Color3.fromRGB(32, 184, 224), optic = Color3.fromRGB(28, 82, 108), }, { name = "AWP Dragon Lore (Solar Gold)", armor = Color3.fromRGB(64, 62, 48), frame = Color3.fromRGB(38, 42, 52), trim = Color3.fromRGB(218, 168, 52), piston = Color3.fromRGB(172, 166, 152), glow = Color3.fromRGB(255, 192, 54), core = Color3.fromRGB(255, 238, 178), gearDark = Color3.fromRGB(26, 28, 34), gearCloth = Color3.fromRGB(58, 60, 50), gearArmor = Color3.fromRGB(38, 40, 48), gearAccent = Color3.fromRGB(168, 132, 52), gearLeather = Color3.fromRGB(44, 34, 26), brass = Color3.fromRGB(214, 174, 72), visor = Color3.fromRGB(224, 168, 48), optic = Color3.fromRGB(54, 72, 42), }, { name = "Olive GIGN / AWP Green", armor = Color3.fromRGB(66, 82, 56), frame = Color3.fromRGB(30, 34, 32), trim = Color3.fromRGB(124, 132, 122), piston = Color3.fromRGB(98, 104, 100), glow = Color3.fromRGB(92, 238, 118), core = Color3.fromRGB(255, 218, 146), gearDark = Color3.fromRGB(24, 28, 26), gearCloth = Color3.fromRGB(46, 56, 48), gearArmor = Color3.fromRGB(34, 40, 36), gearAccent = Color3.fromRGB(78, 88, 72), gearLeather = Color3.fromRGB(32, 28, 24), brass = Color3.fromRGB(198, 162, 74), visor = Color3.fromRGB(76, 184, 104), optic = Color3.fromRGB(28, 74, 58), }, { name = "Void Hyper-Beast (Abyssal)", armor = Color3.fromRGB(28, 24, 38), frame = Color3.fromRGB(52, 42, 74), trim = Color3.fromRGB(142, 78, 206), piston = Color3.fromRGB(154, 148, 178), glow = Color3.fromRGB(210, 68, 255), core = Color3.fromRGB(244, 204, 255), gearDark = Color3.fromRGB(20, 18, 28), gearCloth = Color3.fromRGB(44, 38, 62), gearArmor = Color3.fromRGB(32, 28, 44), gearAccent = Color3.fromRGB(110, 68, 162), gearLeather = Color3.fromRGB(26, 22, 32), brass = Color3.fromRGB(198, 162, 82), visor = Color3.fromRGB(196, 68, 228), optic = Color3.fromRGB(58, 38, 92), }, } local V, C = Vector3.new, CFrame.new local function degCF(x, y, z, rx, ry, rz) return C(x, y, z) * CFrame.Angles(math.rad(rx or 0), math.rad(ry or 0), math.rad(rz or 0)) end local function cylCF(axis, x, y, z, rx, ry, rz) local r = (axis == "Y" and CFrame.Angles(0, 0, math.rad(90))) or (axis == "Z" and CFrame.Angles(0, math.rad(90), 0)) or CFrame.identity return degCF(x, y, z, rx, ry, rz) * r end local function M(name, shape, cf, sz, role, prio, flags) flags = flags or "" return { name = name, shape = shape or "Normal", cf = cf, sz = sz, role = role, prio = prio or 1, isBody = string.find(flags, "B", 1, true) ~= nil, isHead = string.find(flags, "H", 1, true) ~= nil, isArm = string.find(flags, "A", 1, true) ~= nil, fxType = (flags ~= "" and string.sub(flags, 1, 3) == "FX:") and string.sub(flags, 4) or nil, } end local ARM_UPPER_LEN = 1.18 local ARM_FORE_LEN = 1.20 local LEG_THIGH_LEN = 1.22 local LEG_SHIN_LEN = 1.20 local BONE_ORDER = { "Pelvis", "Torso", "Head", "ThighL", "ShinL", "FootL", "ThighR", "ShinR", "FootR", "UpperArmL", "ForearmL", "HandL", "UpperArmR", "ForearmR", "HandR", "TriggerFinger", "Rifle", "Bolt", "BoltHandle", "Trigger", "Mag", "FX", } local MODEL_SPEC = { Pelvis = { M("PelvisCore", "Normal", degCF(0, 0.04, 0), V(0.84, 0.32, 0.50), "gearCloth", 1.5, "B"), M("PelvisGroin", "Wedge", degCF(0, -0.09, -0.22, 0, 0, 180), V(0.70, 0.22, 0.14), "gearCloth", 1.35, "B"), M("PelvisCrotch", "Normal", degCF(0, -0.15, 0.02), V(0.32, 0.16, 0.44), "gearCloth", 1.3, "B"), M("HipBallL", "Ball", degCF(-0.40, -0.08, 0), V(0.46, 0.46, 0.46), "gearCloth", 1.35, "B"), M("HipBallR", "Ball", degCF(0.40, -0.08, 0), V(0.46, 0.46, 0.46), "gearCloth", 1.35, "B"), M("TacticalBelt", "Normal", degCF(0, 0.14, 0), V(0.96, 0.13, 0.56), "gearLeather", 1.3, "B"), M("BeltBuckle", "Normal", degCF(0, 0.14, -0.29), V(0.20, 0.12, 0.06), "piston", 1.15, "B"), M("BeltBuckleTab", "Normal", degCF(0, 0.14, -0.305), V(0.09, 0.08, 0.05), "gearAccent", 1.05, "B"), M("HipPouchL", "Normal", degCF(-0.50, 0.05, -0.02, 0, 0, 5), V(0.14, 0.25, 0.28), "gearDark", 1.1, "B"), M("DumpPouch", "Normal", degCF(-0.32, 0.00, 0.34, -5, 12, 0), V(0.28, 0.32, 0.17), "gearDark", 1.05, "B"), M("IFAKPouchR", "Normal", degCF(0.47, 0.04, 0.14, 0, -14, -5), V(0.16, 0.24, 0.26), "gearArmor", 1.05, "B"), }, Torso = { M("WaistCore", "Normal", degCF(0, 0.24, 0.02), V(0.82, 0.42, 0.48), "gearCloth", 1.55, "B"), M("LatTapL", "Wedge", degCF(-0.46, 0.52, 0.02, 0, 90, 180), V(0.48, 0.52, 0.18), "gearCloth", 1.45, "B"), M("LatTapR", "Wedge", degCF(0.46, 0.52, 0.02, 0, -90, 180), V(0.48, 0.52, 0.18), "gearCloth", 1.45, "B"), M("ChestCore", "Normal", degCF(0, 0.74, 0.02), V(1.06, 0.58, 0.54), "gearCloth", 1.65, "B"), M("PlateFront", "Normal", degCF(0, 0.72, -0.28), V(0.82, 0.54, 0.12), "gearArmor", 1.6, "B"), M("PlateFrontSlope", "Wedge", degCF(0, 0.96, -0.24), V(0.72, 0.13, 0.16), "gearArmor", 1.45, "B"), M("PlateBack", "Normal", degCF(0, 0.73, 0.29), V(0.82, 0.56, 0.12), "gearArmor", 1.55, "B"), M("PlateBackSlope", "Wedge", degCF(0, 0.96, 0.26, 0, 180, 0), V(0.72, 0.13, 0.16), "gearArmor", 1.45, "B"), M("TrapSlopeL", "Wedge", degCF(-0.55, 1.05, 0.02, 0, 90, 0), V(0.50, 0.16, 0.40), "gearCloth", 1.45, "B"), M("TrapSlopeR", "Wedge", degCF(0.55, 1.05, 0.02, 0, -90, 0), V(0.50, 0.16, 0.40), "gearCloth", 1.45, "B"), M("CarrierStrapL", "Normal", degCF(-0.34, 1.07, 0.01, 0, 0, -8), V(0.18, 0.11, 0.54), "gearDark", 1.3, "B"), M("CarrierStrapR", "Normal", degCF(0.34, 1.07, 0.01, 0, 0, 8), V(0.18, 0.11, 0.54), "gearDark", 1.3, "B"), M("NeckGaiter", "Cylinder", cylCF("Y", 0, 1.12, 0.02), V(0.19, 0.50, 0.50), "gearDark", 1.4, "B"), M("MagPouchL", "Normal", degCF(-0.24, 0.54, -0.36), V(0.19, 0.26, 0.11), "gearDark", 1.2, "B"), M("MagPouchM", "Normal", degCF(0, 0.54, -0.36), V(0.19, 0.26, 0.11), "gearDark", 1.2, "B"), M("MagPouchR", "Normal", degCF(0.24, 0.54, -0.36), V(0.19, 0.26, 0.11), "gearDark", 1.2, "B"), M("AdminPouch", "Normal", degCF(0, 0.83, -0.35), V(0.44, 0.15, 0.08), "gearDark", 1.15, "B"), M("PatchAccent", "Normal", degCF(0.12, 0.84, -0.375), V(0.15, 0.08, 0.05), "trim", 1.05, "B"), M("AssaultPack", "Normal", degCF(0.04, 0.71, 0.43), V(0.58, 0.50, 0.20), "gearDark", 1.15, "B"), M("AssaultPackTop", "Wedge", degCF(0.04, 0.96, 0.43, 0, 180, 0), V(0.56, 0.11, 0.20), "gearArmor", 1.1, "B"), M("RadioBody", "Normal", degCF(-0.33, 0.80, 0.41), V(0.16, 0.32, 0.13), "gearDark", 1.1, "B"), M("PTTButton", "Normal", degCF(-0.34, 0.86, -0.33), V(0.09, 0.11, 0.07), "piston", 1.0, "B"), M("CommsAntenna", "Cylinder", cylCF("Y", -0.36, 1.22, 0.42, -12, 0, 5), V(0.58, 0.05, 0.05), "gearDark", 1.0, "B"), }, Head = { M("Neck", "Cylinder", cylCF("Y", 0, 0.14, 0), V(0.32, 0.34, 0.34), "gearDark", 1.65, "BH"), M("Balaclava", "Ball", degCF(0, 0.44, 0.01), V(0.80, 0.84, 0.86), "gearDark", 1.85, "BH"), M("JawMask", "Wedge", degCF(0, 0.28, -0.25, 0, 0, 180), V(0.52, 0.28, 0.30), "gearArmor", 1.7, "BH"), M("NoseBridge", "Normal", degCF(0, 0.40, -0.37), V(0.20, 0.14, 0.14), "gearDark", 1.55, "BH"), M("MaskNozzle", "Cylinder", cylCF("Z", 0, 0.27, -0.40), V(0.13, 0.18, 0.18), "piston", 1.5, "BH"), M("MaskFilterL", "Cylinder", cylCF("Z", -0.20, 0.24, -0.35, 0, 28), V(0.17, 0.19, 0.19), "gearDark", 1.45, "BH"), M("MaskFilterR", "Cylinder", cylCF("Z", 0.20, 0.24, -0.35, 0, -28), V(0.17, 0.19, 0.19), "gearDark", 1.45, "BH"), M("HelmetDome", "Ball", degCF(0, 0.55, 0.04), V(0.96, 0.94, 1.02), "gearArmor", 1.9, "BH"), M("HelmetBrow", "Wedge", degCF(0, 0.69, -0.36), V(0.74, 0.14, 0.22), "gearArmor", 1.7, "BH"), M("HelmetNape", "Wedge", degCF(0, 0.48, 0.42, 0, 180, 0), V(0.78, 0.36, 0.24), "gearArmor", 1.65, "BH"), M("HelmetCounterwt", "Normal", degCF(0, 0.46, 0.54), V(0.32, 0.18, 0.09), "gearDark", 1.3, "BH"), M("HelmetRailL", "Normal", degCF(-0.46, 0.55, -0.02, -8, 0, 0), V(0.07, 0.10, 0.54), "gearAccent", 1.35, "BH"), M("HelmetRailR", "Normal", degCF(0.46, 0.55, -0.02, -8, 0, 0), V(0.07, 0.10, 0.54), "gearAccent", 1.35, "BH"), M("NVGMount", "Normal", degCF(0, 0.72, -0.47), V(0.20, 0.15, 0.08), "piston", 1.35, "BH"), M("NVGArm", "Normal", degCF(0, 0.82, -0.44, -26, 0, 0), V(0.10, 0.16, 0.18), "gearDark", 1.25, "BH"), M("GoggleFrame", "Normal", degCF(0, 0.49, -0.37), V(0.68, 0.21, 0.18), "gearDark", 1.75, "BH"), M("GoggleVisor", "Normal", degCF(0, 0.49, -0.44), V(0.60, 0.14, 0.08), "optic", 1.75, "BH"), M("GoggleStrap", "Normal", degCF(0, 0.49, 0.02), V(0.94, 0.09, 0.70), "gearDark", 1.3, "BH"), M("HeadsetL", "Cylinder", cylCF("X", -0.48, 0.40, 0.02), V(0.14, 0.32, 0.32), "gearAccent", 1.5, "BH"), M("HeadsetR", "Cylinder", cylCF("X", 0.48, 0.40, 0.02), V(0.14, 0.32, 0.32), "gearAccent", 1.5, "BH"), M("BoomMic", "Cylinder", cylCF("Z", -0.32, 0.28, -0.22, -16, -34), V(0.40, 0.05, 0.05), "gearDark", 1.2, "BH"), }, ThighL = { M("ThighL_Upper", "Cylinder", cylCF("Z", 0, 0, -LEG_THIGH_LEN * 0.32), V(0.76, 0.56, 0.56), "gearCloth", 1.75, "B"), M("ThighL_Lower", "Cylinder", cylCF("Z", 0, 0, -LEG_THIGH_LEN * 0.72), V(0.64, 0.48, 0.48), "gearCloth", 1.7, "B"), M("ThighL_Cargo", "Normal", degCF(-0.26, 0.02, -0.58, 0, 0, 4), V(0.13, 0.32, 0.40), "gearCloth", 1.25, "B"), M("ThighL_Strap", "Cylinder", cylCF("Z", 0, 0, -0.52), V(0.12, 0.56, 0.56), "gearDark", 1.2, "B"), M("KneeL_Ball", "Ball", degCF(0, 0, -LEG_THIGH_LEN), V(0.45, 0.45, 0.45), "gearCloth", 1.65, "B"), M("KneeL_Pad", "Normal", degCF(0, 0.20, -LEG_THIGH_LEN), V(0.30, 0.11, 0.26), "gearDark", 1.4, "B"), M("KneeL_Cap", "Wedge", degCF(0, 0.24, -LEG_THIGH_LEN), V(0.24, 0.07, 0.18), "gearAccent", 1.25, "B"), }, ShinL = { M("ShinL_Upper", "Cylinder", cylCF("Z", 0, -0.02, -LEG_SHIN_LEN * 0.34), V(0.76, 0.45, 0.45), "gearCloth", 1.75, "B"), M("ShinL_Lower", "Cylinder", cylCF("Z", 0, 0, -LEG_SHIN_LEN * 0.72), V(0.64, 0.39, 0.39), "gearCloth", 1.7, "B"), M("ShinL_Cuff", "Cylinder", cylCF("Z", 0, 0, -LEG_SHIN_LEN * 0.86), V(0.15, 0.44, 0.44), "gearCloth", 1.35, "B"), M("ShinL_Guard", "Wedge", degCF(0, 0.16, -LEG_SHIN_LEN * 0.42), V(0.25, 0.10, 0.66), "gearArmor", 1.3, "B"), }, FootL = { M("BootL_Shaft", "Cylinder", cylCF("Y", 0, 0.04, 0.02), V(0.26, 0.38, 0.38), "gearLeather", 1.55, "B"), M("BootL_Heel", "Normal", degCF(0, -0.15, 0.06), V(0.38, 0.24, 0.28), "gearLeather", 1.6, "B"), M("BootL_Vamp", "Wedge", degCF(0, -0.13, -0.20), V(0.38, 0.24, 0.36), "gearDark", 1.6, "B"), M("BootL_Toe", "Wedge", degCF(0, -0.18, -0.44), V(0.38, 0.16, 0.20), "gearLeather", 1.55, "B"), M("BootL_Sole", "Normal", degCF(0, -0.27, -0.17), V(0.42, 0.08, 0.74), "gearAccent", 1.4, "B"), }, ThighR = { M("ThighR_Upper", "Cylinder", cylCF("Z", 0, 0, -LEG_THIGH_LEN * 0.32), V(0.76, 0.56, 0.56), "gearCloth", 1.75, "B"), M("ThighR_Lower", "Cylinder", cylCF("Z", 0, 0, -LEG_THIGH_LEN * 0.72), V(0.64, 0.48, 0.48), "gearCloth", 1.7, "B"), M("ThighR_Strap1", "Cylinder", cylCF("Z", 0, 0, -0.46), V(0.10, 0.57, 0.57), "gearDark", 1.2, "B"), M("ThighR_Strap2", "Cylinder", cylCF("Z", 0, 0, -0.72), V(0.10, 0.51, 0.51), "gearDark", 1.2, "B"), M("HolsterPlate", "Normal", degCF(0.28, 0.00, -0.58), V(0.10, 0.32, 0.36), "gearDark", 1.25, "B"), M("HolsterShell", "Normal", degCF(0.34, 0.02, -0.60), V(0.13, 0.22, 0.32), "gearArmor", 1.2, "B"), M("SidearmGrip", "Normal", degCF(0.35, -0.05, -0.38, 18, 0, -8), V(0.09, 0.16, 0.22), "gearLeather", 1.15, "B"), M("KneeR_Ball", "Ball", degCF(0, 0, -LEG_THIGH_LEN), V(0.45, 0.45, 0.45), "gearCloth", 1.65, "B"), M("KneeR_Pad", "Normal", degCF(0, 0.20, -LEG_THIGH_LEN), V(0.30, 0.11, 0.26), "gearDark", 1.4, "B"), M("KneeR_Cap", "Wedge", degCF(0, 0.24, -LEG_THIGH_LEN), V(0.24, 0.07, 0.18), "gearAccent", 1.25, "B"), }, ShinR = { M("ShinR_Upper", "Cylinder", cylCF("Z", 0, -0.02, -LEG_SHIN_LEN * 0.34), V(0.76, 0.45, 0.45), "gearCloth", 1.75, "B"), M("ShinR_Lower", "Cylinder", cylCF("Z", 0, 0, -LEG_SHIN_LEN * 0.72), V(0.64, 0.39, 0.39), "gearCloth", 1.7, "B"), M("ShinR_Cuff", "Cylinder", cylCF("Z", 0, 0, -LEG_SHIN_LEN * 0.86), V(0.15, 0.44, 0.44), "gearCloth", 1.35, "B"), M("ShinR_Guard", "Wedge", degCF(0, 0.16, -LEG_SHIN_LEN * 0.42), V(0.25, 0.10, 0.66), "gearArmor", 1.3, "B"), }, FootR = { M("BootR_Shaft", "Cylinder", cylCF("Y", 0, 0.04, 0.02), V(0.26, 0.38, 0.38), "gearLeather", 1.55, "B"), M("BootR_Heel", "Normal", degCF(0, -0.15, 0.06), V(0.38, 0.24, 0.28), "gearLeather", 1.6, "B"), M("BootR_Vamp", "Wedge", degCF(0, -0.13, -0.20), V(0.38, 0.24, 0.36), "gearDark", 1.6, "B"), M("BootR_Toe", "Wedge", degCF(0, -0.18, -0.44), V(0.38, 0.16, 0.20), "gearLeather", 1.55, "B"), M("BootR_Sole", "Normal", degCF(0, -0.27, -0.17), V(0.42, 0.08, 0.74), "gearAccent", 1.4, "B"), }, UpperArmL = { M("ArmL_Shoulder", "Ball", degCF(0, 0, -0.02), V(0.50, 0.50, 0.50), "sleeveL", 1.9, "A"), M("ArmL_Upper", "Cylinder", cylCF("Z", 0, 0, -ARM_UPPER_LEN * 0.50), V(ARM_UPPER_LEN, 0.44, 0.44), "sleeveL", 1.95, "A"), M("ArmL_Pocket", "Normal", degCF(0, 0.21, -0.48), V(0.22, 0.07, 0.30), "gearArmor", 1.55, "A"), M("ArmL_Elbow", "Ball", degCF(0, 0, -ARM_UPPER_LEN), V(0.41, 0.41, 0.41), "sleeveL", 1.85, "A"), M("ArmL_ElbowPad", "Normal", degCF(0, 0.19, -ARM_UPPER_LEN), V(0.22, 0.09, 0.24), "gearDark", 1.6, "A"), }, ForearmL = { M("ArmL_RollCuff", "Cylinder", cylCF("Z", 0, 0, -0.18), V(0.24, 0.43, 0.43), "sleeveL", 1.9, "A"), M("ArmL_ForeUpper", "Cylinder", cylCF("Z", 0, 0, -ARM_FORE_LEN * 0.44), V(0.64, 0.38, 0.38), "skinL", 2.05, "A"), M("ArmL_Wrist", "Cylinder", cylCF("Z", 0, 0, -ARM_FORE_LEN * 0.78), V(0.48, 0.31, 0.31), "skinL", 2.05, "A"), M("ArmL_Gauntlet", "Cylinder", cylCF("Z", 0, 0, -ARM_FORE_LEN + 0.12), V(0.20, 0.35, 0.35), "gearDark", 1.95, "A"), }, HandL = { M("HandL_Palm", "Normal", degCF(0, 0, -0.13), V(0.26, 0.12, 0.25), "glove", 2.15, "A"), M("HandL_WristStrap", "Normal", degCF(0, 0.04, 0.02), V(0.28, 0.14, 0.10), "gearLeather", 2.0, "A"), M("HandL_WatchBezel", "Normal", degCF(0.135, 0.02, 0.04), V(0.05, 0.13, 0.13), "piston", 1.9, "A"), M("HandL_WatchDial", "Normal", degCF(0.15, 0.02, 0.04), V(0.05, 0.09, 0.09), "glow", 1.9, "A"), M("HandL_Knuckle", "Wedge", degCF(0, 0.055, -0.24), V(0.27, 0.09, 0.13), "gearArmor", 1.95, "A"), M("HandL_Fingers", "Normal", degCF(-0.035, -0.07, -0.29, 32, 0, 0), V(0.19, 0.16, 0.11), "glove", 2.1, "A"), M("HandL_Index", "Normal", degCF(0.095, -0.045, -0.31, 22, 0, 0), V(0.065, 0.14, 0.08), "glove", 2.1, "A"), M("HandL_Thumb", "Cylinder", cylCF("Z", 0.14, 0.02, -0.16, -12, -22), V(0.20, 0.085, 0.085), "glove", 2.05, "A"), }, UpperArmR = { M("ArmR_Shoulder", "Ball", degCF(0, 0, -0.02), V(0.50, 0.50, 0.50), "sleeveR", 1.9, "A"), M("ArmR_Upper", "Cylinder", cylCF("Z", 0, 0, -ARM_UPPER_LEN * 0.50), V(ARM_UPPER_LEN, 0.44, 0.44), "sleeveR", 1.95, "A"), M("ArmR_Pocket", "Normal", degCF(0, 0.21, -0.48), V(0.22, 0.07, 0.30), "gearArmor", 1.55, "A"), M("ArmR_Elbow", "Ball", degCF(0, 0, -ARM_UPPER_LEN), V(0.41, 0.41, 0.41), "sleeveR", 1.85, "A"), M("ArmR_ElbowPad", "Normal", degCF(0, 0.19, -ARM_UPPER_LEN), V(0.22, 0.09, 0.24), "gearDark", 1.6, "A"), }, ForearmR = { M("ArmR_RollCuff", "Cylinder", cylCF("Z", 0, 0, -0.18), V(0.24, 0.43, 0.43), "sleeveR", 1.9, "A"), M("ArmR_ForeUpper", "Cylinder", cylCF("Z", 0, 0, -ARM_FORE_LEN * 0.44), V(0.64, 0.38, 0.38), "skinR", 2.05, "A"), M("ArmR_Wrist", "Cylinder", cylCF("Z", 0, 0, -ARM_FORE_LEN * 0.78), V(0.48, 0.31, 0.31), "skinR", 2.05, "A"), M("ArmR_Gauntlet", "Cylinder", cylCF("Z", 0, 0, -ARM_FORE_LEN + 0.12), V(0.20, 0.35, 0.35), "gearDark", 1.95, "A"), }, HandR = { M("HandR_Palm", "Normal", degCF(0, 0, -0.13), V(0.26, 0.12, 0.25), "glove", 2.15, "A"), M("HandR_WristStrap", "Normal", degCF(0, 0.04, 0.02), V(0.28, 0.14, 0.10), "gearLeather", 2.0, "A"), M("HandR_Knuckle", "Wedge", degCF(0, 0.055, -0.24), V(0.27, 0.09, 0.13), "gearArmor", 1.95, "A"), M("HandR_Fingers", "Normal", degCF(0.035, -0.07, -0.29, 32, 0, 0), V(0.19, 0.16, 0.11), "glove", 2.1, "A"), M("HandR_Thumb", "Cylinder", cylCF("Z", -0.14, 0.02, -0.16, -12, 22), V(0.20, 0.085, 0.085), "glove", 2.05, "A"), }, TriggerFinger = { M("HandR_Index", "Normal", degCF(0, -0.01, -0.09), V(0.065, 0.07, 0.19), "glove", 2.2, "A"), }, Rifle = { -- Buttstock & AI Thumbhole Frame M("ButtPad", "Normal", degCF(0, -0.08, 1.44), V(0.21, 0.42, 0.10), "gearLeather", 1.5), M("ButtSpacer", "Normal", degCF(0, -0.07, 1.36), V(0.20, 0.39, 0.08), "gearDark", 1.45), M("StockBody", "Normal", degCF(0, -0.06, 1.15), V(0.19, 0.34, 0.38), "armor", 1.6), M("StockRearSlope", "Wedge", degCF(0, -0.26, 1.16, 0, 180, 180), V(0.18, 0.10, 0.36), "armor", 1.5), M("CheekRest", "Cylinder", cylCF("Z", 0, 0.16, 1.08), V(0.44, 0.21, 0.21), "gearDark", 1.45), M("CheekPostL", "Cylinder", cylCF("Y", -0.05, 0.08, 1.10), V(0.16, 0.05, 0.05), "piston", 1.15), M("CheekPostR", "Cylinder", cylCF("Y", 0.05, 0.08, 1.10), V(0.16, 0.05, 0.05), "piston", 1.15), M("MonopodRear", "Cylinder", cylCF("Z", 0, -0.28, 1.24), V(0.24, 0.07, 0.07), "piston", 1.15), M("StockTopBridge", "Normal", degCF(0, 0.07, 0.78, -6, 0, 0), V(0.18, 0.12, 0.48), "armor", 1.55), M("StockBotStrut", "Normal", degCF(0, -0.34, 0.80, -14, 0, 0), V(0.16, 0.10, 0.56), "armor", 1.5), M("PistolGrip", "Normal", degCF(0, -0.22, 0.48, -20, 0, 0), V(0.16, 0.40, 0.20), "gearDark", 1.7), M("GripBase", "Normal", degCF(0, -0.40, 0.56), V(0.17, 0.09, 0.22), "frame", 1.4), -- Chassis Spine & AI Action Receiver M("ChassisSpine", "Normal", degCF(0, -0.10, -0.52), V(0.23, 0.12, 2.30), "frame", 1.8), M("ReceiverMain", "Normal", degCF(0, 0.05, -0.02), V(0.22, 0.24, 1.32), "frame", 1.85), M("ReceiverChamfL", "Wedge", degCF(-0.08, 0.18, -0.04, 0, 90, 0), V(1.24, 0.08, 0.08), "frame", 1.5), M("ReceiverChamfR", "Wedge", degCF(0.08, 0.18, -0.04, 0, -90, 0), V(1.24, 0.08, 0.08), "frame", 1.5), M("ChassisSkinL", "Normal", degCF(-0.115, -0.02, -0.06), V(0.05, 0.18, 1.18), "armor", 1.55), M("ChassisSkinR", "Normal", degCF(0.115, -0.02, -0.06), V(0.05, 0.18, 1.18), "armor", 1.55), M("EjectionPort", "Normal", degCF(0.08, 0.12, -0.08), V(0.09, 0.10, 0.46), "gearDark", 1.45), M("TriggerGuard", "Normal", degCF(0, -0.20, 0.22), V(0.07, 0.05, 0.30), "frame", 1.25), M("TriggerGuardF", "Normal", degCF(0, -0.14, 0.08, 22, 0, 0), V(0.07, 0.14, 0.05), "frame", 1.2), M("MagRelease", "Normal", degCF(0, -0.17, 0.04, -18, 0, 0), V(0.08, 0.12, 0.06), "piston", 1.2), -- Forend & Folded Tactical Bipod M("Handguard", "Normal", degCF(0, -0.01, -1.16), V(0.23, 0.21, 1.06), "armor", 1.8), M("HandguardLow", "Normal", degCF(0, -0.09, -1.24), V(0.20, 0.10, 0.96), "frame", 1.55), M("HandguardNose", "Wedge", degCF(0, -0.02, -1.80, 0, 0, 180), V(0.21, 0.18, 0.28), "armor", 1.6), M("SlingSwivel", "Cylinder", cylCF("X", -0.12, -0.02, -1.54), V(0.08, 0.06, 0.06), "piston", 1.1), M("BipodSpigot", "Normal", degCF(0, -0.09, -1.72), V(0.14, 0.09, 0.22), "frame", 1.25), M("BipodLegL", "Cylinder", cylCF("Z", -0.12, -0.13, -1.32, 0, 4), V(0.76, 0.06, 0.06), "piston", 1.2), M("BipodLegR", "Cylinder", cylCF("Z", 0.12, -0.13, -1.32, 0, -4), V(0.76, 0.06, 0.06), "piston", 1.2), M("BipodFootL", "Cylinder", cylCF("Z", -0.14, -0.13, -0.94, 0, 4), V(0.14, 0.09, 0.09), "gearDark", 1.1), M("BipodFootR", "Cylinder", cylCF("Z", 0.14, -0.13, -0.94, 0, -4), V(0.14, 0.09, 0.09), "gearDark", 1.1), -- Heavy Free-Floated Barrel & AI Twin-Baffle Muzzle Brake M("BarrelChamber", "Cylinder", cylCF("Z", 0, 0.08, -0.96), V(0.60, 0.15, 0.15), "piston", 1.85), M("BarrelMain", "Cylinder", cylCF("Z", 0, 0.08, -2.26), V(2.08, 0.115, 0.115), "piston", 1.9), M("BrakeCollar", "Cylinder", cylCF("Z", 0, 0.08, -3.26), V(0.14, 0.17, 0.17), "frame", 1.75), M("BrakeUpper", "Normal", degCF(0, 0.14, -3.44), V(0.20, 0.06, 0.34), "frame", 1.7), M("BrakeLower", "Normal", degCF(0, 0.02, -3.44), V(0.20, 0.06, 0.34), "frame", 1.7), M("BrakeBaffleM", "Normal", degCF(0, 0.08, -3.42), V(0.20, 0.15, 0.07), "frame", 1.65), M("BrakeBaffleT", "Normal", degCF(0, 0.08, -3.59), V(0.20, 0.15, 0.07), "frame", 1.65), M("BrakeBore", "Cylinder", cylCF("Z", 0, 0.08, -3.45), V(0.32, 0.10, 0.10), "gearDark", 1.55), -- 20-MOA Picatinny Rail & Schmidt & Bender PM II Scope M("TopRail", "Normal", degCF(0, 0.23, -0.06), V(0.14, 0.055, 1.18), "frame", 1.45), M("TopRailNotch", "Normal", degCF(0, 0.255, -0.06), V(0.11, 0.05, 1.10), "trim", 1.35), M("ScopeBaseF", "Normal", degCF(0, 0.33, -0.44), V(0.16, 0.15, 0.16), "frame", 1.45), M("ScopeBaseR", "Normal", degCF(0, 0.33, 0.16), V(0.16, 0.15, 0.16), "frame", 1.45), M("ScopeRingF", "Cylinder", cylCF("Z", 0, 0.45, -0.44), V(0.14, 0.21, 0.21), "trim", 1.45), M("ScopeRingR", "Cylinder", cylCF("Z", 0, 0.45, 0.16), V(0.14, 0.21, 0.21), "trim", 1.45), M("ScopeTube", "Cylinder", cylCF("Z", 0, 0.45, -0.12), V(0.96, 0.175, 0.175), "frame", 1.8), M("ScopeObjCone", "Cylinder", cylCF("Z", 0, 0.45, -0.62), V(0.22, 0.22, 0.22), "frame", 1.75), M("ScopeObjBell", "Cylinder", cylCF("Z", 0, 0.45, -0.84), V(0.34, 0.26, 0.26), "armor", 1.8), M("ScopeEyeBell", "Cylinder", cylCF("Z", 0, 0.45, 0.44), V(0.28, 0.23, 0.23), "armor", 1.8), M("ScopeMagRing", "Cylinder", cylCF("Z", 0, 0.45, 0.29), V(0.10, 0.24, 0.24), "trim", 1.5), M("ScopeThrow", "Normal", degCF(-0.12, 0.54, 0.29, 0, 0, 32), V(0.05, 0.11, 0.06), "piston", 1.25), M("TurretElev", "Cylinder", cylCF("Y", 0, 0.59, -0.14), V(0.15, 0.14, 0.14), "trim", 1.4), M("TurretWind", "Cylinder", cylCF("X", 0.14, 0.45, -0.14), V(0.13, 0.12, 0.12), "trim", 1.35), M("TurretParal", "Cylinder", cylCF("X", -0.14, 0.45, -0.14), V(0.12, 0.13, 0.13), "frame", 1.3), M("ScopeLensF", "Cylinder", cylCF("Z", 0, 0.45, -1.00), V(0.05, 0.21, 0.21), "optic", 1.65), M("ScopeLensR", "Cylinder", cylCF("Z", 0, 0.45, 0.57), V(0.05, 0.18, 0.18), "optic", 1.65), }, Bolt = { M("BoltCarrier", "Cylinder", cylCF("Z", 0.04, 0.12, -0.02), V(0.56, 0.11, 0.11), "piston", 1.6), M("BoltShroud", "Cylinder", cylCF("Z", 0.02, 0.12, 0.56), V(0.14, 0.14, 0.14), "frame", 1.5), M("CockingPin", "Cylinder", cylCF("Z", 0.02, 0.12, 0.65), V(0.06, 0.06, 0.06), "glow", 1.35), }, BoltHandle = { M("BoltCollar", "Cylinder", cylCF("Z", 0, 0, 0), V(0.08, 0.13, 0.13), "piston", 1.65), M("BoltStem", "Cylinder", cylCF("X", 0.11, -0.04, 0.04, 0, -14, -22), V(0.22, 0.055, 0.055), "piston", 1.7), M("BoltKnob", "Ball", degCF(0.21, -0.08, 0.08), V(0.12, 0.12, 0.12), "gearDark", 1.75), }, Trigger = { M("TriggerBlade", "Wedge", degCF(0, -0.05, 0, 18, 0, 0), V(0.05, 0.14, 0.06), "piston", 1.25), }, Mag = { M("MagazineBody", "Normal", degCF(0, -0.12, 0, -6, 0, 0), V(0.15, 0.36, 0.36), "gearDark", 1.65), M("MagazineRib", "Normal", degCF(0, -0.12, -0.17, -6, 0, 0), V(0.08, 0.30, 0.05), "gearAccent", 1.4), M("MagazineFoot", "Normal", degCF(0, -0.31, -0.02, -6, 0, 0), V(0.17, 0.07, 0.40), "frame", 1.5), M("MagTopRound", "Cylinder", cylCF("Z", 0, 0.06, -0.02), V(0.26, 0.065, 0.065), "brass", 1.45), }, FX = { M("FX_BulletTip", "Wedge", CFrame.identity, V(0.12, 0.12, 0.44), "brass", 4.6, "FX:bullet_tip"), M("FX_BulletCore", "Cylinder", CFrame.identity, V(1.10, 0.11, 0.11), "core", 4.8, "FX:bullet_core"), M("FX_BulletTrail", "Cylinder", CFrame.identity, V(3.50, 0.07, 0.07), "glow", 4.4, "FX:bullet_trail"), M("FX_FlashCore", "Ball", CFrame.identity, V(0.20, 0.20, 0.20), "core", 2.5, "FX:flash_core"), M("FX_FlashBrakeL", "Cylinder", CFrame.identity, V(0.55, 0.16, 0.16), "core", 2.4, "FX:flash_side_l"), M("FX_FlashBrakeR", "Cylinder", CFrame.identity, V(0.55, 0.16, 0.16), "core", 2.4, "FX:flash_side_r"), M("FX_Shell", "Cylinder", CFrame.identity, V(0.28, 0.065, 0.065), "brass", 3.2, "FX:shell"), }, } local BLUEPRINT = {} for _, boneName in ipairs(BONE_ORDER) do for _, spec in ipairs(MODEL_SPEC[boneName]) do spec.bone = boneName BLUEPRINT[#BLUEPRINT + 1] = spec end end local TOTAL = #BLUEPRINT ------------------------------------------------------------------- -- CONFIG & RUNTIME STATE ------------------------------------------------------------------- local CFG = { themeIdx = 1, baseFOV = 72, scopeFOV = 16, maxAmmo = 5, boltTime = 0.88, boltDelay = 0.16, reloadTime = 2.05, inspectTime = 3.10, equipTime = 0.50, holsterTime = 0.42, batchSize = 48, maxInflightBatches = 4, sendTick = 0.024, armStyle = "glove", bulletSpeed = 360, bulletGravity = 22, bulletMaxDist = 1800, bulletMaxLife = 5.5, runSpeed = 20.0, walkSpeed = 10.5, crouchSpeed = 9.2, scopeSpeed = 8.2, groundAccel = 13.5, groundFriction = 8.8, stopSpeed = 6.5, airAccel = 16.0, airWishCap = 12.0, } local STATE = { alive = true, epoch = 0, blocks = {}, unsupportedShapes = {}, inFlightBatches = 0, lastSendAt = 0, avgRTT = 0, sentParts = 0, sentBatches = 0, rejectCount = 0, cachedTool = nil, cachedEndpoint = nil, mustEquipTool = false, checkedBackpack = false, lastEquipTry = 0, connections = {}, savedBToolsGuis = {}, } local CTRL = { equipped = false, transition = nil, transAlpha = 0, equipSettle = 0, aimHold = false, aimToggle = false, aimAlpha = 0, prevScoped = false, ammo = CFG.maxAmmo, reloading = false, reloadTimer = 0, reloadStage = 0, reloadFromEmpty = false, boltTimer = 0, boltStage = 0, postShotHold = 0, inspecting = false, inspectTimer = 0, triggerPull = 0, moveVelXZ = V(), wallStuckTimer = 0, crouchHold = false, crouchToggle = false, crouching = false, crouchAlpha = 0, walking = false, leanAlpha = 0, inAir = false, inAirAlpha = 0, wasInAir = false, jumpBuffer = 0, landDip = 0, gaitPhase = 0, gaitAmp = 0, lastStepIdx = 0, lowerYaw = nil, turnStepAlpha = 0, timeAcc = 0, swayPitch = 0, swayYaw = 0, prevCamLook = nil, recoilPos = V(), recoilRot = V(), fovKick = 0, shotKickPending = false, lastLocalAimCF = nil, lastMuzzlePos = nil, fxTimer = 0, fxDuration = 0.06, fxMuzzlePos = V(), fxMuzzleCF = CFrame.identity, fxHitPos = V(), fxRoll = 0, shell = { active = false, pos = V(), vel = V(), rot = V(), angVel = V(), age = 0, maxAge = 0.85 }, projectiles = {}, activeF3XBullet = nil, savedCamMode = nil, savedMinZoom = nil, savedMaxZoom = nil, savedFOV = nil, savedMouseIcon = nil, savedSens = nil, savedWalkSpeed = nil, savedAutoRotate = nil, savedCameraOffset = nil, savedFaceTrans = {}, savedDefaultSounds = {}, camRestored = true, moveRestored = true, serverBodyHidden = nil, bodyMaterialBusy = false, bodyMaterialNextAt = 0, rayParams = nil, rayDirty = true, currentTargetText = "", currentTargetDist = nil, currentTargetHostile = false, hitMarkerTimer = 0, hitMarkerHostile = false, lastDeleteNote = "", lastDeleteAt = 0, } ------------------------------------------------------------------- -- DUAL SOUND ENGINE (PROCEDURAL WAV SYNTH + ROBLOX/CLASSIC FALLBACK) ------------------------------------------------------------------- local SFX = { folder = nil, mode = _G.WuzSniperSoundMode or "synth", synthAssets = {}, robloxAssets = { fire = { id = "rbxassetid://1112730119", vol = 1.0, spd = 0.86 }, bolt_up = { id = "rbxasset://sounds/switch.mp3", vol = 0.45, spd = 1.45 }, bolt_pull = { id = "rbxasset://sounds/clickfast.mp3", vol = 0.50, spd = 0.90 }, bolt_push = { id = "rbxasset://sounds/snap.mp3", vol = 0.55, spd = 1.10 }, shell_drop = { id = "rbxasset://sounds/electronicpingshort.mp3", vol = 0.25, spd = 2.10 }, mag_out = { id = "rbxassetid://5214579647", vol = 0.65, spd = 1.15 }, mag_in = { id = "rbxassetid://8302576808", vol = 0.75, spd = 1.05 }, scope_in = { id = "rbxasset://sounds/clickfast.mp3", vol = 0.42, spd = 1.65 }, scope_out = { id = "rbxasset://sounds/switch.mp3", vol = 0.36, spd = 1.25 }, scope_zoom = { id = "rbxasset://sounds/SWITCH3.mp3", vol = 0.28, spd = 1.75 }, equip = { id = "rbxasset://sounds/unsheath.mp3", vol = 0.50, spd = 1.15 }, holster = { id = "rbxasset://sounds/swordslash.mp3", vol = 0.40, spd = 0.85 }, hit = { id = "rbxassetid://5952120301", vol = 0.60, spd = 1.05 }, kill = { id = "rbxassetid://4817809188", vol = 0.78, spd = 1.00 }, dryfire = { id = "rbxasset://sounds/clickfast.mp3", vol = 0.48, spd = 1.95 }, step = { id = "rbxasset://sounds/action_footsteps_plastic.mp3", vol = 0.25, spd = 1.15, tp = 0.05 }, land = { id = "rbxasset://sounds/action_jump_land.mp3", vol = 0.42, spd = 0.95 }, }, classicAssets = { fire = { id = "rbxasset://sounds/collide.mp3", vol = 0.85, spd = 1.28 }, bolt_up = { id = "rbxasset://sounds/switch.mp3", vol = 0.45, spd = 1.45 }, bolt_pull = { id = "rbxasset://sounds/clickfast.mp3", vol = 0.50, spd = 0.90 }, bolt_push = { id = "rbxasset://sounds/snap.mp3", vol = 0.55, spd = 1.10 }, shell_drop = { id = "rbxasset://sounds/electronicpingshort.mp3", vol = 0.25, spd = 2.10 }, mag_out = { id = "rbxasset://sounds/button.mp3", vol = 0.50, spd = 1.25 }, mag_in = { id = "rbxasset://sounds/metal.mp3", vol = 0.65, spd = 1.30 }, scope_in = { id = "rbxasset://sounds/clickfast.mp3", vol = 0.42, spd = 1.65 }, scope_out = { id = "rbxasset://sounds/switch.mp3", vol = 0.36, spd = 1.25 }, scope_zoom = { id = "rbxasset://sounds/SWITCH3.mp3", vol = 0.28, spd = 1.75 }, equip = { id = "rbxasset://sounds/unsheath.mp3", vol = 0.50, spd = 1.15 }, holster = { id = "rbxasset://sounds/swordslash.mp3", vol = 0.40, spd = 0.85 }, hit = { id = "rbxasset://sounds/electronicpingshort.mp3", vol = 0.45, spd = 1.35 }, kill = { id = "rbxasset://sounds/flashbulb.mp3", vol = 0.60, spd = 1.25 }, dryfire = { id = "rbxasset://sounds/clickfast.mp3", vol = 0.48, spd = 1.95 }, step = { id = "rbxasset://sounds/action_footsteps_plastic.mp3", vol = 0.25, spd = 1.15, tp = 0.05 }, land = { id = "rbxasset://sounds/action_jump_land.mp3", vol = 0.42, spd = 0.95 }, }, } local function encodeWAV(sr, dur, genFn) local n = math.max(64, math.floor(sr * dur)) local dataBytes = n * 2 local hasBuf = (type(buffer) == "table" and buffer.create and buffer.writestring and buffer.writeu32 and buffer.writeu16 and buffer.writei16 and buffer.tostring) local lp, rng = 0, 1337421 local function rand() rng = (rng * 1664525 + 1013904223) % 4294967296 return (rng / 2147483648) - 1 end local function lowpass(x, cut) lp = lp + cut * (x - lp) return lp end if hasBuf then local b = buffer.create(44 + dataBytes) buffer.writestring(b, 0, "RIFF") buffer.writeu32(b, 4, 36 + dataBytes) buffer.writestring(b, 8, "WAVEfmt ") buffer.writeu32(b, 16, 16) buffer.writeu16(b, 20, 1) buffer.writeu16(b, 22, 1) buffer.writeu32(b, 24, sr) buffer.writeu32(b, 28, sr * 2) buffer.writeu16(b, 32, 2) buffer.writeu16(b, 34, 16) buffer.writestring(b, 36, "data") buffer.writeu32(b, 40, dataBytes) for i = 0, n - 1 do local s = math.clamp(genFn(i / sr, rand, lowpass), -1, 1) buffer.writei16(b, 44 + i * 2, math.floor(s * 32767)) end return buffer.tostring(b) else local function u32(v) return string.char(v % 256, math.floor(v / 256) % 256, math.floor(v / 65536) % 256, math.floor(v / 16777216) % 256) end local function u16(v) return string.char(v % 256, math.floor(v / 256) % 256) end local out = { "RIFF", u32(36 + dataBytes), "WAVEfmt ", u32(16), u16(1), u16(1), u32(sr), u32(sr * 2), u16(2), u16(16), "data", u32(dataBytes) } for i = 0, n - 1 do local v = math.floor(math.clamp(genFn(i / sr, rand, lowpass), -1, 1) * 32767) if v < 0 then v += 65536 end out[#out + 1] = string.char(v % 256, math.floor(v / 256) % 256) end return table.concat(out) end end local function initSounds() local old = SoundService:FindFirstChild("WuzSniper_SFX") if old then pcall(function() old:Destroy() end) end local f = Instance.new("Folder") f.Name = "WuzSniper_SFX" f.Parent = SoundService SFX.folder = f local getAsset = getcustomasset or getsynasset local canSynth = (type(writefile) == "function" and type(getAsset) == "function") if canSynth then local dir = "" if type(makefolder) == "function" then pcall(function() if not (type(isfolder) == "function" and isfolder("WuzSniperSFX_v3")) then makefolder("WuzSniperSFX_v3") end end) if type(isfolder) ~= "function" or isfolder("WuzSniperSFX_v3") then dir = "WuzSniperSFX_v3/" end end local sr = 22050 local specs = { fire = { 1.15, function(t, r, lp) local thump = math.sin(6.2832 * (145 * math.exp(-t * 24) + 38) * t) * math.exp(-t * 11.5) * 1.05 local crack = r() * math.exp(-t * 52) * 1.05 local body = lp(r(), math.max(0.025, 0.42 * math.exp(-t * 6.5))) * math.exp(-t * 4.2) * 0.95 local echo = (t > 0.085) and (lp(r(), 0.14) * math.exp(-(t - 0.085) * 3.8) * 0.36) or 0 local ring = (math.sin(6.2832 * 820 * t) + 0.45 * math.sin(6.2832 * 1380 * t)) * math.exp(-t * 26) * 0.13 local mix = (thump + crack + body + echo + ring) * 1.5 return mix / (1 + math.abs(mix) * 0.65) end, 1.0 }, bolt_up = { 0.11, function(t, r) local click = math.sin(6.2832 * 2650 * t) * math.exp(-t * 75) * 0.55 + math.sin(6.2832 * 4100 * t) * math.exp(-t * 95) * 0.35 return click + r() * math.exp(-t * 55) * 0.35 end, 0.7 }, bolt_pull = { 0.18, function(t, r, lp) local scrape = lp(r(), 0.25) * math.sin(math.min(1, t / 0.18) * math.pi) * 0.45 local stop = (t > 0.11) and (math.sin(6.2832 * 1550 * (t - 0.11)) * math.exp(-(t - 0.11) * 70) * 0.65 + r() * math.exp(-(t - 0.11) * 80) * 0.4) or 0 return scrape + stop end, 0.72 }, bolt_push = { 0.20, function(t, r, lp) local slide = lp(r(), 0.22) * math.exp(-t * 16) * 0.32 local lock = (t > 0.08) and (math.sin(6.2832 * 240 * math.exp(-(t - 0.08) * 30) * (t - 0.08)) * math.exp(-(t - 0.08) * 32) * 0.75 + math.sin(6.2832 * 2900 * (t - 0.08)) * math.exp(-(t - 0.08) * 75) * 0.45) or 0 return slide + lock end, 0.78 }, shell_drop = { 0.22, function(t) local b1 = (math.sin(6.2832 * 4420 * t) + 0.6 * math.sin(6.2832 * 6740 * t)) * math.exp(-t * 48) * 0.42 local b2 = (t > 0.09) and ((math.sin(6.2832 * 4510 * (t - 0.09)) + 0.5 * math.sin(6.2832 * 6890 * (t - 0.09))) * math.exp(-(t - 0.09) * 58) * 0.26) or 0 return b1 + b2 end, 0.48 }, mag_out = { 0.16, function(t, r, lp) local latch = math.sin(6.2832 * 2200 * t) * math.exp(-t * 80) * 0.55 local slide = lp(r(), 0.18) * math.exp(-t * 15) * 0.45 return latch + slide end, 0.75 }, mag_in = { 0.21, function(t, r) local slap = math.sin(6.2832 * (170 * math.exp(-t * 25) + 60) * t) * math.exp(-t * 22) * 0.85 local click = (t > 0.06) and (math.sin(6.2832 * 2700 * (t - 0.06)) * math.exp(-(t - 0.06) * 75) * 0.55) or 0 return slap + click + r() * math.exp(-t * 36) * 0.30 end, 0.82 }, scope_in = { 0.055, function(t, r) return math.sin(6.2832 * 3300 * t) * math.exp(-t * 95) * 0.5 + r() * math.exp(-t * 110) * 0.22 end, 0.65 }, scope_out = { 0.055, function(t, r) return math.sin(6.2832 * 2100 * t) * math.exp(-t * 95) * 0.45 + r() * math.exp(-t * 110) * 0.2 end, 0.6 }, scope_zoom = { 0.04, function(t) return math.sin(6.2832 * 4200 * t) * math.exp(-t * 130) * 0.45 end, 0.5 }, equip = { 0.24, function(t, r, lp) local cloth = lp(r(), 0.16) * math.sin(math.min(1, t / 0.24) * math.pi) * 0.42 local clink = (t > 0.12) and (math.sin(6.2832 * 1950 * (t - 0.12)) * math.exp(-(t - 0.12) * 55) * 0.45) or 0 return cloth + clink end, 0.72 }, holster = { 0.20, function(t, r, lp) return lp(r(), 0.14) * math.exp(-t * 12) * 0.48 + math.sin(6.2832 * 1450 * t) * math.exp(-t * 60) * 0.25 end, 0.68 }, hit = { 0.08, function(t) return (math.sin(6.2832 * 1850 * t) + 0.5 * math.sin(6.2832 * 3200 * t)) * math.exp(-t * 58) * 0.65 end, 0.72 }, kill = { 0.16, function(t, r) return (math.sin(6.2832 * 1240 * t) + 0.7 * math.sin(6.2832 * 2480 * t)) * math.exp(-t * 24) * 0.75 + r() * math.exp(-t * 70) * 0.25 end, 0.85 }, dryfire = { 0.055, function(t, r) return math.sin(6.2832 * 2900 * t) * math.exp(-t * 90) * 0.65 + r() * math.exp(-t * 100) * 0.25 end, 0.65 }, step = { 0.10, function(t, r, lp) return math.sin(6.2832 * 95 * math.exp(-t * 35) * t) * math.exp(-t * 34) * 0.75 + lp(r(), 0.15) * math.exp(-t * 42) * 0.45 end, 0.55 }, land = { 0.16, function(t, r, lp) return math.sin(6.2832 * 78 * math.exp(-t * 22) * t) * math.exp(-t * 20) * 0.88 + lp(r(), 0.18) * math.exp(-t * 24) * 0.55 end, 0.7 }, } local allOk = true for name, sp in pairs(specs) do local path = dir .. "WuzSniper_v3_" .. name .. ".wav" local fileReady = (type(isfile) == "function" and isfile(path)) if not fileReady then fileReady = pcall(writefile, path, encodeWAV(sr, sp[1], sp[2])) end if fileReady then local okA, assetId = pcall(getAsset, path) if okA and type(assetId) == "string" and assetId ~= "" then SFX.synthAssets[name] = { id = assetId, vol = sp[3], spd = 1.0 } else allOk = false; break end else allOk = false; break end end if not allOk then SFX.synthAssets = {} end end if SFX.mode == "synth" and not next(SFX.synthAssets) then SFX.mode = "roblox" end end local function playSFX(name, volMul, pitchMul) if _G.WuzSniperMute or not SFX.folder then return end local bank = (SFX.mode == "synth" and SFX.synthAssets[name] and SFX.synthAssets) or (SFX.mode == "roblox" and SFX.robloxAssets) or SFX.classicAssets local info = bank[name] or SFX.classicAssets[name] if not info then return end local s = Instance.new("Sound") s.Name = "SFX_" .. name s.SoundId = info.id s.Volume = math.clamp((info.vol or 0.7) * (volMul or 1) * (tonumber(_G.WuzSniperVolume) or 0.85), 0, 3) s.PlaybackSpeed = math.clamp((info.spd or 1) * (pitchMul or 1), 0.3, 3.0) if info.tp then s.TimePosition = info.tp end s.Parent = SFX.folder s:Play() Debris:AddItem(s, 3.0) end local function muteDefaultFootsteps(hrp, mute) if not hrp then return end for _, n in ipairs({ "Running", "Jumping", "Landing", "FreeFalling" }) do local s = hrp:FindFirstChild(n) if s and s:IsA("Sound") then if mute then if CTRL.savedDefaultSounds[s] == nil then CTRL.savedDefaultSounds[s] = s.Volume end s.Volume = 0 elseif CTRL.savedDefaultSounds[s] ~= nil then s.Volume = CTRL.savedDefaultSounds[s] CTRL.savedDefaultSounds[s] = nil end end end end ------------------------------------------------------------------- -- CHARACTER HELPERS, PAINT, SCAN & CALIBRATION ------------------------------------------------------------------- local function getChar() return plr.Character end local function getCharParts(c) if not c then return nil end local hrp = c:FindFirstChild("HumanoidRootPart") local hum = c:FindFirstChildOfClass("Humanoid") local torso = c:FindFirstChild("Torso") or c:FindFirstChild("UpperTorso") local head = c:FindFirstChild("Head") local realParts = {} for _, inst in ipairs(c:GetDescendants()) do if inst:IsA("BasePart") and inst ~= hrp and inst.Name ~= "WuzSniper" and not inst:FindFirstAncestorOfClass("Tool") then realParts[#realParts + 1] = inst end end return { hrp = hrp, hum = hum, torso = torso, head = head, realParts = realParts } end local function getAvatarArmColors() local c = getChar() local bc = c and c:FindFirstChildOfClass("BodyColors") local aL = c and (c:FindFirstChild("Left Arm") or c:FindFirstChild("LeftLowerArm")) local aR = c and (c:FindFirstChild("Right Arm") or c:FindFirstChild("RightLowerArm")) return { skinL = (bc and bc.LeftArmColor3) or (aL and aL.Color) or Color3.fromRGB(232, 184, 146), skinR = (bc and bc.RightArmColor3) or (aR and aR.Color) or Color3.fromRGB(232, 184, 146), } end local function getF3XTool() if STATE.cachedTool and STATE.cachedTool:IsDescendantOf(game) then return STATE.cachedTool end local c = getChar() local bp = plr:FindFirstChild("Backpack") local t = (c and c:FindFirstChild("Building Tools")) or (bp and bp:FindFirstChild("Building Tools")) STATE.cachedTool = t STATE.cachedEndpoint = nil return t end local function suppressBToolsUI(hide) local pg = plr:FindFirstChild("PlayerGui") if not pg then return end if hide then for _, g in ipairs(pg:GetChildren()) do if g:IsA("ScreenGui") then local n = string.lower(g.Name) if string.find(n, "btools", 1, true) or string.find(n, "f3x", 1, true) or string.find(n, "building", 1, true) then if STATE.savedBToolsGuis[g] == nil then STATE.savedBToolsGuis[g] = g.Enabled end g.Enabled = false end end end else for g, was in pairs(STATE.savedBToolsGuis) do if g and g.Parent then g.Enabled = was end end STATE.savedBToolsGuis = {} end end local function getF3XEndpoint(allowEquip) local t = getF3XTool() if not t then return nil end local c = getChar() local hum = c and c:FindFirstChildOfClass("Humanoid") if allowEquip and STATE.mustEquipTool and c and hum and t.Parent ~= c then local now = os.clock() if now - STATE.lastEquipTry >= 0.35 then STATE.lastEquipTry = now pcall(function() hum:EquipTool(t) end) end end local handle = t:FindFirstChild("Handle") if handle and handle:IsA("BasePart") then handle.LocalTransparencyModifier = 1 end if STATE.cachedEndpoint and STATE.cachedEndpoint:IsDescendantOf(t) then return STATE.cachedEndpoint end local api = t:FindFirstChild("SyncAPI") local ep = api and api:FindFirstChild("ServerEndpoint") STATE.cachedEndpoint = ep return ep end local function resolveBlockColor(b, theme, armCols) if b.role == "sleeveL" or b.role == "sleeveR" then return (CFG.armStyle == "pure") and ((b.role == "sleeveL") and armCols.skinL or armCols.skinR) or theme.gearCloth elseif b.role == "skinL" then return (CFG.armStyle == "pure") and armCols.skinL or theme.gearCloth:Lerp(armCols.skinL, 0.35) elseif b.role == "skinR" then return (CFG.armStyle == "pure") and armCols.skinR or theme.gearCloth:Lerp(armCols.skinR, 0.35) elseif b.role == "glove" then return (CFG.armStyle == "pure") and armCols.skinL or theme.gearDark end return theme[b.role] or theme.armor end local function resolveBlockMaterial(b) if b.role == "glow" or b.role == "core" or b.role == "visor" then return Enum.Material.Neon elseif b.role == "optic" then return Enum.Material.Glass elseif b.role == "piston" or b.role == "trim" or b.role == "brass" then return Enum.Material.Metal elseif b.role == "gearCloth" or b.role == "sleeveL" or b.role == "sleeveR" then return Enum.Material.Fabric elseif b.role == "gearDark" or b.role == "glove" or b.role == "gearLeather" or b.role == "armor" then return Enum.Material.Plastic end return Enum.Material.SmoothPlastic end local function isFxBlockActive(b) if not b.fxType then return true end if b.fxType == "flash_core" or b.fxType == "flash_side_l" or b.fxType == "flash_side_r" then return CTRL.fxTimer > 0.002 elseif b.fxType == "shell" then return CTRL.shell.active else return (CTRL.activeF3XBullet ~= nil and CTRL.activeF3XBullet.alive) end end local function desiredFxTransparency(b) if not isFxBlockActive(b) then return 1 end if b.fxType == "bullet_trail" then return 0.45 end if b.fxType == "flash_side_l" or b.fxType == "flash_side_r" then return 0.15 end return 0 end local function paintAll(themeIdx) if themeIdx then CFG.themeIdx = ((themeIdx - 1) % #THEMES) + 1 end local theme = THEMES[CFG.themeIdx] local armCols = getAvatarArmColors() local ep = getF3XEndpoint(true) if not ep then return end local colorItems, matItems, colItems = {}, {}, {} for i = 1, TOTAL do local b = STATE.blocks[i] if b and b.part and b.part.Parent then local col = resolveBlockColor(b, theme, armCols) b.part.Color = col colorItems[#colorItems + 1] = { Part = b.part, Color = col } local mat = resolveBlockMaterial(b) local wantTrans = b.fxType and desiredFxTransparency(b) or (b.role == "optic" and 0.18 or 0) b.serverTrans = wantTrans b.part.Material = mat b.part.Transparency = wantTrans matItems[#matItems + 1] = { Part = b.part, Material = mat, Transparency = wantTrans } colItems[#colItems + 1] = { Part = b.part, CanCollide = false } end end if #colorItems > 0 then task.spawn(function() pcall(function() ep:InvokeServer("SyncColor", colorItems) end) end) end if #matItems > 0 then task.spawn(function() pcall(function() ep:InvokeServer("SyncMaterial", matItems) end) end) end if #colItems > 0 then task.spawn(function() pcall(function() ep:InvokeServer("SyncCollision", colItems) end) end) end end local function refreshRayParams() local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Exclude params.RespectCanCollide = false params.IgnoreWater = true local ignore = {} local c = getChar() if c then ignore[#ignore + 1] = c end for i = 1, TOTAL do local b = STATE.blocks[i] if b and b.part then ignore[#ignore + 1] = b.part end end params.FilterDescendantsInstances = ignore CTRL.rayParams = params CTRL.rayDirty = false end local function makeBlockRecord(idx, p, bp) return { id = idx, part = p, bone = bp.bone, name = bp.name, shape = bp.shape, role = bp.role, prio = bp.prio, isArm = bp.isArm, isBody = bp.isBody, isHead = bp.isHead, fxType = bp.fxType, localCF = bp.cf, localSize = bp.sz, serverCF = p.CFrame, serverSize = p.Size, serverTrans = p.Transparency, targetCF = p.CFrame, targetSize = bp.sz, inTransit = false, matInTransit = false, failCount = 0, retryAt = 0, lastSentAt = 0, } end local function createPartWithShape(ep, shape, cf) local targetShape = STATE.unsupportedShapes[shape] and "Normal" or shape local ok, p = pcall(function() return ep:InvokeServer("CreatePart", targetShape, cf, workspace) end) if ok and typeof(p) == "Instance" and p:IsA("BasePart") then return p, targetShape end if targetShape ~= "Normal" then STATE.unsupportedShapes[shape] = true local ok2, p2 = pcall(function() return ep:InvokeServer("CreatePart", "Normal", cf, workspace) end) if ok2 and typeof(p2) == "Instance" and p2:IsA("BasePart") then return p2, "Normal" end end return nil, nil end local function calibrateAll(ep) local anchorItems, sizeItems = {}, {} for i = 1, TOTAL do local b = STATE.blocks[i] if b and b.part and b.part.Parent then if not b.part.Anchored then anchorItems[#anchorItems + 1] = { Part = b.part, Anchored = true } end if (b.part.Size - b.localSize).Magnitude > 0.03 then sizeItems[#sizeItems + 1] = { block = b, item = { Part = b.part, Size = b.localSize, CFrame = b.part.CFrame } } end end end if #anchorItems > 0 then pcall(function() ep:InvokeServer("SyncAnchor", anchorItems) end) end for start = 1, #sizeItems, CFG.batchSize do local lot, entries = {}, {} for k = start, math.min(start + CFG.batchSize - 1, #sizeItems) do lot[#lot + 1] = sizeItems[k].item entries[#entries + 1] = sizeItems[k] end local ok, res = pcall(function() return ep:InvokeServer("SyncResize", lot) end) if ok and res ~= false then for _, e in ipairs(entries) do e.block.serverSize = e.item.Size; e.block.part.Size = e.item.Size end end end end local function buildOrScan() local c = getChar() local hrp = c and (c:FindFirstChild("HumanoidRootPart") or c:WaitForChild("HumanoidRootPart", 5)) local tool = getF3XTool() assert(c and hrp, "Character not found.") assert(tool, "'Building Tools' (F3X) not found in Backpack or Character!") local ep = getF3XEndpoint(false) assert(ep, "SyncAPI.ServerEndpoint not found inside Building Tools!") local byIdx, freeByShape = {}, {} for _, p in ipairs(workspace:GetChildren()) do if p.Name == "WuzSniper" and p:IsA("BasePart") then local idx = p:GetAttribute("WuzSniperIdx") local sh = p:GetAttribute("WuzSniperShape") or "Normal" if typeof(idx) == "number" and BLUEPRINT[idx] and BLUEPRINT[idx].shape == sh and not byIdx[idx] then byIdx[idx] = p else freeByShape[sh] = freeByShape[sh] or {} table.insert(freeByShape[sh], p) end end end if not STATE.checkedBackpack then STATE.checkedBackpack = true if tool.Parent ~= c then local probeOk = false local existing = next(byIdx) and byIdx[next(byIdx)] if not existing then for _, list in pairs(freeByShape) do if list[1] then existing = list[1]; break end end end if existing then local ok, res = pcall(function() return ep:InvokeServer("SyncColor", { { Part = existing, Color = existing.Color } }) end) if ok and res ~= false then probeOk = true end else local ok, p = pcall(function() return ep:InvokeServer("CreatePart", "Normal", hrp.CFrame * C(0, 4, -8), workspace) end) if ok and typeof(p) == "Instance" and p:IsA("BasePart") then probeOk = true; p.Name = "WuzSniper"; p:SetAttribute("WuzSniperShape", "Normal") freeByShape["Normal"] = freeByShape["Normal"] or {} table.insert(freeByShape["Normal"], p) end end if not probeOk then STATE.mustEquipTool = true local hum = c:FindFirstChildOfClass("Humanoid") if hum then pcall(function() hum:EquipTool(tool) end) local t0 = os.clock() while tool.Parent ~= c and os.clock() - t0 < 1.8 do task.wait() end end end end ep = getF3XEndpoint(true) end STATE.blocks = {} local missing = {} for i = 1, TOTAL do local bp = BLUEPRINT[i] local pool = freeByShape[bp.shape] local p = byIdx[i] or (pool and table.remove(pool)) if p then p:SetAttribute("WuzSniperIdx", i); p:SetAttribute("WuzSniperShape", bp.shape) STATE.blocks[i] = makeBlockRecord(i, p, bp) else missing[#missing + 1] = i end end if #missing > 0 then local spawnBase = hrp.CFrame * C(0, 3, -8) for _ = 1, 5 do if #missing == 0 or _G.WuzSniperStop then break end local nextMissing = {} for start = 1, #missing, 5 do local n = math.min(5, #missing - start + 1) local done = 0 for k = 0, n - 1 do local idx = missing[start + k] local bp = BLUEPRINT[idx] task.spawn(function() local cf = spawnBase * C((idx % 8) * 1.2, math.floor((idx % 32) / 8) * 1.2, 0) local p, actualShape = createPartWithShape(ep, bp.shape, cf) if p then p.Name = "WuzSniper"; p:SetAttribute("WuzSniperIdx", idx); p:SetAttribute("WuzSniperShape", actualShape) STATE.blocks[idx] = makeBlockRecord(idx, p, bp) else nextMissing[#nextMissing + 1] = idx end done += 1 end) end while done < n do task.wait() end task.wait(0.04) end missing = nextMissing end end local unusedParts = {} for _, list in pairs(freeByShape) do for _, p in ipairs(list) do unusedParts[#unusedParts + 1] = p end end if #unusedParts > 0 then task.spawn(function() pcall(function() ep:InvokeServer("Remove", unusedParts) end) end) end local count = 0 for i = 1, TOTAL do if STATE.blocks[i] then count += 1 end end calibrateAll(ep) paintAll(CFG.themeIdx) CTRL.rayDirty = true return count end ------------------------------------------------------------------- -- CUSTOM MOVEMENT ENGINE (CS:GO ACCEL, COUNTER-STRAFE, CROUCH, LEAN, AIR-STRAFE) ------------------------------------------------------------------- local function saveAndSetupMovement(parts) if not parts or not parts.hum then return end if CTRL.moveRestored then CTRL.savedWalkSpeed = parts.hum.WalkSpeed CTRL.savedAutoRotate = parts.hum.AutoRotate CTRL.savedCameraOffset = parts.hum.CameraOffset CTRL.moveRestored = false end parts.hum.AutoRotate = false end local function restoreMovement() if CTRL.moveRestored then return end CTRL.moveRestored = true local c = getChar() local hum = c and c:FindFirstChildOfClass("Humanoid") local hrp = c and c:FindFirstChild("HumanoidRootPart") if hum then if CTRL.savedWalkSpeed ~= nil then hum.WalkSpeed = CTRL.savedWalkSpeed end if CTRL.savedAutoRotate ~= nil then hum.AutoRotate = CTRL.savedAutoRotate end if CTRL.savedCameraOffset ~= nil then hum.CameraOffset = CTRL.savedCameraOffset end end muteDefaultFootsteps(hrp, false) end local function getMoveWishDir(cam) if UIS:GetFocusedTextBox() or GuiService.MenuIsOpen then return V() end local f = (UIS:IsKeyDown(Enum.KeyCode.W) and 1 or 0) - (UIS:IsKeyDown(Enum.KeyCode.S) and 1 or 0) local r = (UIS:IsKeyDown(Enum.KeyCode.D) and 1 or 0) - (UIS:IsKeyDown(Enum.KeyCode.A) and 1 or 0) if f == 0 and r == 0 then return V() end local flatLook = V(cam.CFrame.LookVector.X, 0, cam.CFrame.LookVector.Z) flatLook = (flatLook.Magnitude < 1e-4) and V(0, 0, -1) or flatLook.Unit local flatRight = V(-flatLook.Z, 0, flatLook.X) local dir = flatLook * f + flatRight * r return (dir.Magnitude > 1e-4) and dir.Unit or V() end local function stepCustomMovement(dt, cam, parts) local hum, hrp = parts.hum, parts.hrp saveAndSetupMovement(parts) muteDefaultFootsteps(hrp, _G.WuzSniperCustomMove) local typing = (UIS:GetFocusedTextBox() ~= nil or GuiService.MenuIsOpen) local wantCrouch = not typing and (CTRL.crouchHold or CTRL.crouchToggle) CTRL.crouching = wantCrouch CTRL.walking = not typing and UIS:IsKeyDown(Enum.KeyCode.LeftShift) and not wantCrouch local leanTarget = (not typing) and ((UIS:IsKeyDown(Enum.KeyCode.X) and 1 or 0) - (UIS:IsKeyDown(Enum.KeyCode.Z) and 1 or 0)) or 0 CTRL.crouchAlpha += ((wantCrouch and 1 or 0) - CTRL.crouchAlpha) * (1 - math.exp(-15 * dt)) CTRL.leanAlpha += (leanTarget - CTRL.leanAlpha) * (1 - math.exp(-13 * dt)) CTRL.landDip = math.max(0, CTRL.landDip - dt * 3.6) if CTRL.jumpBuffer > 0 then CTRL.jumpBuffer = math.max(0, CTRL.jumpBuffer - dt) end local hState = hum:GetState() local isAir = (hState == Enum.HumanoidStateType.Freefall or hState == Enum.HumanoidStateType.Jumping) CTRL.inAir = isAir if CTRL.wasInAir and not isAir then local impact = math.clamp(math.abs(hrp.AssemblyLinearVelocity.Y) / 48, 0.25, 1.0) CTRL.landDip = impact playSFX("land", 0.35 + impact * 0.65, 0.94 + math.random() * 0.12) end CTRL.wasInAir = isAir CTRL.inAirAlpha += ((isAir and 1 or 0) - CTRL.inAirAlpha) * (1 - math.exp(-14 * dt)) if not _G.WuzSniperCustomMove then local v = hrp.AssemblyLinearVelocity CTRL.moveVelXZ = V(v.X, 0, v.Z) hum.AutoRotate = true return end local maxSpd = CFG.runSpeed if wantCrouch then maxSpd = CFG.crouchSpeed elseif CTRL.walking then maxSpd = CFG.walkSpeed end if CTRL.equipped and CTRL.aimAlpha > 0.5 then maxSpd = math.min(maxSpd, CFG.scopeSpeed) end local wishDir = getMoveWishDir(cam) local actualVelXZ = V(hrp.AssemblyLinearVelocity.X, 0, hrp.AssemblyLinearVelocity.Z) if not isAir then local spd = CTRL.moveVelXZ.Magnitude if spd > 0.01 then local drop = math.max(spd, CFG.stopSpeed) * CFG.groundFriction * dt CTRL.moveVelXZ *= math.max(0, spd - drop) / spd end if wishDir.Magnitude > 0.01 then local curSpd = CTRL.moveVelXZ:Dot(wishDir) local addSpd = maxSpd - curSpd if addSpd > 0 then local boost = (curSpd < -0.5) and 1.55 or 1.0 CTRL.moveVelXZ += wishDir * math.min(CFG.groundAccel * boost * maxSpd * dt, addSpd) end end if CTRL.moveVelXZ.Magnitude > 3.0 and actualVelXZ.Magnitude < CTRL.moveVelXZ.Magnitude * 0.35 then CTRL.wallStuckTimer += dt if CTRL.wallStuckTimer > 0.12 then CTRL.moveVelXZ = CTRL.moveVelXZ:Lerp(actualVelXZ, 0.5) end else CTRL.wallStuckTimer = 0 end local spdOut = CTRL.moveVelXZ.Magnitude if spdOut > 0.08 then hum.WalkSpeed = spdOut hum:Move(CTRL.moveVelXZ / spdOut, false) else hum.WalkSpeed = 0 hum:Move(V(), false) end if CTRL.jumpBuffer > 0 then CTRL.jumpBuffer = 0 hum.Jump = true playSFX("equip", 0.30, 1.35) end else if wishDir.Magnitude > 0.01 then local curSpd = CTRL.moveVelXZ:Dot(wishDir) local addSpd = math.min(maxSpd, CFG.airWishCap) - curSpd if addSpd > 0 then CTRL.moveVelXZ += wishDir * math.min(CFG.airAccel * maxSpd * dt, addSpd) end end hrp.AssemblyLinearVelocity = V(CTRL.moveVelXZ.X, hrp.AssemblyLinearVelocity.Y, CTRL.moveVelXZ.Z) end local flatLook = V(cam.CFrame.LookVector.X, 0, cam.CFrame.LookVector.Z) flatLook = (flatLook.Magnitude > 1e-4) and flatLook.Unit or V(0, 0, -1) local camYaw = math.atan2(-flatLook.X, -flatLook.Z) local targetHrpYaw = (CTRL.equipped or CTRL.transition == "equip" or CTRL.moveVelXZ.Magnitude <= 1.2) and camYaw or math.atan2(-CTRL.moveVelXZ.X, -CTRL.moveVelXZ.Z) local hrpLook = V(hrp.CFrame.LookVector.X, 0, hrp.CFrame.LookVector.Z) local curHrpYaw = (hrpLook.Magnitude > 1e-4) and math.atan2(-hrpLook.X, -hrpLook.Z) or targetHrpYaw local diffYaw = math.atan2(math.sin(targetHrpYaw - curHrpYaw), math.cos(targetHrpYaw - curHrpYaw)) local rotAlpha = CTRL.equipped and (1 - math.exp(-22 * dt)) or (1 - math.exp(-10 * dt)) hrp.CFrame = C(hrp.Position) * CFrame.Angles(0, curHrpYaw + diffYaw * rotAlpha, 0) hum.CameraOffset = V(CTRL.leanAlpha * 0.78, -1.24 * CTRL.crouchAlpha - CTRL.landDip * 0.36, 0) end ------------------------------------------------------------------- -- UNIFIED 2-BONE IK + REALISTIC CS:GO OPERATOR RIG + SHELL PHYSICS ------------------------------------------------------------------- local function solveTwoBoneIK(rootPos, targetPos, bendHintDir, L1, L2, anchorAtTarget) local delta = targetPos - rootPos local rawDist = delta.Magnitude local fwdDir = (rawDist > 1e-4) and (delta / rawDist) or V(0, -1, 0) local bendDir = bendHintDir - fwdDir * bendHintDir:Dot(fwdDir) if bendDir.Magnitude < 1e-4 then bendDir = fwdDir:Cross((math.abs(fwdDir.Y) < 0.9) and Vector3.yAxis or Vector3.xAxis) end bendDir = bendDir.Unit local d = math.clamp(rawDist, math.abs(L1 - L2) + 0.05, (L1 + L2) * 0.996) local cosA = math.clamp((L1 * L1 + d * d - L2 * L2) / (2 * L1 * d), -1, 1) local jointPos = rootPos + fwdDir * (L1 * cosA) + bendDir * (L1 * math.sqrt(math.max(0, 1 - cosA * cosA))) local upperDir = jointPos - rootPos upperDir = (upperDir.Magnitude > 1e-4) and upperDir.Unit or fwdDir local sideVec = upperDir:Cross(bendDir) sideVec = (sideVec.Magnitude > 1e-4) and sideVec.Unit or Vector3.xAxis local upperCF = CFrame.lookAt(rootPos, rootPos + upperDir, sideVec:Cross(upperDir).Unit) local foreVec = targetPos - jointPos local foreDir = (foreVec.Magnitude > 1e-4) and foreVec.Unit or fwdDir local lowerOrigin = anchorAtTarget and (targetPos - foreDir * L2) or jointPos local lowerCF = CFrame.lookAt(lowerOrigin, lowerOrigin + foreDir, sideVec:Cross(foreDir).Unit) return upperCF, lowerCF, lowerOrigin + foreDir * L2 end local function computeHolsterCF(torsoCF) return torsoCF * C(0.06, 0.72, 0.54) * CFrame.Angles(0, 0, math.rad(46)) * CFrame.Angles(0, math.rad(-90), 0) end local function ejectShell(rifleCF) local sh = CTRL.shell sh.active = true sh.age = 0 sh.bounced = false sh.dropSoundPlayed = false sh.pos = rifleCF:PointToWorldSpace(V(0.14, 0.14, -0.06)) sh.vel = rifleCF:VectorToWorldSpace(V(7.4 + math.random() * 2.4, 5.4 + math.random() * 1.4, 2.1 + math.random() * 1.4)) + CTRL.moveVelXZ * 0.45 sh.rot = V(math.random() * 3.14, math.random() * 3.14, math.random() * 3.14) sh.angVel = V(16 + math.random() * 12, (math.random() - 0.5) * 28, 12 + math.random() * 12) end local function stepShell(dt) local sh = CTRL.shell if not sh.active then return end sh.age += dt if sh.age >= sh.maxAge then sh.active = false; return end sh.vel += V(0, -34 * dt, 0) local stepV = sh.vel * dt if not sh.bounced and sh.age > 0.10 and stepV.Magnitude > 1e-4 then if CTRL.rayDirty or not CTRL.rayParams then refreshRayParams() end local hit = workspace:Raycast(sh.pos, stepV + V(0, -0.06, 0), CTRL.rayParams) if hit then sh.pos = hit.Position + hit.Normal * 0.04 local vDot = sh.vel:Dot(hit.Normal) if vDot < 0 then sh.vel -= hit.Normal * (1.35 * vDot) end sh.vel *= 0.52 sh.angVel *= 0.38 sh.bounced = true if not sh.dropSoundPlayed then sh.dropSoundPlayed = true playSFX("shell_drop", 0.75, 0.94 + math.random() * 0.12) end else sh.pos += stepV end else sh.pos += stepV end if not sh.dropSoundPlayed and sh.age >= 0.46 then sh.dropSoundPlayed = true playSFX("shell_drop", 0.45, 0.92 + math.random() * 0.14) end sh.rot += sh.angVel * dt end local function evaluateRig(dt, cam, parts) local t, hrp, hum, camCF = CTRL.timeAcc, parts.hrp, parts.hum, cam.CFrame local floorOffset = (hum.RigType == Enum.HumanoidRigType.R15) and (hrp.Size.Y * 0.5 + hum.HipHeight) or (hrp.Size.Y * 0.5 + 2.0) local groundPos = hrp.Position - V(0, floorOffset, 0) local flatCamLook = V(camCF.LookVector.X, 0, camCF.LookVector.Z) flatCamLook = (flatCamLook.Magnitude > 1e-4) and flatCamLook.Unit or V(0, 0, -1) local camYaw = math.atan2(-flatCamLook.X, -flatCamLook.Z) local camPitch = math.asin(math.clamp(camCF.LookVector.Y, -0.98, 0.98)) local speed = CTRL.moveVelXZ.Magnitude CTRL.gaitAmp += (math.clamp(speed / CFG.runSpeed, 0, 1.3) - CTRL.gaitAmp) * (1 - math.exp(-12 * dt)) if CTRL.gaitAmp > 0.02 and not CTRL.inAir then CTRL.gaitPhase += dt * (6.2 + CTRL.gaitAmp * 5.2) local stepIdx = math.floor(CTRL.gaitPhase / math.pi) if stepIdx ~= CTRL.lastStepIdx then CTRL.lastStepIdx = stepIdx if speed > 2.2 then local stepVol = CTRL.walking and 0.14 or (CTRL.crouching and 0.22 or 0.65) playSFX("step", stepVol, 0.92 + math.random() * 0.16) end end end local armed = (CTRL.equipped or CTRL.transition == "equip") local desiredUpperYaw = (not CTRL.equipped and CTRL.transition == nil and speed > 1.2) and math.atan2(-CTRL.moveVelXZ.X, -CTRL.moveVelXZ.Z) or camYaw if CTRL.lowerYaw == nil then CTRL.lowerYaw = desiredUpperYaw end local yawDelta = math.atan2(math.sin(desiredUpperYaw - CTRL.lowerYaw), math.cos(desiredUpperYaw - CTRL.lowerYaw)) if speed > 0.8 or math.abs(yawDelta) > math.rad(32) then CTRL.lowerYaw += yawDelta * (1 - math.exp(-11.5 * dt)) if speed <= 0.8 then CTRL.turnStepAlpha = math.min(1, CTRL.turnStepAlpha + dt * 5.5) end else CTRL.turnStepAlpha = math.max(0, CTRL.turnStepAlpha - dt * 5.0) end local bladeYaw = armed and math.rad(22) or 0 local lowerRelTwist = math.atan2(math.sin(desiredUpperYaw - CTRL.lowerYaw), math.cos(desiredUpperYaw - CTRL.lowerYaw)) + bladeYaw local pelvisHeight = 2.68 - 1.24 * CTRL.crouchAlpha - (1 - CTRL.inAirAlpha) * math.abs(math.sin(CTRL.gaitPhase)) * 0.11 * CTRL.gaitAmp - CTRL.landDip * 0.30 local hipRoll = (1 - CTRL.inAirAlpha) * math.sin(CTRL.gaitPhase) * 0.048 * CTRL.gaitAmp local pelvisCF = C(groundPos.X, groundPos.Y + pelvisHeight, groundPos.Z) * CFrame.Angles(0, CTRL.lowerYaw, 0) * C(CTRL.leanAlpha * 0.26, 0, 0) * CFrame.Angles(0, 0, hipRoll) local localVel = CFrame.Angles(0, -desiredUpperYaw, 0):VectorToObjectSpace(CTRL.moveVelXZ) local fwdFrac = math.clamp(-localVel.Z / CFG.runSpeed, -1, 1) local strafeFrac = math.clamp(localVel.X / CFG.runSpeed, -1, 1) local torsoHunch = -math.rad(16 * CTRL.crouchAlpha + 7.5 * math.max(0, fwdFrac) * (1 - CTRL.inAirAlpha)) local torsoAimPitch = armed and math.clamp(camPitch * 0.42, math.rad(-22), math.rad(22)) or 0 local torsoLean = -CTRL.leanAlpha * math.rad(17) - strafeFrac * math.rad(3.8) local breathBody = math.sin(t * 1.45) * math.rad(1.1) local torsoCF = pelvisCF * C(0, 0.20, 0) * CFrame.Angles(0, lowerRelTwist, 0) * CFrame.Angles(torsoHunch + torsoAimPitch + breathBody, 0, torsoLean) local headPitch = armed and (camPitch - torsoAimPitch) or math.clamp(camPitch * 0.55, math.rad(-28), math.rad(28)) local headRelYaw = (not armed and speed > 1.2) and math.clamp(math.atan2(math.sin(camYaw - desiredUpperYaw), math.cos(camYaw - desiredUpperYaw)), math.rad(-50), math.rad(50)) or -bladeYaw local cheekWeldRoll = armed and math.rad(-9 * CTRL.aimAlpha) or 0 local headCF = torsoCF * C(0, 1.16, 0.02) * CFrame.Angles(0, headRelYaw, 0) * CFrame.Angles(headPitch, 0, -torsoLean * 0.35 + cheekWeldRoll) -- 2-Bone Legs & Boots IK (Staggered CS:GO Firing Stance) local hipL, hipR = pelvisCF:PointToWorldSpace(V(-0.42, -0.08, 0)), pelvisCF:PointToWorldSpace(V(0.42, -0.08, 0)) local lowerBasis = C(groundPos) * CFrame.Angles(0, CTRL.lowerYaw + bladeYaw * 0.55, 0) local moveDirUnit = (speed > 0.5) and (CTRL.moveVelXZ / speed) or lowerBasis.LookVector local bladeAmt = armed and 1 or 0.22 local strideDist = math.clamp(speed / CFG.runSpeed, 0, 1.25) * (1.14 - 0.28 * CTRL.crouchAlpha) local footLift = math.clamp(speed / CFG.runSpeed, 0, 1.1) * (0.50 - 0.15 * CTRL.crouchAlpha) local pL, pR = CTRL.gaitPhase, CTRL.gaitPhase + math.pi local walkOffL = moveDirUnit * (math.sin(pL) * strideDist) + Vector3.yAxis * (math.max(0, math.cos(pL)) * footLift + math.sin(CTRL.turnStepAlpha * math.pi) * 0.20) local walkOffR = moveDirUnit * (math.sin(pR) * strideDist) + Vector3.yAxis * (math.max(0, math.cos(pR)) * footLift) local crouchFootOut = 0.08 * CTRL.crouchAlpha local ankleL = (lowerBasis:PointToWorldSpace(V(-0.46 - crouchFootOut, 0.29, -0.24 * bladeAmt)) + walkOffL):Lerp(lowerBasis:PointToWorldSpace(V(-0.46, 1.22, -0.40)), CTRL.inAirAlpha) local ankleR = (lowerBasis:PointToWorldSpace(V(0.50 + crouchFootOut, 0.29, 0.28 * bladeAmt)) + walkOffR):Lerp(lowerBasis:PointToWorldSpace(V(0.50, 0.80, 0.30)), CTRL.inAirAlpha) local kneeL = (lowerBasis.LookVector * (1 + 0.55 * CTRL.crouchAlpha) - lowerBasis.RightVector * (0.20 + 0.14 * CTRL.crouchAlpha)).Unit local kneeR = (lowerBasis.LookVector * (1 + 0.55 * CTRL.crouchAlpha) + lowerBasis.RightVector * (0.24 + 0.14 * CTRL.crouchAlpha)).Unit local thighL_CF, shinL_CF, footAnchorL = solveTwoBoneIK(hipL, ankleL, kneeL, LEG_THIGH_LEN, LEG_SHIN_LEN, false) local thighR_CF, shinR_CF, footAnchorR = solveTwoBoneIK(hipR, ankleR, kneeR, LEG_THIGH_LEN, LEG_SHIN_LEN, false) local footL_CF = C(footAnchorL) * CFrame.Angles(0, CTRL.lowerYaw + bladeYaw * 0.4 + math.rad(6), 0) * CFrame.Angles(-math.sin(pL) * math.rad(18) * CTRL.gaitAmp * (1 - CTRL.inAirAlpha) - math.rad(24) * CTRL.inAirAlpha, 0, 0) local footR_CF = C(footAnchorR) * CFrame.Angles(0, CTRL.lowerYaw + bladeYaw * 0.4 - math.rad(14 * bladeAmt + 6), 0) * CFrame.Angles(-math.sin(pR) * math.rad(18) * CTRL.gaitAmp * (1 - CTRL.inAirAlpha) - math.rad(14) * CTRL.inAirAlpha, 0, 0) -- First-Person Viewmodel + Weight, Sprint Tilt, Bolt-Cycle, Reload & Inspect local holsterCF = computeHolsterCF(torsoCF) local aimFrameCF = camCF if CTRL.equipped then CTRL.lastLocalAimCF = torsoCF:ToObjectSpace(camCF) elseif CTRL.transition == "holster" then aimFrameCF = torsoCF * (CTRL.lastLocalAimCF or C(0, 1.5, 0)) elseif CTRL.transition == "equip" then aimFrameCF = C(headCF:PointToWorldSpace(V(0, 0.46, 0))) * camCF.Rotation end local curLook = aimFrameCF.LookVector if CTRL.prevCamLook and dt > 0 then local ld = aimFrameCF:VectorToObjectSpace(CTRL.prevCamLook) local damp = 1 - math.exp(-13 * dt) CTRL.swayYaw += (math.clamp(ld.X * 1.65, -0.12, 0.12) - CTRL.swayYaw) * damp CTRL.swayPitch += (math.clamp(-ld.Y * 1.65, -0.12, 0.12) - CTRL.swayPitch) * damp end CTRL.prevCamLook = curLook if dt > 0 then local rd = 1 - math.exp(-11.5 * dt) CTRL.recoilPos = CTRL.recoilPos:Lerp(V(), rd) CTRL.recoilRot = CTRL.recoilRot:Lerp(V(), rd) CTRL.triggerPull = math.max(0, CTRL.triggerPull - dt * 4.5) CTRL.equipSettle = math.max(0, (CTRL.equipSettle or 0) - dt * 3.8) end local canSprintPose = CTRL.equipped and CTRL.transition == nil and not CTRL.aimHold and not CTRL.aimToggle and not CTRL.reloading and CTRL.boltTimer <= 0 and CTRL.postShotHold <= 0 and not CTRL.inspecting and not CTRL.walking and not CTRL.crouching and speed > 13.5 and not CTRL.inAir CTRL.sprintAlpha = (CTRL.sprintAlpha or 0) + ((canSprintPose and 1 or 0) - (CTRL.sprintAlpha or 0)) * (1 - math.exp(-9 * dt)) local spA = CTRL.sprintAlpha local a = CTRL.aimAlpha local hipBase = C(0.36, -0.53, -1.04) * CFrame.Angles(0, math.rad(5), 0) local adsBase = C(0.00, -0.45, -1.03) local sprintPose = degCF(-0.18, -0.20, 0.04, -14, 34, 18) local steadyMul = (1 - 0.72 * a) * (1 - 0.35 * CTRL.crouchAlpha) * (CTRL.walking and 0.65 or 1.0) local breathX = (math.sin(t * 1.45) + 0.35 * math.sin(t * 2.9)) * 0.006 * steadyMul local breathY = (math.cos(t * 1.45) * 0.0075 - math.sin(t * 2.9) * 0.002) * steadyMul local bobScale = (1 - 0.78 * a) * CTRL.gaitAmp * (1 - CTRL.inAirAlpha) * (1 + 0.55 * spA) local settleDip = math.sin((CTRL.equipSettle or 0) * math.pi) local baseOffset = hipBase:Lerp(adsBase, a) * CFrame.identity:Lerp(sprintPose, spA) * C(breathX + math.cos(CTRL.gaitPhase * 0.5) * 0.028 * bobScale, breathY + math.abs(math.sin(CTRL.gaitPhase)) * -0.028 * bobScale - CTRL.landDip * 0.09 * (1 - a) - settleDip * 0.04, settleDip * 0.04) * C(CTRL.recoilPos) * CFrame.Angles(CTRL.recoilRot.X + CTRL.swayPitch * (1 - 0.65 * a) + settleDip * math.rad(-3.5), CTRL.recoilRot.Y + CTRL.swayYaw * (1 - 0.65 * a), CTRL.recoilRot.Z + CTRL.swayYaw * 0.55 * (1 - 0.65 * a) + math.rad(-strafeFrac * 3.8 - CTRL.leanAlpha * 11) * (1 - 0.8 * a)) local boltPullBack, boltLiftDeg, magOffset = 0, 0, CFrame.identity local rightHandOnBolt, leftHandOnMag, rightHandBack = 0, 0, 0 if CTRL.boltTimer > 0 then local p = 1 - (CTRL.boltTimer / CFG.boltTime) if p >= 0.14 and CTRL.boltStage < 1 then CTRL.boltStage = 1; playSFX("bolt_up") end if p >= 0.34 and CTRL.boltStage < 2 then CTRL.boltStage = 2; playSFX("bolt_pull") end if p >= 0.58 and CTRL.boltStage < 3 then CTRL.boltStage = 3; playSFX("bolt_push") end if p < 0.14 then rightHandOnBolt = p / 0.14 baseOffset *= degCF(0.02*rightHandOnBolt, 0.02*rightHandOnBolt, 0, 5*rightHandOnBolt, -7*rightHandOnBolt, -14*rightHandOnBolt) elseif p < 0.34 then local u = (p - 0.14) / 0.20; rightHandOnBolt = 1; boltLiftDeg = 60 * u baseOffset *= degCF(0.03, 0.02, 0.05 * u, 6, -9, -16) elseif p < 0.58 then local u = (p - 0.34) / 0.24; rightHandOnBolt = 1; boltLiftDeg = 60; boltPullBack = 0.48 * math.sin(u * math.pi * 0.5) baseOffset *= degCF(0.03, 0.02, 0.06, 6, -9, -16) elseif p < 0.80 then local u = (p - 0.58) / 0.22; rightHandOnBolt = 1; boltLiftDeg = 60; boltPullBack = 0.48 * (1 - u) baseOffset *= degCF(0.03, 0.02, 0.05 * (1 - u), 6, -9, -16) else local u = (p - 0.80) / 0.20; rightHandOnBolt = 1 - u; boltLiftDeg = 60 * (1 - u) baseOffset *= degCF(0.03*(1-u), 0.02*(1-u), 0, 6*(1-u), -9*(1-u), -16*(1-u)) end elseif CTRL.reloading then local totalR = CTRL.reloadFromEmpty and CFG.reloadTime or (CFG.reloadTime * 0.74) local p = math.clamp(1 - (CTRL.reloadTimer / totalR), 0, 1) if CTRL.reloadFromEmpty then if p >= 0.16 and CTRL.reloadStage < 1 then CTRL.reloadStage = 1; playSFX("mag_out") end if p >= 0.54 and CTRL.reloadStage < 2 then CTRL.reloadStage = 2; playSFX("mag_in") end if p >= 0.67 and CTRL.reloadStage < 3 then CTRL.reloadStage = 3; playSFX("bolt_pull", 0.88) end if p >= 0.82 and CTRL.reloadStage < 4 then CTRL.reloadStage = 4; playSFX("bolt_push", 0.92) end if p < 0.16 then local u = p / 0.16; leftHandOnMag = u baseOffset *= degCF(-0.10*u, 0.06*u, 0.05*u, 14*u, 18*u, -30*u) elseif p < 0.44 then local u = (p - 0.16) / 0.28; leftHandOnMag = 1 magOffset = degCF(-0.24*u, -0.92*u, 0.12*u, 18*u, 0, 14*u) baseOffset *= degCF(-0.10, 0.06, 0.05, 14, 18, -30) elseif p < 0.66 then local u = (p - 0.44) / 0.22; local inv = 1 - u; leftHandOnMag = 1 magOffset = degCF(-0.24*inv, -0.92*inv, 0.12*inv, 18*inv, 0, 14*inv) local slap = (u > 0.82) and math.sin(((u - 0.82) / 0.18) * math.pi) * 0.05 or 0 baseOffset *= degCF(-0.10, 0.06 + slap, 0.05, 14 + slap * 45, 18, -30) elseif p < 0.90 then local u = (p - 0.66) / 0.24; leftHandOnMag = 1 - math.min(1, u * 2.4) rightHandOnBolt = math.sin(u * math.pi) boltLiftDeg = 58 * rightHandOnBolt; boltPullBack = 0.46 * rightHandOnBolt baseOffset *= degCF(-0.05*(1-u), 0.04*(1-u), 0.05*rightHandOnBolt, 10*(1-u), 10*(1-u), -18*(1-u)) else local u = (p - 0.90) / 0.10 baseOffset *= degCF(0, 0, 0, 0, 0, -5 * (1 - u)) end else if p >= 0.18 and CTRL.reloadStage < 1 then CTRL.reloadStage = 1; playSFX("mag_out") end if p >= 0.68 and CTRL.reloadStage < 2 then CTRL.reloadStage = 2; playSFX("mag_in") end if p < 0.18 then local u = p / 0.18; leftHandOnMag = u baseOffset *= degCF(-0.10*u, 0.06*u, 0.05*u, 14*u, 18*u, -30*u) elseif p < 0.52 then local u = (p - 0.18) / 0.34; leftHandOnMag = 1 magOffset = degCF(-0.24*u, -0.92*u, 0.12*u, 18*u, 0, 14*u) baseOffset *= degCF(-0.10, 0.06, 0.05, 14, 18, -30) elseif p < 0.82 then local u = (p - 0.52) / 0.30; local inv = 1 - u; leftHandOnMag = 1 magOffset = degCF(-0.24*inv, -0.92*inv, 0.12*inv, 18*inv, 0, 14*inv) local slap = (u > 0.80) and math.sin(((u - 0.80) / 0.20) * math.pi) * 0.05 or 0 baseOffset *= degCF(-0.10, 0.06 + slap, 0.05, 14 + slap * 45, 18, -30) else local u = (p - 0.82) / 0.18; local inv = 1 - u; leftHandOnMag = inv baseOffset *= degCF(-0.10*inv, 0.06*inv, 0.05*inv, 14*inv, 18*inv, -30*inv) end end elseif CTRL.inspecting then local p = 1 - (CTRL.inspectTimer / CFG.inspectTime) local s1 = math.sin(math.min(1, p / 0.48) * math.pi) local s2 = (p > 0.44) and math.sin(math.min(1, (p - 0.44) / 0.56) * math.pi) or 0 baseOffset *= degCF(-0.22 * s1 + 0.12 * s2, 0.12 * (s1 + s2), -0.10 * s1, 14 * s1 + 8 * s2, 46 * s1 - 36 * s2, -32 * s1 + 24 * s2) end local fpsRifleCF = aimFrameCF * baseOffset local rifleCF = fpsRifleCF if CTRL.transition == "equip" then local u = CTRL.transAlpha if u < 0.38 then rightHandBack = math.sin((u / 0.38) * math.pi * 0.5); rifleCF = holsterCF else local k = (u - 0.38) / 0.62; local s = k * k * (3 - 2 * k) rifleCF = holsterCF:Lerp(fpsRifleCF, s) + aimFrameCF:VectorToWorldSpace(V(0.88, 0.28, -0.34) * math.sin(s * math.pi)) rightHandBack = 1 - s end elseif CTRL.transition == "holster" then local u = 1 - CTRL.transAlpha if u < 0.62 then local k = u / 0.62; local s = k * k * (3 - 2 * k) rifleCF = fpsRifleCF:Lerp(holsterCF, s) + aimFrameCF:VectorToWorldSpace(V(0.88, 0.28, -0.34) * math.sin(s * math.pi)) rightHandBack = s else rightHandBack = 1 - ((u - 0.62) / 0.38); rifleCF = holsterCF end elseif not CTRL.equipped then rifleCF = holsterCF end if CTRL.boltTimer > 0 and not CTRL.shellEjected and (1 - CTRL.boltTimer / CFG.boltTime) >= 0.36 then CTRL.shellEjected = true ejectShell(rifleCF) elseif CTRL.reloading and CTRL.reloadFromEmpty and not CTRL.shellEjected then local p = 1 - (CTRL.reloadTimer / CFG.reloadTime) if p >= 0.72 then CTRL.shellEjected = true; ejectShell(rifleCF) end end local boneCFs = { Pelvis = pelvisCF, Torso = torsoCF, Head = headCF, ThighL = thighL_CF, ShinL = shinL_CF, FootL = footL_CF, ThighR = thighR_CF, ShinR = shinR_CF, FootR = footR_CF, Rifle = rifleCF, Bolt = rifleCF * C(0, 0, boltPullBack), Trigger = rifleCF * C(0, -0.10, 0.26) * CFrame.Angles(math.rad(-22 * CTRL.triggerPull), 0, 0), Mag = rifleCF * C(0, -0.20, -0.24) * magOffset, FX = rifleCF, } boneCFs.BoltHandle = boneCFs.Bolt * C(0.08, 0.13, 0.14) * CFrame.Angles(0, 0, math.rad(boltLiftDeg)) local shoulderL, shoulderR = torsoCF:PointToWorldSpace(V(-0.88, 0.94, 0.02)), torsoCF:PointToWorldSpace(V(0.88, 0.94, 0.02)) local handL_T, handR_T, handL_CF, handR_CF local armSwing = math.sin(CTRL.gaitPhase) * 0.56 * CTRL.gaitAmp * (1 - CTRL.inAirAlpha) if not CTRL.equipped and CTRL.transition == nil then local airLift = CTRL.inAirAlpha * 0.35 handL_T = torsoCF:PointToWorldSpace(V(-0.96, -0.18 + airLift + math.max(0, armSwing * 0.25), -0.12 - armSwing)) handR_T = torsoCF:PointToWorldSpace(V(0.96, -0.18 + airLift + math.max(0, -armSwing * 0.25), -0.12 + armSwing)) else local gripW = rifleCF:PointToWorldSpace(V(0.04, -0.16, 0.62)) local foreW = rifleCF:PointToWorldSpace(V(-0.08, -0.14, -0.64)) local boltK = boneCFs.BoltHandle:PointToWorldSpace(V(0.24, -0.02, 0.14)) local magH = boneCFs.Mag:PointToWorldSpace(V(-0.08, -0.18, 0.16)) local backG = torsoCF:PointToWorldSpace(V(0.42, 1.38, 0.56)) handR_T = gripW:Lerp(boltK, rightHandOnBolt):Lerp(backG, rightHandBack) handL_T = foreW:Lerp(magH, leftHandOnMag) if CTRL.transition == "equip" and CTRL.transAlpha < 0.38 then handL_T = torsoCF:PointToWorldSpace(V(-0.96, -0.18, -0.12)):Lerp(foreW, CTRL.transAlpha / 0.38) elseif CTRL.transition == "holster" and (1 - CTRL.transAlpha) > 0.62 then local k = ((1 - CTRL.transAlpha) - 0.62) / 0.38 handL_T = foreW:Lerp(torsoCF:PointToWorldSpace(V(-0.96, -0.18, -0.12)), k) handR_T = backG:Lerp(torsoCF:PointToWorldSpace(V(0.96, -0.18, -0.12)), k) end end local armBasis = armed and aimFrameCF or torsoCF local upL, foL, endL = solveTwoBoneIK(shoulderL, handL_T, armBasis:VectorToWorldSpace(V(-0.80, -0.65, 0.45)), ARM_UPPER_LEN, ARM_FORE_LEN, armed or CTRL.transition ~= nil) local upR, foR, endR = solveTwoBoneIK(shoulderR, handR_T, armBasis:VectorToWorldSpace(V(0.80, -0.65, 0.45)), ARM_UPPER_LEN, ARM_FORE_LEN, armed or CTRL.transition ~= nil) if not CTRL.equipped and CTRL.transition == nil then handL_CF = C(endL) * foL.Rotation * CFrame.Angles(0, 0, math.rad(-90)) handR_CF = C(endR) * foR.Rotation * CFrame.Angles(0, 0, math.rad(90)) else local gripRot = (rifleCF * CFrame.Angles(math.rad(-22), math.rad(10), math.rad(80))).Rotation local foreRot = (rifleCF * CFrame.Angles(math.rad(14), math.rad(-28), math.rad(42))).Rotation local magRot = (boneCFs.Mag * CFrame.Angles(0, math.rad(-45), math.rad(65))).Rotation local boltRot = (boneCFs.BoltHandle * CFrame.Angles(0, math.rad(35), math.rad(75))).Rotation handL_CF = C(endL) * foreRot:Lerp(magRot, leftHandOnMag) handR_CF = C(endR) * gripRot:Lerp(boltRot, rightHandOnBolt) end boneCFs.UpperArmL, boneCFs.ForearmL, boneCFs.HandL = upL, foL, handL_CF boneCFs.UpperArmR, boneCFs.ForearmR, boneCFs.HandR = upR, foR, handR_CF -- Articulated Right Index Finger (Trigger Discipline vs Pulling Trigger) local fPitch, fYaw if not CTRL.equipped and CTRL.transition == nil then fPitch, fYaw = math.rad(-34), math.rad(4) elseif spA > 0.25 or CTRL.reloading or CTRL.boltTimer > 0 or CTRL.inspecting or CTRL.transition ~= nil then fPitch, fYaw = math.rad(6), math.rad(-6) else fPitch = math.rad(-14 - 22 * CTRL.triggerPull) fYaw = math.rad(14) end boneCFs.TriggerFinger = C(handR_CF:PointToWorldSpace(V(-0.095, 0.018, -0.24))) * handR_CF.Rotation * CFrame.Angles(fPitch, fYaw, 0) local muzzleCF = rifleCF * C(0, 0.08, -3.58) CTRL.lastMuzzleCF = muzzleCF CTRL.lastMuzzlePos = muzzleCF.Position return boneCFs, muzzleCF.Position end local function computeBlockTarget(b, boneCFs) if b.fxType == "bullet_tip" or b.fxType == "bullet_core" or b.fxType == "bullet_trail" then local proj = CTRL.activeF3XBullet if proj and proj.alive then local dir = (proj.vel.Magnitude > 1e-3) and proj.vel.Unit or V(0, 0, -1) local headCF = CFrame.lookAt(proj.pos, proj.pos + dir) if b.fxType == "bullet_tip" then return headCF * C(0, 0, -0.22), V(0.12, 0.12, 0.44) elseif b.fxType == "bullet_core" then return headCF * C(0, 0, 0.45) * CFrame.Angles(0, math.rad(90), 0), V(1.10, 0.11, 0.11) else local tl = math.clamp(proj.dist * 0.65, 0.45, 14) return headCF * C(0, 0, 1.00 + tl * 0.5) * CFrame.Angles(0, math.rad(90), 0), V(tl, 0.07, 0.07) end end return boneCFs.Rifle, V(0.12, 0.12, 0.18) elseif b.fxType == "flash_core" or b.fxType == "flash_side_l" or b.fxType == "flash_side_r" then if CTRL.fxTimer > 0.002 then local a = CTRL.fxTimer / math.max(0.01, CTRL.fxDuration) local mCF = CTRL.fxMuzzleCF if b.fxType == "flash_core" then return mCF * C(0, 0, -0.14) * CFrame.Angles(0, 0, CTRL.fxRoll), V(0.16 + 0.24 * a, 0.16 + 0.24 * a, 0.24 + 0.46 * a) elseif b.fxType == "flash_side_l" then return mCF * C(-0.26 - 0.12 * a, 0, 0.08) * CFrame.Angles(0, math.rad(-14), 0), V(0.42 + 0.44 * a, 0.12 + 0.08 * a, 0.12 + 0.08 * a) else return mCF * C(0.26 + 0.12 * a, 0, 0.08) * CFrame.Angles(0, math.rad(14), 0), V(0.42 + 0.44 * a, 0.12 + 0.08 * a, 0.12 + 0.08 * a) end end return boneCFs.Rifle, V(0.12, 0.12, 0.12) elseif b.fxType == "shell" then if CTRL.shell.active then local sh = CTRL.shell return C(sh.pos) * CFrame.Angles(sh.rot.X, sh.rot.Y, sh.rot.Z), V(0.28, 0.065, 0.065) end return boneCFs.Rifle, V(0.12, 0.065, 0.065) end return boneCFs[b.bone] * b.localCF, b.localSize end local function applyLocalVisuals(boneCFs) local scopeMask = (CTRL.equipped and CTRL.aimAlpha >= 0.82) local hideBody1P = CTRL.equipped and not _G.WuzSniperSeeBody local hideTopRound = (CTRL.ammo <= 0) or (CTRL.reloading and CTRL.reloadFromEmpty and CTRL.reloadTimer > (CFG.reloadTime * 0.55)) for i = 1, TOTAL do local b = STATE.blocks[i] if b and b.part and b.part.Parent then local gCF, gSz = computeBlockTarget(b, boneCFs) b.targetCF, b.targetSize = gCF, gSz if _G.WuzSniperSmooth then b.part.CFrame = gCF; b.part.Size = gSz end if b.fxType then local activeFx = isFxBlockActive(b) b.part.Transparency = desiredFxTransparency(b) b.part.LocalTransparencyModifier = activeFx and 0 or 1 elseif b.name == "MagTopRound" then b.part.Transparency = hideTopRound and 1 or 0 b.part.LocalTransparencyModifier = scopeMask and 1 or 0 elseif b.isHead then b.part.LocalTransparencyModifier = (CTRL.equipped or CTRL.transition == "equip" or scopeMask) and 1 or 0 elseif b.isBody then b.part.LocalTransparencyModifier = (hideBody1P or scopeMask) and 1 or 0 else b.part.LocalTransparencyModifier = scopeMask and 1 or 0 end end end end ------------------------------------------------------------------- -- CAMERA & REAL BODY VISIBILITY SYNC ------------------------------------------------------------------- local function restoreCameraAndMouse() if CTRL.camRestored then return end CTRL.camRestored = true if CTRL.savedCamMode ~= nil then pcall(function() plr.CameraMode = CTRL.savedCamMode end) end if CTRL.savedMinZoom ~= nil then pcall(function() plr.CameraMinZoomDistance = CTRL.savedMinZoom end) end if CTRL.savedMaxZoom ~= nil then pcall(function() plr.CameraMaxZoomDistance = CTRL.savedMaxZoom end) end local cam = workspace.CurrentCamera if cam and CTRL.savedFOV ~= nil then cam.FieldOfView = CTRL.savedFOV end if CTRL.savedMouseIcon ~= nil then pcall(function() UIS.MouseIconEnabled = CTRL.savedMouseIcon end) end if CTRL.savedSens ~= nil then pcall(function() UIS.MouseDeltaSensitivity = CTRL.savedSens end) end local t = getF3XTool() local handle = t and t:FindFirstChild("Handle") if handle and handle:IsA("BasePart") then handle.LocalTransparencyModifier = 0 end suppressBToolsUI(false) end local function enterFirstPerson() local cam = workspace.CurrentCamera if CTRL.camRestored then CTRL.savedCamMode = plr.CameraMode; CTRL.savedMinZoom = plr.CameraMinZoomDistance CTRL.savedMaxZoom = plr.CameraMaxZoomDistance; CTRL.savedFOV = cam and cam.FieldOfView or CFG.baseFOV CTRL.savedMouseIcon = UIS.MouseIconEnabled; CTRL.savedSens = UIS.MouseDeltaSensitivity CTRL.camRestored = false end plr.CameraMode = Enum.CameraMode.LockFirstPerson plr.CameraMinZoomDistance, plr.CameraMaxZoomDistance = 0.5, 0.5 UIS.MouseIconEnabled = false suppressBToolsUI(true) end local function hideLocalRealBody(parts, hide) if not parts then return end local mod = hide and 1 or 0 for _, p in ipairs(parts.realParts) do p.LocalTransparencyModifier = mod end if parts.head then for _, d in ipairs(parts.head:GetChildren()) do if d:IsA("Decal") then if hide then if CTRL.savedFaceTrans[d] == nil then CTRL.savedFaceTrans[d] = d.Transparency end d.Transparency = 1 elseif CTRL.savedFaceTrans[d] ~= nil then d.Transparency = CTRL.savedFaceTrans[d]; CTRL.savedFaceTrans[d] = nil end end end end end local function syncRealBodyVisibility(hide) if CTRL.bodyMaterialBusy or CTRL.serverBodyHidden == hide or os.clock() < CTRL.bodyMaterialNextAt then return end local ep, parts = getF3XEndpoint(true), getCharParts(getChar()) if not ep or not parts then return end local matItems, targetT = {}, hide and 1 or 0 for _, p in ipairs(parts.realParts) do matItems[#matItems + 1] = { Part = p, Transparency = targetT } end local t = getF3XTool(); local h = t and t:FindFirstChild("Handle") if h and h:IsA("BasePart") then matItems[#matItems + 1] = { Part = h, Transparency = targetT } end if #matItems == 0 then CTRL.serverBodyHidden = hide; return end CTRL.bodyMaterialBusy = true local epEpoch = STATE.epoch task.spawn(function() local ok, res = pcall(function() return ep:InvokeServer("SyncMaterial", matItems) end) CTRL.bodyMaterialBusy = false if STATE.alive and epEpoch == STATE.epoch then if ok and res ~= false then CTRL.serverBodyHidden = hide; CTRL.bodyMaterialNextAt = os.clock() + 0.05 else CTRL.bodyMaterialNextAt = os.clock() + 0.30 end end end) end local function toggleEquip() if not STATE.alive or _G.WuzSniperStop then return end if CTRL.transition == "equip" then CTRL.transition = "holster"; CTRL.aimHold, CTRL.aimToggle, CTRL.reloading, CTRL.inspecting = false, false, false, false playSFX("holster") return elseif CTRL.transition == "holster" then CTRL.transition = "equip"; playSFX("equip"); return end if not CTRL.equipped then CTRL.transition = "equip"; CTRL.transAlpha = 0; CTRL.reloading, CTRL.inspecting = false, false playSFX("equip") else CTRL.equipped = false; CTRL.transition = "holster"; CTRL.transAlpha = 1 CTRL.aimHold, CTRL.aimToggle, CTRL.aimAlpha, CTRL.prevScoped = false, false, 0, false CTRL.reloading, CTRL.inspecting, CTRL.boltTimer, CTRL.postShotHold = false, false, 0, 0 restoreCameraAndMouse() playSFX("holster") end end ------------------------------------------------------------------- -- HITSCAN RAYCAST, BALLISTIC PROJECTILES & F3X REMOVE ON HIT ------------------------------------------------------------------- local function performPenetratingRaycast(origin, direction) if CTRL.rayDirty or not CTRL.rayParams then refreshRayParams() end local baseList, tempFilter = CTRL.rayParams.FilterDescendantsInstances, {} for i = 1, #baseList do tempFilter[i] = baseList[i] end local params = RaycastParams.new() params.FilterType = Enum.RaycastFilterType.Exclude params.RespectCanCollide, params.IgnoreWater = false, true params.FilterDescendantsInstances = tempFilter local curOrigin, remaining, unitDir = origin, direction.Magnitude, direction.Unit for _ = 1, 12 do if remaining <= 0.1 then break end local hit = workspace:Raycast(curOrigin, unitDir * remaining, params) if not hit then return nil end local inst, skip = hit.Instance, false if inst.Name == "HumanoidRootPart" or inst.Name == "__WuzSniperBullet" or inst.Name == "__WuzSniperImpact" then skip = true elseif _G.WuzSniperIgnoreAccessories and inst:FindFirstAncestorOfClass("Accessory") then skip = true else local model = inst:FindFirstAncestorOfClass("Model") local hum = model and model:FindFirstChildOfClass("Humanoid") if hum and model ~= getChar() then return hit, model, hum elseif inst.Transparency >= 0.98 and not inst.CanCollide then skip = true end end if skip then tempFilter[#tempFilter + 1] = inst params.FilterDescendantsInstances = tempFilter remaining -= (hit.Position - curOrigin).Magnitude + 0.02 curOrigin = hit.Position + unitDir * 0.02 else return hit, nil, nil end end return nil end local function spawnImpactBurst(pos, isHostile) task.spawn(function() local p = Instance.new("Part") p.Name = "__WuzSniperImpact"; p.Shape = Enum.PartType.Ball; p.Material = Enum.Material.Neon p.Color = isHostile and Color3.fromRGB(255, 58, 72) or THEMES[CFG.themeIdx].core p.Size = isHostile and V(0.75, 0.75, 0.75) or V(0.38, 0.38, 0.38) p.Anchored, p.CanCollide, p.CanQuery, p.CanTouch, p.CastShadow = true, false, false, false, false p.CFrame, p.Parent = C(pos), workspace local t0 = os.clock() while p.Parent do local a = (os.clock() - t0) / 0.20 if a >= 1 then break end p.Size = (isHostile and V(0.65, 0.65, 0.65) or V(0.34, 0.34, 0.34)) * (1 + a * 1.5) p.Transparency = a RunService.RenderStepped:Wait() end if p.Parent then p:Destroy() end end) end local function startReload() if not CTRL.equipped or CTRL.transition ~= nil or CTRL.reloading or CTRL.ammo >= CFG.maxAmmo then return end CTRL.reloadFromEmpty = (CTRL.ammo <= 0) CTRL.reloading = true CTRL.reloadTimer = CTRL.reloadFromEmpty and CFG.reloadTime or (CFG.reloadTime * 0.74) CTRL.reloadStage = 0 CTRL.shellEjected = false CTRL.boltTimer = 0 CTRL.postShotHold = 0 CTRL.inspecting = false CTRL.aimHold, CTRL.aimToggle = false, false end local function makeBulletSubPart(name, size, mat, color, trans) local p = Instance.new("Part") p.Name, p.Size, p.Material, p.Color, p.Transparency = name, size, mat, color, trans p.Anchored, p.CanCollide, p.CanQuery, p.CanTouch, p.CastShadow = true, false, false, false, false p.Parent = workspace return p end local function destroyLocalBulletVisual(proj) if proj and proj.vis then for _, p in ipairs(proj.vis) do if p and p.Parent then pcall(function() p:Destroy() end) end end proj.vis = nil end end local function updateLocalBulletVisual(proj, showLocal) if not showLocal or not proj.alive then destroyLocalBulletVisual(proj); return end local th = THEMES[CFG.themeIdx] if not proj.vis then proj.vis = { makeBulletSubPart("__WuzSniperBullet", V(0.12, 0.12, 0.44), Enum.Material.Metal, th.brass, 0), makeBulletSubPart("__WuzSniperBullet", V(0.11, 0.11, 1.10), Enum.Material.Neon, th.core, 0), makeBulletSubPart("__WuzSniperBullet", V(0.07, 0.07, 3.50), Enum.Material.Neon, th.glow, 0.45), } end local dir = (proj.vel.Magnitude > 1e-3) and proj.vel.Unit or V(0, 0, -1) local headCF = CFrame.lookAt(proj.pos, proj.pos + dir) local tl = math.clamp(proj.dist * 0.65, 0.45, 14) proj.vis[1].CFrame = headCF * C(0, 0, -0.22) proj.vis[2].CFrame = headCF * C(0, 0, 0.45) proj.vis[3].Size = V(0.07, 0.07, tl); proj.vis[3].CFrame = headCF * C(0, 0, 1.00 + tl * 0.5) end local function handleBulletImpact(hit, hitModel, hitHum, shotDir) local hitPos, hitPart = hit.Position, hit.Instance if not hitPart or not hitPart.Parent then return end local isPerson = (hitModel ~= nil and hitHum ~= nil) spawnImpactBurst(hitPos, isPerson) task.spawn(function() local len = 6.5 local p = makeBulletSubPart("__WuzSniperBullet", V(0.07, 0.07, len), Enum.Material.Neon, THEMES[CFG.themeIdx].core, 0.35) p.CFrame = CFrame.lookAt(hitPos - shotDir * (len * 0.5), hitPos) local t0 = os.clock() while p.Parent do local a = (os.clock() - t0) / 0.16 if a >= 1 then break end p.Transparency = 0.35 + a * 0.65; p.Size = V(0.07 * (1 - a * 0.65), 0.07 * (1 - a * 0.65), len) RunService.RenderStepped:Wait() end if p.Parent then p:Destroy() end end) if isPerson or _G.WuzSniperDeleteWorld then CTRL.hitMarkerTimer = 0.24; CTRL.hitMarkerHostile = isPerson playSFX(isPerson and "kill" or "hit") local tp = hitModel and Players:GetPlayerFromCharacter(hitModel) CTRL.lastDeleteNote = string.format("DELETED: %s [%s]", tp and tp.Name or (hitModel and hitModel.Name or "World"), hitPart.Name) CTRL.lastDeleteAt = os.clock() local ep = getF3XEndpoint(true) if ep then task.spawn(function() local ok, res = pcall(function() return ep:InvokeServer("Remove", { hitPart }) end) if not ok or res == false then STATE.rejectCount += 1 end end) end else CTRL.hitMarkerTimer = 0.14; CTRL.hitMarkerHostile = false playSFX("hit", 0.55, 0.90) end end local function stepProjectiles(dt) local list = CTRL.projectiles if #list == 0 then CTRL.activeF3XBullet = nil; return end local grav, i = CFG.bulletGravity or 22, 1 while i <= #list do local proj = list[i] if not proj.alive then destroyLocalBulletVisual(proj); table.remove(list, i) else proj.age += dt; proj.vel += V(0, -grav * dt, 0) local stepVec = proj.vel * dt local stepDist = stepVec.Magnitude if stepDist > 1e-4 then local hit, hitModel, hitHum = performPenetratingRaycast(proj.pos, stepVec) if hit and hit.Instance then proj.pos = hit.Position; proj.dist += (hit.Position - proj.prevPos).Magnitude; proj.alive = false local shotDir = (proj.vel.Magnitude > 1e-3) and proj.vel.Unit or V(0, 0, -1) destroyLocalBulletVisual(proj); handleBulletImpact(hit, hitModel, hitHum, shotDir) if CTRL.activeF3XBullet == proj then CTRL.activeF3XBullet = nil end table.remove(list, i) else proj.prevPos = proj.pos; proj.pos += stepVec; proj.dist += stepDist if proj.age >= (CFG.bulletMaxLife or 5.5) or proj.dist >= (CFG.bulletMaxDist or 1800) or proj.pos.Y < -500 then proj.alive = false; destroyLocalBulletVisual(proj) if CTRL.activeF3XBullet == proj then CTRL.activeF3XBullet = nil end table.remove(list, i) else updateLocalBulletVisual(proj, proj ~= CTRL.activeF3XBullet); i += 1 end end else i += 1 end end end if not CTRL.activeF3XBullet and #list > 0 then CTRL.activeF3XBullet = list[#list]; destroyLocalBulletVisual(CTRL.activeF3XBullet) end end local function fireSniper() if not CTRL.equipped or CTRL.transition ~= nil or CTRL.reloading or CTRL.boltTimer > 0 or CTRL.postShotHold > 0 then return end if CTRL.ammo <= 0 then playSFX("dryfire"); startReload(); return end local cam = workspace.CurrentCamera if not cam then return end CTRL.ammo -= 1; CTRL.inspecting = false; CTRL.triggerPull = 1.0 CTRL.postShotHold = (CTRL.ammo > 0) and CFG.boltDelay or 0 CTRL.boltTimer = 0; CTRL.boltStage = 0; CTRL.shellEjected = false playSFX("fire", 1.0, 0.97 + math.random() * 0.06) local adsScale = 1 - 0.35 * CTRL.aimAlpha CTRL.recoilPos += V(0, 0.038 * adsScale, 0.30 * adsScale) CTRL.recoilRot += V(math.rad(8.8 * adsScale), math.rad((math.random() - 0.5) * 1.8 * adsScale), math.rad((math.random() - 0.5) * 3.4 * adsScale)) if _G.WuzSniperRecoilKick then CTRL.fovKick = 5.5 * (1 - 0.3 * CTRL.aimAlpha) CTRL.camKickPitch = (CTRL.camKickPitch or 0) + math.rad(2.2 * (1 - 0.35 * CTRL.aimAlpha)) CTRL.camKickYaw = (CTRL.camKickYaw or 0) + math.rad((math.random() - 0.5) * 0.7) CTRL.camKickRoll = (CTRL.camKickRoll or 0) + math.rad((math.random() - 0.5) * 1.8) end local camPos, camDir = cam.CFrame.Position, cam.CFrame.LookVector local maxRange = CFG.bulletMaxDist or 1800 local aimHit = performPenetratingRaycast(camPos, camDir * maxRange) local aimPoint = aimHit and aimHit.Position or (camPos + camDir * maxRange) local muzzlePos = CTRL.lastMuzzlePos or (camPos + camDir * 2.5) local spawnPos, launchDir = muzzlePos, camDir if aimHit and (aimHit.Position - camPos).Magnitude <= (muzzlePos - camPos).Magnitude + 0.6 then spawnPos = camPos + camDir * 0.45 else local toAim = aimPoint - muzzlePos if toAim.Magnitude > 1.0 and toAim.Unit:Dot(camDir) > 0.35 then launchDir = toAim.Unit end end CTRL.fxMuzzleCF = CTRL.lastMuzzleCF or (C(muzzlePos) * cam.CFrame.Rotation) CTRL.fxMuzzlePos, CTRL.fxHitPos, CTRL.fxDuration, CTRL.fxTimer, CTRL.fxRoll = muzzlePos, aimPoint, 0.06, 0.06, math.random() * math.pi * 2 local proj = { pos = spawnPos, prevPos = spawnPos, vel = launchDir * (tonumber(_G.WuzSniperBulletSpeed) or CFG.bulletSpeed), dist = 0, age = 0, alive = true, vis = nil } CTRL.projectiles[#CTRL.projectiles + 1] = proj if CTRL.activeF3XBullet and CTRL.activeF3XBullet.alive then updateLocalBulletVisual(CTRL.activeF3XBullet, true) end CTRL.activeF3XBullet = proj if CTRL.ammo <= 0 then task.delay(0.36, function() if STATE.alive and CTRL.equipped and CTRL.ammo <= 0 and not CTRL.reloading then startReload() end end) end end ------------------------------------------------------------------- -- DRAWING API HUD (CS:GO PANORAMA HUD + CLASSIC AWP SCOPE + KILLFEED) ------------------------------------------------------------------- local DRAW = { objs = {}, isSunc = false, lastVP = Vector2.zero, lastSeenDeleteAt = 0, cash = 4750, kills = 0, killfeed = {}, sessionStart = os.clock(), topInset = 36, } local function detectDrawingPolarity() local ok, p = pcall(Drawing.new, "Square") if ok and p then local t = p.Transparency pcall(function() if p.Remove then p:Remove() else p:Destroy() end end) DRAW.isSunc = (t == 0) end end local function dAlpha(opacity) local a = math.clamp(opacity, 0, 1) return DRAW.isSunc and (1 - a) or a end local function D(kind, props) local obj = Drawing.new(kind) if props then for k, v in pairs(props) do if k ~= "Opacity" then obj[k] = v end end if props.Opacity ~= nil then obj.Transparency = dAlpha(props.Opacity) end end DRAW.objs[#DRAW.objs + 1] = obj return obj end local function measureTextW(obj, fallbackChars) local b = obj.TextBounds if b and b.X and b.X > 2 then return b.X end return fallbackChars * ((obj.Size or 14) * 0.56) end local function formatCash(n) local s = tostring(math.max(0, math.floor(n))) return "$" .. (string.reverse((string.gsub(string.reverse(s), "(%d%d%d)", "%1,"))):gsub("^,", "")) end local function formatStanceTag() local tag = CTRL.inAir and "AIR" or (CTRL.crouching and "CROUCH") or (CTRL.walking and "WALK") or (CTRL.moveVelXZ.Magnitude > 1.0 and "RUN" or "STAND") if CTRL.leanAlpha < -0.25 then tag = tag .. " | PEEK L" elseif CTRL.leanAlpha > 0.25 then tag = tag .. " | PEEK R" end return tag end local FONT_UI = (Drawing.Fonts and (Drawing.Fonts.Plex or Drawing.Fonts.UI)) or 2 local FONT_MONO = (Drawing.Fonts and Drawing.Fonts.Monospace) or 3 local function buildHUD() for _, o in ipairs(DRAW.objs) do pcall(function() if o.Remove then o:Remove() else o:Destroy() end end) end DRAW.objs = {} DRAW.lastVP = Vector2.zero DRAW.lastSeenDeleteAt = CTRL.lastDeleteAt or 0 DRAW.killfeed = {} DRAW.sessionStart = os.clock() detectDrawingPolarity() local csBg = Color3.fromRGB(12, 15, 20) local csWhite = Color3.fromRGB(244, 246, 250) local csMuted = Color3.fromRGB(168, 176, 190) -- Classic CS:GO AWP Scope Mask & Reticle (ZIndex 20..26) DRAW.scopeSquares = {} for i = 1, 4 do DRAW.scopeSquares[i] = D("Square", { Filled = true, Color = Color3.fromRGB(3, 4, 6), Opacity = 1, ZIndex = 20, Visible = false }) end DRAW.scopeTris = {} local triOk = pcall(function() for i = 1, 32 do DRAW.scopeTris[i] = D("Triangle", { Filled = true, Color = Color3.fromRGB(3, 4, 6), Opacity = 1, ZIndex = 20, Visible = false }) end end) if not triOk then for _, t in ipairs(DRAW.scopeTris) do pcall(function() t:Remove() end) end DRAW.scopeTris = {} DRAW.scopeFallback = D("Circle", { Filled = false, NumSides = 72, Thickness = 900, Color = Color3.fromRGB(3, 4, 6), Opacity = 1, ZIndex = 20, Visible = false }) end DRAW.scopeShadow = D("Circle", { Filled = false, NumSides = 72, Thickness = 18, Color = Color3.fromRGB(4, 5, 8), Opacity = 0.56, ZIndex = 22, Visible = false }) DRAW.scopeRing = D("Circle", { Filled = false, NumSides = 72, Thickness = 3.5, Color = Color3.fromRGB(18, 20, 24), Opacity = 0.98, ZIndex = 23, Visible = false }) DRAW.scopeLineH = D("Line", { Thickness = 1.4, Color = Color3.fromRGB(8, 10, 12), Opacity = 0.95, ZIndex = 22, Visible = false }) DRAW.scopeLineV = D("Line", { Thickness = 1.4, Color = Color3.fromRGB(8, 10, 12), Opacity = 0.95, ZIndex = 22, Visible = false }) DRAW.scopeBlurH1 = D("Line", { Thickness = 1.5, Color = Color3.fromRGB(10, 12, 16), Opacity = 0.40, ZIndex = 22, Visible = false }) DRAW.scopeBlurH2 = D("Line", { Thickness = 1.5, Color = Color3.fromRGB(10, 12, 16), Opacity = 0.40, ZIndex = 22, Visible = false }) DRAW.scopeBlurV1 = D("Line", { Thickness = 1.5, Color = Color3.fromRGB(10, 12, 16), Opacity = 0.40, ZIndex = 22, Visible = false }) DRAW.scopeBlurV2 = D("Line", { Thickness = 1.5, Color = Color3.fromRGB(10, 12, 16), Opacity = 0.40, ZIndex = 22, Visible = false }) DRAW.scopePosts = {} for i = 1, 4 do DRAW.scopePosts[i] = D("Line", { Thickness = 4.8, Color = Color3.fromRGB(6, 8, 10), Opacity = 0.98, ZIndex = 23, Visible = false }) end DRAW.scopeTicks = {} for i = 1, 16 do DRAW.scopeTicks[i] = D("Line", { Thickness = 1.4, Color = Color3.fromRGB(10, 12, 16), Opacity = 0.92, ZIndex = 23, Visible = false }) end DRAW.scopeZoomLbl = D("Text", { Size = 14, Font = FONT_MONO, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Opacity = 0.9, ZIndex = 26, Visible = false }) DRAW.scopeDistLbl = D("Text", { Size = 14, Font = FONT_MONO, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Opacity = 0.9, ZIndex = 26, Visible = false }) DRAW.scopeTargetLbl = D("Text", { Size = 15, Font = FONT_MONO, Center = true, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = Color3.fromRGB(240, 74, 74), Opacity = 1, ZIndex = 26, Visible = false }) -- Unscoped CS:GO Dynamic Green Crosshair (ZIndex 30..31) DRAW.chOut, DRAW.chFg = {}, {} for i = 1, 4 do DRAW.chOut[i] = D("Line", { Thickness = 3.6, Color = Color3.fromRGB(6, 8, 10), Opacity = 0.88, ZIndex = 30, Visible = false }) DRAW.chFg[i] = D("Line", { Thickness = 1.6, Color = Color3.fromRGB(76, 255, 104), Opacity = 0.96, ZIndex = 31, Visible = false }) end DRAW.chDotOut = D("Square", { Filled = true, Size = Vector2.new(4, 4), Color = Color3.fromRGB(6, 8, 10), Opacity = 0.88, ZIndex = 30, Visible = false }) DRAW.chDot = D("Square", { Filled = true, Size = Vector2.new(2, 2), Color = Color3.fromRGB(76, 255, 104), Opacity = 0.96, ZIndex = 31, Visible = false }) -- Hitmarker X (ZIndex 35) DRAW.hitLines = {} for i = 1, 4 do DRAW.hitLines[i] = D("Line", { Thickness = 2.0, Color = Color3.fromRGB(255, 62, 68), Opacity = 1, ZIndex = 35, Visible = false }) end -- Top-Center CS:GO Match Strip (ZIndex 40..43) DRAW.matchBg = D("Square", { Filled = true, Color = csBg, Opacity = 0.68, ZIndex = 40, Visible = false }) DRAW.matchCtBar = D("Square", { Filled = true, Color = Color3.fromRGB(96, 152, 218), Opacity = 0.95, ZIndex = 41, Visible = false }) DRAW.matchTBar = D("Square", { Filled = true, Color = Color3.fromRGB(218, 176, 94), Opacity = 0.95, ZIndex = 41, Visible = false }) DRAW.matchCtLbl = D("Text", { Size = 16, Font = FONT_UI, Center = true, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = Color3.fromRGB(132, 184, 244), Opacity = 1, ZIndex = 42, Visible = false }) DRAW.matchTimeLbl = D("Text", { Size = 15, Font = FONT_MONO, Center = true, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csWhite, Opacity = 1, ZIndex = 42, Visible = false }) DRAW.matchTLbl = D("Text", { Size = 16, Font = FONT_UI, Center = true, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = Color3.fromRGB(238, 198, 114), Opacity = 1, ZIndex = 42, Visible = false }) -- Bottom-Left CS:GO Cash + Health/Armor Panel (ZIndex 40..44) DRAW.cashBg = D("Square", { Filled = true, Color = csBg, Opacity = 0.66, ZIndex = 40, Visible = false }) DRAW.cashLbl = D("Text", { Size = 18, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = Color3.fromRGB(128, 204, 102), Opacity = 1, ZIndex = 42, Visible = false }) DRAW.stanceLbl = D("Text", { Size = 12, Font = FONT_MONO, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Opacity = 0.95, ZIndex = 42, Visible = false }) DRAW.hpBg = D("Square", { Filled = true, Color = csBg, Opacity = 0.72, ZIndex = 40, Visible = false }) DRAW.hpCrossH = D("Square", { Filled = true, Size = Vector2.new(14, 4), Color = csWhite, Opacity = 0.95, ZIndex = 42, Visible = false }) DRAW.hpCrossV = D("Square", { Filled = true, Size = Vector2.new(4, 14), Color = csWhite, Opacity = 0.95, ZIndex = 42, Visible = false }) DRAW.hpLbl = D("Text", { Size = 28, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csWhite, Opacity = 1, ZIndex = 43, Visible = false }) DRAW.hpBarBg = D("Square", { Filled = true, Color = Color3.fromRGB(36, 42, 52), Opacity = 0.80, ZIndex = 41, Visible = false }) DRAW.hpBarFg = D("Square", { Filled = true, Color = csWhite, Opacity = 0.95, ZIndex = 42, Visible = false }) DRAW.hpSep = D("Square", { Filled = true, Size = Vector2.new(1, 32), Color = Color3.fromRGB(70, 78, 92), Opacity = 0.65, ZIndex = 41, Visible = false }) DRAW.armShield = D("Square", { Filled = true, Size = Vector2.new(12, 10), Color = csWhite, Opacity = 0.92, ZIndex = 42, Visible = false }) pcall(function() DRAW.armTip = D("Triangle", { Filled = true, Color = csWhite, Opacity = 0.92, ZIndex = 42, Visible = false }) end) DRAW.armLbl = D("Text", { Size = 28, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csWhite, Opacity = 1, ZIndex = 43, Visible = false }) DRAW.armBarBg = D("Square", { Filled = true, Color = Color3.fromRGB(36, 42, 52), Opacity = 0.80, ZIndex = 41, Visible = false }) DRAW.armBarFg = D("Square", { Filled = true, Color = Color3.fromRGB(114, 166, 224), Opacity = 0.95, ZIndex = 42, Visible = false }) -- Bottom-Right CS:GO Weapon Loadout Slots + Ammo Panel (ZIndex 40..44) DRAW.slot1Bg = D("Square", { Filled = true, Color = csBg, Opacity = 0.62, ZIndex = 40, Visible = false }) DRAW.slot1Bar = D("Square", { Filled = true, Size = Vector2.new(3, 24), Color = csWhite, Opacity = 1, ZIndex = 42, Visible = false }) DRAW.slot1Lbl = D("Text", { Size = 14, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csWhite, Text = "1 AWP", Opacity = 1, ZIndex = 42, Visible = false }) DRAW.slot3Bg = D("Square", { Filled = true, Color = csBg, Opacity = 0.45, ZIndex = 40, Visible = false }) DRAW.slot3Bar = D("Square", { Filled = true, Size = Vector2.new(3, 24), Color = csWhite, Opacity = 1, ZIndex = 42, Visible = false }) DRAW.slot3Lbl = D("Text", { Size = 14, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Text = "3 OPERATOR", Opacity = 1, ZIndex = 42, Visible = false }) DRAW.ammoBg = D("Square", { Filled = true, Color = csBg, Opacity = 0.72, ZIndex = 40, Visible = false }) DRAW.ammoLbl = D("Text", { Size = 30, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csWhite, Opacity = 1, ZIndex = 43, Visible = false }) DRAW.resLbl = D("Text", { Size = 17, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Opacity = 0.95, ZIndex = 43, Visible = false }) DRAW.stateLbl = D("Text", { Size = 12, Font = FONT_MONO, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Opacity = 0.95, ZIndex = 43, Visible = false }) DRAW.ammoProg = D("Square", { Filled = true, Color = csWhite, Opacity = 0.95, ZIndex = 42, Visible = false }) DRAW.hintLbl = D("Text", { Size = 12, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = csMuted, Text = "[F/1] Draw/Holster • [RMB/Q] Scope • [R] Reload • [Ctrl/C] Crouch", Opacity = 0.88, ZIndex = 43, Visible = false }) DRAW.ammoPips = {} for i = 1, CFG.maxAmmo do DRAW.ammoPips[i] = D("Square", { Filled = true, Size = Vector2.new(4, 16), Color = csWhite, Opacity = 0.95, ZIndex = 43, Visible = false }) end -- Top-Right CS:GO Killfeed Rows (4 rows, ZIndex 44..47) DRAW.kfRows = {} for i = 1, 4 do local r = { bg = D("Square", { Filled = true, Color = Color3.fromRGB(14, 16, 20), Opacity = 0.78, ZIndex = 44, Visible = false }), border = D("Square", { Filled = false, Thickness = 1.5, Color = Color3.fromRGB(220, 52, 52), Opacity = 0.95, ZIndex = 45, Visible = false }), killer = D("Text", { Size = 14, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = Color3.fromRGB(114, 166, 224), Opacity = 1, ZIndex = 46, Visible = false }), awpBody = D("Square", { Filled = true, Size = Vector2.new(18, 4), Color = csWhite, Opacity = 0.95, ZIndex = 46, Visible = false }), awpScope = D("Square", { Filled = true, Size = Vector2.new(8, 2), Color = csWhite, Opacity = 0.95, ZIndex = 46, Visible = false }), awpBarl = D("Line", { Thickness = 1.8, Color = csWhite, Opacity = 0.95, ZIndex = 46, Visible = false }), hsRing = D("Circle", { Filled = false, Radius = 5, NumSides = 16, Thickness = 1.4, Color = csWhite, Opacity = 0.95, ZIndex = 46, Visible = false }), hsDot = D("Circle", { Filled = true, Radius = 2, NumSides = 12, Color = Color3.fromRGB(235, 62, 62), Opacity = 1, ZIndex = 47, Visible = false }), victim = D("Text", { Size = 14, Font = FONT_UI, Outline = true, OutlineColor = Color3.new(0, 0, 0), Color = Color3.fromRGB(224, 184, 102), Opacity = 1, ZIndex = 46, Visible = false }), } DRAW.kfRows[i] = r end end local function layoutStaticViewport(vp) DRAW.lastVP = vp local insetOk, topLeftInset = pcall(function() return (GuiService:GetGuiInset()) end) local topInset = (insetOk and typeof(topLeftInset) == "Vector2") and topLeftInset.Y or 36 DRAW.topInset = topInset local cx, cy = vp.X * 0.5, vp.Y * 0.5 local R = math.floor(math.min(vp.X, vp.Y) * 0.42) -- Top-Center Match Bar do local mw, mh = 196, 32 local mx, my = math.floor(cx - mw * 0.5), topInset + 6 DRAW.matchBg.Position, DRAW.matchBg.Size = Vector2.new(mx, my), Vector2.new(mw, mh) DRAW.matchCtBar.Position, DRAW.matchCtBar.Size = Vector2.new(mx, my), Vector2.new(54, 2) DRAW.matchTBar.Position, DRAW.matchTBar.Size = Vector2.new(mx + mw - 54, my), Vector2.new(54, 2) DRAW.matchCtLbl.Position = Vector2.new(mx + 27, my + 8) DRAW.matchTimeLbl.Position = Vector2.new(cx, my + 8) DRAW.matchTLbl.Position = Vector2.new(mx + mw - 27, my + 8) end -- Bottom-Left Health, Armor & Cash do local bx, by, bw, bh = 20, vp.Y - 72, 260, 50 DRAW.cashBg.Position, DRAW.cashBg.Size = Vector2.new(bx, by - 30), Vector2.new(bw, 26) DRAW.cashLbl.Position = Vector2.new(bx + 10, by - 26) DRAW.stanceLbl.Position = Vector2.new(bx + 112, by - 23) DRAW.hpBg.Position, DRAW.hpBg.Size = Vector2.new(bx, by), Vector2.new(bw, bh) DRAW.hpCrossH.Position = Vector2.new(bx + 12, by + 20) DRAW.hpCrossV.Position = Vector2.new(bx + 17, by + 15) DRAW.hpLbl.Position = Vector2.new(bx + 34, by + 7) DRAW.hpBarBg.Position, DRAW.hpBarBg.Size = Vector2.new(bx + 12, by + 40), Vector2.new(104, 3) DRAW.hpBarFg.Position, DRAW.hpBarFg.Size = Vector2.new(bx + 12, by + 40), Vector2.new(104, 3) DRAW.hpSep.Position = Vector2.new(bx + 128, by + 9) DRAW.armShield.Position = Vector2.new(bx + 140, by + 13) if DRAW.armTip then DRAW.armTip.PointA = Vector2.new(bx + 140, by + 23) DRAW.armTip.PointB = Vector2.new(bx + 152, by + 23) DRAW.armTip.PointC = Vector2.new(bx + 146, by + 30) end DRAW.armLbl.Position = Vector2.new(bx + 160, by + 7) DRAW.armBarBg.Position, DRAW.armBarBg.Size = Vector2.new(bx + 140, by + 40), Vector2.new(106, 3) DRAW.armBarFg.Position, DRAW.armBarFg.Size = Vector2.new(bx + 140, by + 40), Vector2.new(106, 3) end -- Bottom-Right Weapon Slots & Ammo Panel do local aw, ah = 236, 50 local ax, ay = vp.X - aw - 20, vp.Y - ah - 20 local sw, sh = 164, 24 local sx = vp.X - sw - 20 DRAW.slot3Bg.Position, DRAW.slot3Bg.Size = Vector2.new(sx, ay - 62), Vector2.new(sw, sh) DRAW.slot3Bar.Position = Vector2.new(sx + sw - 3, ay - 62) DRAW.slot3Lbl.Position = Vector2.new(sx + 12, ay - 57) DRAW.slot1Bg.Position, DRAW.slot1Bg.Size = Vector2.new(sx, ay - 34), Vector2.new(sw, sh) DRAW.slot1Bar.Position = Vector2.new(sx + sw - 3, ay - 34) DRAW.slot1Lbl.Position = Vector2.new(sx + 12, ay - 29) DRAW.ammoBg.Position, DRAW.ammoBg.Size = Vector2.new(ax, ay), Vector2.new(aw, ah) DRAW.ammoLbl.Position = Vector2.new(ax + 14, ay + 6) DRAW.resLbl.Position = Vector2.new(ax + 40, ay + 15) DRAW.stateLbl.Position = Vector2.new(ax + 14, ay - 94) DRAW.ammoProg.Position, DRAW.ammoProg.Size = Vector2.new(ax, ay + ah - 3), Vector2.new(0, 3) for i = 1, CFG.maxAmmo do DRAW.ammoPips[i].Position = Vector2.new(ax + 114 + (i - 1) * 10, ay + 15) end DRAW.hintLbl.Position = Vector2.new(vp.X - 420, vp.Y - 17) end -- Scope Geometry do local left, right, top, bot = cx - R, cx + R, cy - R, cy + R DRAW.scopeSquares[1].Position, DRAW.scopeSquares[1].Size = Vector2.new(0, 0), Vector2.new(left, vp.Y) DRAW.scopeSquares[2].Position, DRAW.scopeSquares[2].Size = Vector2.new(right, 0), Vector2.new(vp.X - right, vp.Y) DRAW.scopeSquares[3].Position, DRAW.scopeSquares[3].Size = Vector2.new(left, 0), Vector2.new(R * 2, top) DRAW.scopeSquares[4].Position, DRAW.scopeSquares[4].Size = Vector2.new(left, bot), Vector2.new(R * 2, vp.Y - bot) if #DRAW.scopeTris == 32 then local corners = { { Vector2.new(right, top), -math.pi * 0.5, 0 }, { Vector2.new(right, bot), 0, math.pi * 0.5 }, { Vector2.new(left, bot), math.pi * 0.5, math.pi }, { Vector2.new(left, top), math.pi, math.pi * 1.5 }, } local ti = 1 for _, q in ipairs(corners) do local cPt, a0, a1 = q[1], q[2], q[3] for s = 0, 7 do local t0, t1 = a0 + (a1 - a0) * (s / 8), a0 + (a1 - a0) * ((s + 1) / 8) local tri = DRAW.scopeTris[ti] tri.PointA = cPt tri.PointB = Vector2.new(cx + math.cos(t0) * R, cy + math.sin(t0) * R) tri.PointC = Vector2.new(cx + math.cos(t1) * R, cy + math.sin(t1) * R) ti += 1 end end elseif DRAW.scopeFallback then DRAW.scopeFallback.Position = Vector2.new(cx, cy) DRAW.scopeFallback.Radius = R + 450 end DRAW.scopeRing.Position, DRAW.scopeRing.Radius = Vector2.new(cx, cy), R DRAW.scopeLineH.From, DRAW.scopeLineH.To = Vector2.new(left, cy), Vector2.new(right, cy) DRAW.scopeLineV.From, DRAW.scopeLineV.To = Vector2.new(cx, top), Vector2.new(cx, bot) local postInner = math.floor(R * 0.36) DRAW.scopePosts[1].From, DRAW.scopePosts[1].To = Vector2.new(left, cy), Vector2.new(cx - postInner, cy) DRAW.scopePosts[2].From, DRAW.scopePosts[2].To = Vector2.new(cx + postInner, cy), Vector2.new(right, cy) DRAW.scopePosts[3].From, DRAW.scopePosts[3].To = Vector2.new(cx, cy + postInner), Vector2.new(cx, bot) DRAW.scopePosts[4].From, DRAW.scopePosts[4].To = Vector2.new(cx, top), Vector2.new(cx, cy - postInner * 1.15) local tickStep = math.floor(R * 0.085) local tk = 1 for m = -4, 4 do if m ~= 0 then local len = (math.abs(m) % 2 == 0) and 5 or 3 local lh = DRAW.scopeTicks[tk]; lh.From, lh.To = Vector2.new(cx + m * tickStep, cy - len), Vector2.new(cx + m * tickStep, cy + len); tk += 1 local lv = DRAW.scopeTicks[tk]; lv.From, lv.To = Vector2.new(cx - len, cy + m * tickStep), Vector2.new(cx + len, cy + m * tickStep); tk += 1 end end DRAW.scopeZoomLbl.Position = Vector2.new(cx - math.floor(R * 0.56), cy + math.floor(R * 0.50)) DRAW.scopeDistLbl.Position = Vector2.new(cx + math.floor(R * 0.28), cy + math.floor(R * 0.50)) DRAW.scopeTargetLbl.Position = Vector2.new(cx, cy + math.floor(R * 0.58)) end end local function updateHUD(cam) if not cam or #DRAW.objs == 0 then return end local vp = cam.ViewportSize if (vp - DRAW.lastVP).Magnitude > 1 then layoutStaticViewport(vp) end local th = THEMES[CFG.themeIdx] local hudAlpha = math.clamp(tonumber(_G.WuzSniperHudAlpha) or 0.72, 0.25, 0.95) local active = CTRL.equipped local scoped = active and CTRL.aimAlpha >= 0.82 local spd = CTRL.moveVelXZ.Magnitude local stanceStr = formatStanceTag() local cx, cy = vp.X * 0.5, vp.Y * 0.5 local R = math.floor(math.min(vp.X, vp.Y) * 0.42) -- Detect new kills/hits from handleBulletImpact if (CTRL.lastDeleteAt or 0) > (DRAW.lastSeenDeleteAt or 0) and CTRL.lastDeleteNote ~= "" then DRAW.lastSeenDeleteAt = CTRL.lastDeleteAt local target, part = string.match(CTRL.lastDeleteNote, "^DELETED:%s*(.-)%s*%[(.-)%]$") target = target or "Target" part = part or "Torso" local isHS = (string.lower(part) == "head") if CTRL.hitMarkerHostile then DRAW.kills += 1 DRAW.cash = math.min(16000, DRAW.cash + (isHS and 300 or 100)) end table.insert(DRAW.killfeed, 1, { killer = plr.Name, victim = CTRL.hitMarkerHostile and target or (target .. " [" .. part .. "]"), headshot = isHS, at = os.clock(), }) while #DRAW.killfeed > 4 do table.remove(DRAW.killfeed) end end -- Target rangefinder raycast while active if active then local hit, hitModel, hitHum = performPenetratingRaycast(cam.CFrame.Position, cam.CFrame.LookVector * 1500) if hit and hit.Instance then CTRL.currentTargetDist = math.floor((hit.Position - cam.CFrame.Position).Magnitude + 0.5) if hitModel and hitHum then local tp = Players:GetPlayerFromCharacter(hitModel) CTRL.currentTargetHostile = true CTRL.currentTargetText = string.format("%s [%s]", tp and tp.Name or hitModel.Name, hit.Instance.Name) else CTRL.currentTargetHostile = false; CTRL.currentTargetText = "" end else CTRL.currentTargetDist = nil; CTRL.currentTargetHostile = false; CTRL.currentTargetText = "" end else CTRL.currentTargetDist = nil; CTRL.currentTargetHostile = false; CTRL.currentTargetText = "" end -- 1. Top-Center CS:GO Match Strip do local elapsed = math.floor(os.clock() - DRAW.sessionStart) local mins, secs = math.floor(elapsed / 60), elapsed % 60 local aliveOther = math.max(0, #Players:GetPlayers() - 1) DRAW.matchBg.Visible = true; DRAW.matchBg.Transparency = dAlpha(hudAlpha * 0.92) DRAW.matchCtBar.Visible = true; DRAW.matchTBar.Visible = true DRAW.matchCtLbl.Visible = true; DRAW.matchCtLbl.Text = tostring(DRAW.kills) DRAW.matchTimeLbl.Visible = true; DRAW.matchTimeLbl.Text = string.format("%02d:%02d", mins, secs) DRAW.matchTLbl.Visible = true; DRAW.matchTLbl.Text = tostring(aliveOther) end -- 2. Bottom-Left CS:GO Health, Armor, Cash & Stance do local char = plr.Character local hum = char and char:FindFirstChildOfClass("Humanoid") local hp = hum and math.clamp(math.floor(hum.Health + 0.5), 0, 999) or 100 local maxHp = hum and math.max(1, hum.MaxHealth) or 100 local hpFrac = math.clamp(hp / maxHp, 0, 1) local lowHp = hp <= 25 local hpCol = lowHp and Color3.fromRGB(235, 58, 52) or Color3.fromRGB(244, 246, 250) DRAW.cashBg.Visible = true; DRAW.cashBg.Transparency = dAlpha(hudAlpha * 0.9) DRAW.cashLbl.Visible = true; DRAW.cashLbl.Text = formatCash(DRAW.cash) DRAW.stanceLbl.Visible = true; DRAW.stanceLbl.Text = string.format("%s %.0f u/s", stanceStr, spd * 12) DRAW.hpBg.Visible = true; DRAW.hpBg.Transparency = dAlpha(hudAlpha) DRAW.hpCrossH.Visible = true; DRAW.hpCrossH.Color = hpCol DRAW.hpCrossV.Visible = true; DRAW.hpCrossV.Color = hpCol DRAW.hpLbl.Visible = true; DRAW.hpLbl.Text = tostring(hp); DRAW.hpLbl.Color = hpCol DRAW.hpBarBg.Visible = true; DRAW.hpBarFg.Visible = true DRAW.hpBarFg.Size = Vector2.new(math.max(1, math.floor(104 * hpFrac)), 3) DRAW.hpBarFg.Color = hpCol DRAW.hpSep.Visible = true DRAW.armShield.Visible = true if DRAW.armTip then DRAW.armTip.Visible = true end DRAW.armLbl.Visible = true; DRAW.armLbl.Text = "100" DRAW.armBarBg.Visible = true; DRAW.armBarFg.Visible = true DRAW.armBarFg.Color = th.glow end -- 3. Bottom-Right CS:GO Weapon Slots & Ammo Counter do local aw, ah = 236, 50 local ax, ay = vp.X - aw - 20, vp.Y - ah - 20 local sw, sh = 164, 24 local sx = vp.X - sw - 20 DRAW.slot1Bg.Visible = true; DRAW.slot1Bg.Transparency = dAlpha(active and hudAlpha or hudAlpha * 0.62) DRAW.slot1Bar.Visible = active; DRAW.slot1Bar.Color = th.glow DRAW.slot1Lbl.Visible = true DRAW.slot1Lbl.Color = active and Color3.fromRGB(248, 250, 255) or Color3.fromRGB(145, 152, 166) DRAW.slot3Bg.Visible = true; DRAW.slot3Bg.Transparency = dAlpha((not active) and hudAlpha or hudAlpha * 0.55) DRAW.slot3Bar.Visible = not active; DRAW.slot3Bar.Color = Color3.fromRGB(238, 242, 250) DRAW.slot3Lbl.Visible = true DRAW.slot3Lbl.Color = (not active) and Color3.fromRGB(248, 250, 255) or Color3.fromRGB(145, 152, 166) DRAW.ammoBg.Visible = active; DRAW.ammoBg.Transparency = dAlpha(hudAlpha) DRAW.ammoLbl.Visible = active DRAW.resLbl.Visible = active DRAW.stateLbl.Visible = active DRAW.hintLbl.Visible = true DRAW.hintLbl.Text = active and "[LMB] Fire • [RMB/Q] Scope • [R] Reload • [Z/X] Lean • [F] Holster" or "[F / 1] Draw AWP • [T] Theme • [Ctrl/C] Crouch • [F6] Stop" local hintW = measureTextW(DRAW.hintLbl, #DRAW.hintLbl.Text) DRAW.hintLbl.Position = Vector2.new(vp.X - hintW - 20, vp.Y - 16) for i = 1, CFG.maxAmmo do local pip = DRAW.ammoPips[i] pip.Visible = active if active then local filled = i <= CTRL.ammo pip.Color = filled and Color3.fromRGB(244, 246, 250) or Color3.fromRGB(64, 70, 84) pip.Transparency = dAlpha(filled and 0.95 or 0.38) end end if active then local lowAmmo = CTRL.ammo <= 1 DRAW.ammoLbl.Text = tostring(CTRL.ammo) DRAW.ammoLbl.Color = lowAmmo and Color3.fromRGB(235, 58, 52) or Color3.fromRGB(246, 248, 252) DRAW.resLbl.Text = "/ " .. tostring(CFG.maxAmmo) local progFrac = 0 if CTRL.reloading then local tot = CTRL.reloadFromEmpty and CFG.reloadTime or (CFG.reloadTime * 0.74) progFrac = 1 - math.clamp(CTRL.reloadTimer / math.max(0.05, tot), 0, 1) DRAW.stateLbl.Text = CTRL.reloadFromEmpty and "RELOADING (EMPTY)" or "TACTICAL RELOAD" DRAW.stateLbl.Color = Color3.fromRGB(242, 196, 78) elseif CTRL.boltTimer > 0 then progFrac = 1 - math.clamp(CTRL.boltTimer / CFG.boltTime, 0, 1) DRAW.stateLbl.Text = "BOLT CYCLE"; DRAW.stateLbl.Color = Color3.fromRGB(162, 208, 255) elseif CTRL.inspecting then DRAW.stateLbl.Text = "INSPECT"; DRAW.stateLbl.Color = Color3.fromRGB(172, 232, 196) elseif scoped then DRAW.stateLbl.Text = string.format("ZOOM %.1fx", CFG.baseFOV / math.max(1, CFG.scopeFOV)) DRAW.stateLbl.Color = th.glow elseif (CTRL.sprintAlpha or 0) > 0.45 then DRAW.stateLbl.Text = "SPRINT"; DRAW.stateLbl.Color = Color3.fromRGB(236, 212, 138) else DRAW.stateLbl.Text = (CTRL.transition == "equip") and "DRAWING" or "AWP READY" DRAW.stateLbl.Color = Color3.fromRGB(148, 224, 168) end local stW = measureTextW(DRAW.stateLbl, #DRAW.stateLbl.Text) DRAW.stateLbl.Position = Vector2.new(vp.X - stW - 26, ay - 78) DRAW.slot1Bg.Position = Vector2.new(sx, ay - 30) DRAW.slot1Bar.Position = Vector2.new(sx + sw - 3, ay - 30) DRAW.slot1Lbl.Position = Vector2.new(sx + 12, ay - 25) DRAW.slot3Bg.Position = Vector2.new(sx, ay - 58) DRAW.slot3Bar.Position = Vector2.new(sx + sw - 3, ay - 58) DRAW.slot3Lbl.Position = Vector2.new(sx + 12, ay - 53) DRAW.ammoProg.Visible = (progFrac > 0.01) DRAW.ammoProg.Size = Vector2.new(math.floor(aw * progFrac), 3) DRAW.ammoProg.Color = CTRL.reloading and Color3.fromRGB(242, 196, 78) or th.glow else DRAW.ammoProg.Visible = false -- Slide weapon slots slightly lower when holstered local hy = vp.Y - 24 DRAW.slot1Bg.Position = Vector2.new(sx, hy - 30) DRAW.slot1Bar.Position = Vector2.new(sx + sw - 3, hy - 30) DRAW.slot1Lbl.Position = Vector2.new(sx + 12, hy - 25) DRAW.slot3Bg.Position = Vector2.new(sx, hy - 58) DRAW.slot3Bar.Position = Vector2.new(sx + sw - 3, hy - 58) DRAW.slot3Lbl.Position = Vector2.new(sx + 12, hy - 53) end end -- 4. Top-Right CS:GO Killfeed (5.5s lifetime, fades smoothly) do local now = os.clock() local yCursor = DRAW.topInset + 14 for i = #DRAW.killfeed, 1, -1 do if (now - DRAW.killfeed[i].at) > 5.5 then table.remove(DRAW.killfeed, i) end end for i = 1, 4 do local r = DRAW.kfRows[i] local entry = DRAW.killfeed[i] if entry then local age = now - entry.at local alpha = 1 - math.clamp((age - 4.7) / 0.8, 0, 1) r.killer.Text = entry.killer r.victim.Text = entry.victim local kW = measureTextW(r.killer, #entry.killer) local vW = measureTextW(r.victim, #entry.victim) local hsSpace = entry.headshot and 20 or 0 local iconW = 36 + hsSpace local boxW = math.floor(kW + iconW + vW + 26) local boxH = 24 local bx = vp.X - boxW - 20 local by = yCursor r.bg.Visible = true; r.bg.Position, r.bg.Size = Vector2.new(bx, by), Vector2.new(boxW, boxH) r.bg.Transparency = dAlpha(0.76 * alpha) r.border.Visible = true; r.border.Position, r.border.Size = Vector2.new(bx, by), Vector2.new(boxW, boxH) r.border.Transparency = dAlpha(0.95 * alpha) r.killer.Visible = true; r.killer.Position = Vector2.new(bx + 9, by + 4); r.killer.Transparency = dAlpha(alpha) local ix = bx + 15 + kW r.awpBody.Visible = true; r.awpBody.Position = Vector2.new(ix, by + 11); r.awpBody.Transparency = dAlpha(alpha) r.awpScope.Visible = true; r.awpScope.Position = Vector2.new(ix + 5, by + 8); r.awpScope.Transparency = dAlpha(alpha) r.awpBarl.Visible = true; r.awpBarl.From, r.awpBarl.To = Vector2.new(ix + 16, by + 12), Vector2.new(ix + 28, by + 12) r.awpBarl.Transparency = dAlpha(alpha) if entry.headshot then r.hsRing.Visible = true; r.hsRing.Position = Vector2.new(ix + 37, by + 12); r.hsRing.Transparency = dAlpha(alpha) r.hsDot.Visible = true; r.hsDot.Position = Vector2.new(ix + 37, by + 12); r.hsDot.Transparency = dAlpha(alpha) else r.hsRing.Visible = false; r.hsDot.Visible = false end r.victim.Visible = true; r.victim.Position = Vector2.new(ix + 34 + hsSpace, by + 4); r.victim.Transparency = dAlpha(alpha) yCursor += boxH + 5 else r.bg.Visible = false; r.border.Visible = false; r.killer.Visible = false r.awpBody.Visible = false; r.awpScope.Visible = false; r.awpBarl.Visible = false r.hsRing.Visible = false; r.hsDot.Visible = false; r.victim.Visible = false end end end -- 5. Scope Vignette, German Posts, Stadia Ticks & Movement Blur do for i = 1, 4 do DRAW.scopeSquares[i].Visible = scoped DRAW.scopePosts[i].Visible = scoped end for _, tr in ipairs(DRAW.scopeTris) do tr.Visible = scoped end if DRAW.scopeFallback then DRAW.scopeFallback.Visible = scoped end DRAW.scopeShadow.Visible = scoped; DRAW.scopeRing.Visible = scoped DRAW.scopeLineH.Visible = scoped; DRAW.scopeLineV.Visible = scoped for _, tk in ipairs(DRAW.scopeTicks) do tk.Visible = scoped end DRAW.scopeZoomLbl.Visible = scoped; DRAW.scopeDistLbl.Visible = scoped DRAW.scopeTargetLbl.Visible = scoped and CTRL.currentTargetText ~= "" if scoped then local left, right, top, bot = cx - R, cx + R, cy - R, cy + R local parX = math.clamp(-CTRL.swayYaw * 140 + CTRL.leanAlpha * 6, -16, 16) local parY = math.clamp(CTRL.swayPitch * 140 + CTRL.recoilPos.Y * 140, -16, 16) DRAW.scopeShadow.Position = Vector2.new(cx + parX, cy + parY) DRAW.scopeShadow.Radius = math.max(20, R - 8) local blurAmt = math.clamp((spd / math.max(1, CFG.runSpeed)) * (1 - 0.55 * CTRL.crouchAlpha) + CTRL.inAirAlpha * 1.15, 0, 1.35) if (_G.WuzSniperScopeBlur ~= false) and blurAmt >= 0.08 then local off = blurAmt * 5.5 local bOp = math.clamp(0.16 + blurAmt * 0.28, 0.16, 0.46) DRAW.scopeLineH.Transparency = dAlpha(math.max(0.45, 0.94 - blurAmt * 0.34)) DRAW.scopeLineV.Transparency = dAlpha(math.max(0.45, 0.94 - blurAmt * 0.34)) DRAW.scopeBlurH1.Visible = true; DRAW.scopeBlurH1.Transparency = dAlpha(bOp); DRAW.scopeBlurH1.From, DRAW.scopeBlurH1.To = Vector2.new(left, cy - off), Vector2.new(right, cy - off) DRAW.scopeBlurH2.Visible = true; DRAW.scopeBlurH2.Transparency = dAlpha(bOp); DRAW.scopeBlurH2.From, DRAW.scopeBlurH2.To = Vector2.new(left, cy + off), Vector2.new(right, cy + off) DRAW.scopeBlurV1.Visible = true; DRAW.scopeBlurV1.Transparency = dAlpha(bOp); DRAW.scopeBlurV1.From, DRAW.scopeBlurV1.To = Vector2.new(cx - off, top), Vector2.new(cx - off, bot) DRAW.scopeBlurV2.Visible = true; DRAW.scopeBlurV2.Transparency = dAlpha(bOp); DRAW.scopeBlurV2.From, DRAW.scopeBlurV2.To = Vector2.new(cx + off, top), Vector2.new(cx + off, bot) else DRAW.scopeLineH.Transparency = dAlpha(0.95); DRAW.scopeLineV.Transparency = dAlpha(0.95) DRAW.scopeBlurH1.Visible = false; DRAW.scopeBlurH2.Visible = false DRAW.scopeBlurV1.Visible = false; DRAW.scopeBlurV2.Visible = false end DRAW.scopeZoomLbl.Text = string.format("%.1fx", CFG.baseFOV / math.max(1, CFG.scopeFOV)) DRAW.scopeDistLbl.Text = CTRL.currentTargetDist and string.format("%d st", CTRL.currentTargetDist) or "---" DRAW.scopeTargetLbl.Text = CTRL.currentTargetText else DRAW.scopeBlurH1.Visible = false; DRAW.scopeBlurH2.Visible = false DRAW.scopeBlurV1.Visible = false; DRAW.scopeBlurV2.Visible = false end end -- 6. Unscoped CS:GO Dynamic Crosshair + Hitmarker X do local showCh = active and not scoped and (_G.WuzSniperCrosshair ~= false) local gap = math.max(4, math.floor(8 - CTRL.crouchAlpha * 3 + math.clamp(spd / CFG.runSpeed, 0, 1.3) * 18 * (1 - 0.45 * CTRL.crouchAlpha) + CTRL.inAirAlpha * 22 + CTRL.recoilPos.Z * 40)) local len = 9 local chCol = CTRL.currentTargetHostile and Color3.fromRGB(255, 68, 72) or Color3.fromRGB(76, 255, 104) local segs = { { Vector2.new(cx, cy - gap), Vector2.new(cx, cy - gap - len) }, { Vector2.new(cx, cy + gap), Vector2.new(cx, cy + gap + len) }, { Vector2.new(cx - gap, cy), Vector2.new(cx - gap - len, cy) }, { Vector2.new(cx + gap, cy), Vector2.new(cx + gap + len, cy) }, } for i = 1, 4 do DRAW.chOut[i].Visible = showCh; DRAW.chOut[i].From, DRAW.chOut[i].To = segs[i][1], segs[i][2] DRAW.chFg[i].Visible = showCh; DRAW.chFg[i].From, DRAW.chFg[i].To = segs[i][1], segs[i][2]; DRAW.chFg[i].Color = chCol end DRAW.chDotOut.Visible = showCh; DRAW.chDotOut.Position = Vector2.new(cx - 2, cy - 2) DRAW.chDot.Visible = showCh; DRAW.chDot.Position = Vector2.new(cx - 1, cy - 1); DRAW.chDot.Color = chCol if active and CTRL.hitMarkerTimer > 0 then local hmCol = CTRL.hitMarkerHostile and Color3.fromRGB(255, 58, 72) or Color3.fromRGB(240, 245, 255) local hmOp = math.clamp(CTRL.hitMarkerTimer / 0.14, 0, 1) local r1, r2 = 5, 13 local coords = { { cx - r2, cy - r2, cx - r1, cy - r1 }, { cx + r1, cy - r1, cx + r2, cy - r2 }, { cx - r2, cy + r2, cx - r1, cy + r1 }, { cx + r1, cy + r1, cx + r2, cy + r2 }, } for i = 1, 4 do local l = DRAW.hitLines[i] l.Visible = true; l.Color = hmCol; l.Transparency = dAlpha(hmOp) l.From, l.To = Vector2.new(coords[i][1], coords[i][2]), Vector2.new(coords[i][3], coords[i][4]) end else for i = 1, 4 do DRAW.hitLines[i].Visible = false end end end end ------------------------------------------------------------------- -- F3X DELTA REPLICATOR (LOW LATENCY) ------------------------------------------------------------------- local function angleBetween(a, b) return math.max(math.acos(math.clamp(a.LookVector:Dot(b.LookVector), -1, 1)), math.acos(math.clamp(a.UpVector:Dot(b.UpVector), -1, 1))) end local function needsSync(cfA, szA, cfB, szB, posT, szT, rotT) return (cfA.Position - cfB.Position).Magnitude >= posT or (szA - szB).Magnitude >= szT or angleBetween(cfA, cfB) >= rotT end local function dispatchF3X(now) if (now - STATE.lastSendAt) < CFG.sendTick then return end local ep = getF3XEndpoint(true) if not ep then return end local effMax = (STATE.avgRTT > 0.25) and math.max(1, math.floor(CFG.maxInflightBatches * (0.25 / STATE.avgRTT))) or CFG.maxInflightBatches if STATE.inFlightBatches >= effMax then return end local moveCands, resizeCands, matEntries = {}, {}, {} local settling = (STATE.inFlightBatches == 0) for i = 1, TOTAL do local b = STATE.blocks[i] if b and b.part and b.part.Parent and b.targetCF then local effPrio = b.prio local posT, szT, rotT = settling and 0.035 or 0.075, 0.04, settling and math.rad(1.2) or math.rad(2.2) if b.fxType then local isActiveFx = isFxBlockActive(b) local wantT = desiredFxTransparency(b) if math.abs((b.serverTrans or 1) - wantT) > 0.08 and not b.matInTransit then b.matInTransit = true matEntries[#matEntries + 1] = { block = b, wantT = wantT, item = { Part = b.part, Transparency = wantT } } end if not isActiveFx then effPrio, posT, szT, rotT = 0.12, 0.45, 0.20, math.rad(14) elseif b.fxType ~= "flash_core" and b.fxType ~= "flash_side_l" and b.fxType ~= "flash_side_r" then posT, szT, rotT = 0.05, 0.06, math.rad(1.5) end end if not b.inTransit and now >= b.retryAt and needsSync(b.targetCF, b.targetSize, b.serverCF, b.serverSize, posT, szT, rotT) then local sc = (b.targetCF.Position - b.serverCF.Position).Magnitude / posT + angleBetween(b.targetCF, b.serverCF) / rotT + (b.targetSize - b.serverSize).Magnitude / szT local item = { block = b, cf = b.targetCF, sz = b.targetSize, score = sc * effPrio * (1 + math.min(4.0, (now - b.lastSentAt) * 3.0)) } if (b.targetSize - b.serverSize).Magnitude >= szT then resizeCands[#resizeCands + 1] = item else moveCands[#moveCands + 1] = item end end end end if #matEntries > 0 then local matPayload = {} for _, m in ipairs(matEntries) do matPayload[#matPayload + 1] = m.item end task.spawn(function() local ok, res = pcall(function() return ep:InvokeServer("SyncMaterial", matPayload) end) for _, m in ipairs(matEntries) do m.block.matInTransit = false; if ok and res ~= false then m.block.serverTrans = m.wantT end end end) end if #moveCands == 0 and #resizeCands == 0 then return end STATE.lastSendAt = now local function sendQueue(actionName, list) if #list == 0 then return end table.sort(list, function(a, b) return a.score > b.score end) local idx = 1 while idx <= #list and STATE.inFlightBatches < effMax do local payload, sentBlocks = {}, {} local batchEnd = math.min(#list, idx + CFG.batchSize - 1) for k = idx, batchEnd do local c = list[k] c.block.inTransit = true; c.block.lastSentAt = now payload[#payload + 1] = (actionName == "SyncResize") and { Part = c.block.part, Size = c.sz, CFrame = c.cf } or { Part = c.block.part, CFrame = c.cf } sentBlocks[#sentBlocks + 1] = c end idx = batchEnd + 1 STATE.inFlightBatches += 1 local sAt = now task.spawn(function() local ok, res = pcall(function() return ep:InvokeServer(actionName, payload) end) STATE.inFlightBatches -= 1 local doneAt = os.clock() local rtt = doneAt - sAt STATE.avgRTT = (STATE.avgRTT == 0) and rtt or (STATE.avgRTT * 0.85 + rtt * 0.15) for _, e in ipairs(sentBlocks) do local b = e.block; b.inTransit = false if STATE.alive then if ok and res ~= false then b.serverCF, b.serverSize, b.failCount = e.cf, e.sz, 0 else b.failCount += 1; b.retryAt = doneAt + math.min(0.8, 0.06 * 2 ^ math.min(b.failCount, 4)) end end end if STATE.alive then if ok and res ~= false then STATE.sentParts += #payload; STATE.sentBatches += 1 else STATE.rejectCount += 1 end end end) end end sendQueue("SyncResize", resizeCands) sendQueue("SyncMove", moveCands) end ------------------------------------------------------------------- -- INIT, RENDER LOOP, INPUTS & CLEANUP ------------------------------------------------------------------- initSounds() local builtCount = buildOrScan() buildHUD() print(string.format("[WuzSniper] Realistic AWP + CS:GO Operator + HUD + SFX (%s) Ready! %d/%d parts | [F/1] Draw", SFX.mode, builtCount, TOTAL)) local function cleanup() if not STATE.alive then return end STATE.alive = false; _G.WuzSniperStop = true; STATE.epoch += 1 for _, proj in ipairs(CTRL.projectiles) do destroyLocalBulletVisual(proj) end CTRL.projectiles = {}; CTRL.activeF3XBullet = nil; CTRL.shell.active = false pcall(function() RunService:UnbindFromRenderStep(RENDER_STEP_NAME) end) restoreCameraAndMouse() restoreMovement() local parts = getCharParts(getChar()) hideLocalRealBody(parts, false) local ep = getF3XEndpoint(false) if ep then local restoreItems = {} if parts then for _, p in ipairs(parts.realParts) do restoreItems[#restoreItems + 1] = { Part = p, Transparency = 0 } end end for i = 1, TOTAL do local b = STATE.blocks[i]; if b and b.part and b.part.Parent then restoreItems[#restoreItems + 1] = { Part = b.part, Transparency = 1 } end end local t = getF3XTool(); local h = t and t:FindFirstChild("Handle") if h and h:IsA("BasePart") then restoreItems[#restoreItems + 1] = { Part = h, Transparency = 0 } end if #restoreItems > 0 then pcall(function() ep:InvokeServer("SyncMaterial", restoreItems) end) end end for _, conn in ipairs(STATE.connections) do pcall(function() conn:Disconnect() end) end STATE.connections = {} for _, o in ipairs(DRAW.objs) do pcall(function() if o.Remove then o:Remove() else o:Destroy() end end) end DRAW.objs = {} if SFX.folder then pcall(function() SFX.folder:Destroy() end); SFX.folder = nil end if env.WuzSniperCleanup == cleanup then env.WuzSniperCleanup = nil end end env.WuzSniperCleanup = cleanup _G.WuzSniperCleanup = cleanup _G.WuzSniperRemove = function() local toDelete = {} for i = 1, TOTAL do local b = STATE.blocks[i]; if b and b.part and b.part.Parent then toDelete[#toDelete + 1] = b.part end end local ep = getF3XEndpoint(false) cleanup() if ep and #toDelete > 0 then pcall(function() ep:InvokeServer("Remove", toDelete) end) end end _G.WuzSniperSetTheme = function(idxOrName) local chosen = tonumber(idxOrName) if not chosen and type(idxOrName) == "string" then local q = string.lower(idxOrName) for i, th in ipairs(THEMES) do if string.find(string.lower(th.name), q, 1, true) then chosen = i; break end end end if chosen then paintAll(chosen); playSFX("scope_zoom"); print("[WuzSniper] Theme:", THEMES[CFG.themeIdx].name) end return THEMES[CFG.themeIdx].name end _G.WuzSniperSetSoundMode = function(mode) if mode == "synth" or mode == "roblox" or mode == "classic" then if mode == "synth" and not next(SFX.synthAssets) then initSounds() end SFX.mode = (mode == "synth" and not next(SFX.synthAssets)) and "roblox" or mode _G.WuzSniperSoundMode = SFX.mode playSFX("scope_in") return SFX.mode end return SFX.mode end _G.WuzSniperSetBulletSpeed = function(spd) local n = tonumber(spd); if not n or n < 40 or n > 3000 then return false end CFG.bulletSpeed = n; _G.WuzSniperBulletSpeed = n; return true end _G.WuzSniperSetBulletGravity = function(g) local n = tonumber(g); if not n or n < 0 or n > 300 then return false end CFG.bulletGravity = n; return true end _G.WuzSniperSetArmStyle = function(style) if style == "pure" or style == "glove" then CFG.armStyle = style; paintAll(CFG.themeIdx); return true end return false end _G.WuzSniperStats = function() return { equipped = CTRL.equipped, ammo = CTRL.ammo, scopeFOV = CFG.scopeFOV, stance = formatStanceTag(), speed = math.floor(CTRL.moveVelXZ.Magnitude * 10 + 0.5) / 10, soundMode = SFX.mode, drawingMode = DRAW.isSunc and "sUNC" or "UNC", blocks = builtCount, total = TOTAL, sentParts = STATE.sentParts, fails = STATE.rejectCount, rttMs = math.floor(STATE.avgRTT * 1000 + 0.5), theme = THEMES[CFG.themeIdx].name, } end RunService:BindToRenderStep(RENDER_STEP_NAME, Enum.RenderPriority.Camera.Value + 1, function(dt) if not STATE.alive or _G.WuzSniperStop then return end local cdt = math.min(dt, 0.05) CTRL.timeAcc += cdt local c = getChar(); local parts = getCharParts(c); local cam = workspace.CurrentCamera if not parts or not parts.torso or not parts.hrp or not parts.hum or not cam then return end if CTRL.fxTimer > 0 then CTRL.fxTimer = math.max(0, CTRL.fxTimer - cdt) end if CTRL.hitMarkerTimer > 0 then CTRL.hitMarkerTimer = math.max(0, CTRL.hitMarkerTimer - cdt) end if CTRL.postShotHold > 0 then CTRL.postShotHold = math.max(0, CTRL.postShotHold - cdt) if CTRL.postShotHold <= 0 and CTRL.ammo > 0 and not CTRL.reloading then CTRL.boltTimer = CFG.boltTime CTRL.boltStage = 0 CTRL.shellEjected = false if not _G.WuzSniperAutoRescope then CTRL.aimToggle = false end end end if CTRL.boltTimer > 0 then CTRL.boltTimer = math.max(0, CTRL.boltTimer - cdt) end if CTRL.inspectTimer > 0 then CTRL.inspectTimer = math.max(0, CTRL.inspectTimer - cdt); if CTRL.inspectTimer <= 0 then CTRL.inspecting = false end end if CTRL.reloading then CTRL.reloadTimer = math.max(0, CTRL.reloadTimer - cdt) if CTRL.reloadTimer <= 0 then CTRL.reloading = false; CTRL.ammo = CFG.maxAmmo end end if CTRL.transition == "equip" then CTRL.transAlpha = math.min(1, CTRL.transAlpha + cdt / CFG.equipTime) if CTRL.transAlpha >= 1 then CTRL.transition = nil; CTRL.equipped = true; CTRL.equipSettle = 1.0; enterFirstPerson() end elseif CTRL.transition == "holster" then CTRL.transAlpha = math.max(0, CTRL.transAlpha - cdt / CFG.holsterTime) if CTRL.transAlpha <= 0 then CTRL.transition = nil; CTRL.equipped = false end end local kd = 1 - math.exp(-10 * cdt) CTRL.camKickPitch = (CTRL.camKickPitch or 0) * (1 - kd) CTRL.camKickYaw = (CTRL.camKickYaw or 0) * (1 - kd) CTRL.camKickRoll = (CTRL.camKickRoll or 0) * (1 - kd) CTRL.fovKick = (CTRL.fovKick or 0) * (1 - math.min(1, cdt * 12)) if CTRL.equipped then if plr.CameraMode ~= Enum.CameraMode.LockFirstPerson then enterFirstPerson() end local wantAim = (CTRL.aimHold or CTRL.aimToggle) and not CTRL.reloading and not CTRL.inspecting and CTRL.boltTimer <= 0 if wantAim ~= CTRL.prevScoped then CTRL.prevScoped = wantAim playSFX(wantAim and "scope_in" or "scope_out") end CTRL.aimAlpha += ((wantAim and 1 or 0) - CTRL.aimAlpha) * (1 - math.exp(-16 * cdt)) local baseFov = CTRL.savedFOV or CFG.baseFOV cam.FieldOfView += ((baseFov + (CFG.scopeFOV - baseFov) * CTRL.aimAlpha + CTRL.fovKick) - cam.FieldOfView) * (1 - math.exp(-18 * cdt)) if CTRL.savedSens then UIS.MouseDeltaSensitivity = CTRL.savedSens * (cam.FieldOfView / math.max(1, baseFov)) end local breathPitch, breathYaw = 0, 0 if _G.WuzSniperBreathSway and CTRL.aimAlpha > 0.2 then local bAmp = math.rad(0.14) * CTRL.aimAlpha * (1 - 0.65 * CTRL.crouchAlpha) * (CTRL.walking and 0.45 or 1.0) breathPitch = math.sin(CTRL.timeAcc * 1.45) * bAmp breathYaw = math.sin(CTRL.timeAcc * 0.725) * bAmp * 0.75 end local leanRoll = CTRL.leanAlpha * math.rad(-4.5) cam.CFrame = cam.CFrame * CFrame.Angles(CTRL.camKickPitch + breathPitch, CTRL.camKickYaw + breathYaw, CTRL.camKickRoll + leanRoll) end stepCustomMovement(cdt, cam, parts) hideLocalRealBody(parts, true) stepShell(cdt) stepProjectiles(cdt) applyLocalVisuals(evaluateRig(cdt, cam, parts)) updateHUD(cam) end) STATE.connections[#STATE.connections + 1] = RunService.Heartbeat:Connect(function() if not STATE.alive then return end if _G.WuzSniperStop then cleanup(); return end if CTRL.serverBodyHidden ~= true then syncRealBodyVisibility(true) end dispatchF3X(os.clock()) end) STATE.connections[#STATE.connections + 1] = UIS.InputBegan:Connect(function(input, processed) if not STATE.alive or _G.WuzSniperStop or UIS:GetFocusedTextBox() or GuiService.MenuIsOpen then return end if input.UserInputType == Enum.UserInputType.MouseButton1 then if CTRL.equipped and CTRL.transition == nil then fireSniper() end return elseif input.UserInputType == Enum.UserInputType.MouseButton2 then if CTRL.equipped and CTRL.transition == nil then CTRL.aimHold = true; CTRL.inspecting = false end return end if processed then return end local k = input.KeyCode if k == Enum.KeyCode.F or k == Enum.KeyCode.One then toggleEquip() elseif k == Enum.KeyCode.Q then if CTRL.equipped and CTRL.transition == nil then CTRL.aimToggle = not CTRL.aimToggle; CTRL.inspecting = false end elseif k == Enum.KeyCode.R then startReload() elseif k == Enum.KeyCode.V then if CTRL.equipped and CTRL.transition == nil and not CTRL.reloading and CTRL.boltTimer <= 0 and CTRL.postShotHold <= 0 then CTRL.inspecting = not CTRL.inspecting; CTRL.inspectTimer = CTRL.inspecting and CFG.inspectTime or 0; CTRL.aimHold, CTRL.aimToggle = false, false if CTRL.inspecting then playSFX("equip", 0.55, 1.2) end end elseif k == Enum.KeyCode.LeftControl then CTRL.crouchHold = true elseif k == Enum.KeyCode.C then CTRL.crouchToggle = not CTRL.crouchToggle elseif k == Enum.KeyCode.Space then CTRL.jumpBuffer = 0.14 elseif k == Enum.KeyCode.T then paintAll(CFG.themeIdx + 1); playSFX("scope_zoom"); print("[WuzSniper] Theme:", THEMES[CFG.themeIdx].name) elseif k == Enum.KeyCode.B then builtCount = buildOrScan(); print(string.format("[WuzSniper] Rescan: %d/%d", builtCount, TOTAL)) elseif k == Enum.KeyCode.F6 then cleanup() end end) STATE.connections[#STATE.connections + 1] = UIS.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton2 then CTRL.aimHold = false elseif input.KeyCode == Enum.KeyCode.LeftControl then CTRL.crouchHold = false end end) STATE.connections[#STATE.connections + 1] = UIS.WindowFocusReleased:Connect(function() CTRL.aimHold = false; CTRL.crouchHold = false end) STATE.connections[#STATE.connections + 1] = UIS.InputChanged:Connect(function(input) if not STATE.alive or not CTRL.equipped then return end if input.UserInputType == Enum.UserInputType.MouseWheel and (CTRL.aimHold or CTRL.aimToggle) then local prev = CFG.scopeFOV CFG.scopeFOV = math.clamp(CFG.scopeFOV - input.Position.Z * 3, 7, 38) if CFG.scopeFOV ~= prev then playSFX("scope_zoom") end end end) STATE.connections[#STATE.connections + 1] = plr.CharacterAdded:Connect(function() STATE.cachedTool, STATE.cachedEndpoint, STATE.checkedBackpack = nil, nil, false CTRL.rayDirty, CTRL.serverBodyHidden, CTRL.moveRestored = true, nil, true CTRL.savedFaceTrans, CTRL.savedDefaultSounds, CTRL.moveVelXZ, CTRL.lowerYaw = {}, {}, V(), nil if CTRL.equipped or CTRL.transition ~= nil then CTRL.equipped, CTRL.transition, CTRL.aimHold, CTRL.aimToggle, CTRL.aimAlpha, CTRL.prevScoped = false, nil, false, false, 0, false restoreCameraAndMouse() end task.delay(0.5, function() if STATE.alive and not _G.WuzSniperStop then paintAll(CFG.themeIdx); syncRealBodyVisibility(true) end end) end) return { started = true, blocks = builtCount, total = TOTAL, theme = THEMES[CFG.themeIdx].name, soundMode = SFX.mode, drawingMode = DRAW.isSunc and "sUNC" or "UNC", mustEquipTool = STATE.mustEquipTool, }