-- Merged Admin LocalScript with fixed WallWalk -- Place in StarterPlayerScripts or a LocalScript under StarterGui (for admins) -- NOTE: Only the wallwalk subsystem was replaced/updated. Everything else preserved. -- Services local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local RunService = game:GetService("RunService") local Workspace = game:GetService("Workspace") local player = Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local hrp = character:WaitForChild("HumanoidRootPart") -- GUI local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui")) screenGui.Name = "RainbowHackGui" screenGui.ResetOnSpawn = false local frame = Instance.new("Frame", screenGui) frame.Size = UDim2.new(0, 300, 0, 280) frame.Position = UDim2.new(0, 50, 0, 50) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.Active = true frame.Draggable = true frame.BorderSizePixel = 0 -- Rainbow Outline local outline = Instance.new("UIStroke", frame) outline.Thickness = 3 -- Rainbow Effect task.spawn(function() while true do for i = 0, 1, 0.01 do local color = Color3.fromHSV(i, 1, 1) outline.Color = color task.wait(0.03) end end end) -- UI Elements local function createButton(name, yPos) local btn = Instance.new("TextButton", frame) btn.Size = UDim2.new(1, -20, 0, 25) btn.Position = UDim2.new(0, 10, 0, yPos) btn.Text = name btn.BackgroundColor3 = Color3.fromRGB(60, 60, 60) btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.BorderSizePixel = 0 btn.Font = Enum.Font.SourceSans btn.TextSize = 18 return btn end local function createBox(placeholder, yPos) local box = Instance.new("TextBox", frame) box.Size = UDim2.new(1, -20, 0, 25) box.Position = UDim2.new(0, 10, 0, yPos) box.PlaceholderText = placeholder box.BackgroundColor3 = Color3.fromRGB(50, 50, 50) box.TextColor3 = Color3.fromRGB(255, 255, 255) box.BorderSizePixel = 0 box.Font = Enum.Font.SourceSans box.TextSize = 18 return box end -- Buttons local flyBtn = createButton("Toggle Fly", 10) local noclipBtn = createButton("Toggle NoClip", 40) local wallwalkBtn = createButton("Toggle WallWalk", 70) local speedBox = createBox("WalkSpeed (Default 16)", 100) local jumpBox = createBox("JumpPower (Default 50)", 130) local infJumpBtn = createButton("Toggle Inf Jump", 160) -- NEW BUTTON -- Infinite Jump (toggleable now) local infJump = false UIS.JumpRequest:Connect(function() if infJump and humanoid then humanoid:ChangeState(Enum.HumanoidStateType.Jumping) end end) -- Fly Function local flying = false local flyVel, flyGyro local function setFly(state) flying = state if flying then -- if wallwalk is active, disable it while flying if wallwalk and startWallWalkUpdate then wallwalk = false pcall(stopWallWalk) pcall(stopWallWalkUpdate) wallwalkBtn.Text = "WallWalk (Off)" end flyVel = Instance.new("BodyVelocity", hrp) flyVel.Velocity = Vector3.zero flyVel.MaxForce = Vector3.new(1e5, 1e5, 1e5) flyGyro = Instance.new("BodyGyro", hrp) flyGyro.CFrame = hrp.CFrame flyGyro.MaxTorque = Vector3.new(1e5, 1e5, 1e5) RunService:BindToRenderStep("Fly", Enum.RenderPriority.Character.Value + 1, function() local move = Vector3.zero local cam = Workspace.CurrentCamera if UIS:IsKeyDown(Enum.KeyCode.W) then move = move + cam.CFrame.LookVector end if UIS:IsKeyDown(Enum.KeyCode.S) then move = move - cam.CFrame.LookVector end if UIS:IsKeyDown(Enum.KeyCode.A) then move = move - cam.CFrame.RightVector end if UIS:IsKeyDown(Enum.KeyCode.D) then move = move + cam.CFrame.RightVector end if UIS:IsKeyDown(Enum.KeyCode.Space) then move = move + Vector3.new(0, 1, 0) end if UIS:IsKeyDown(Enum.KeyCode.LeftShift) then move = move - Vector3.new(0, 1, 0) end flyVel.Velocity = move.Magnitude > 0 and move.Unit * 50 or Vector3.zero if flyGyro then flyGyro.CFrame = cam.CFrame end end) else if flyVel then flyVel:Destroy(); flyVel = nil end if flyGyro then flyGyro:Destroy(); flyGyro = nil end pcall(function() RunService:UnbindFromRenderStep("Fly") end) end end -- NoClip local noclip = false RunService.Stepped:Connect(function() if noclip and character and character.Parent then for _, part in pairs(character:GetDescendants()) do if part:IsA("BasePart") then part.CanCollide = false end end end end) -- ===== Fixed / Improved WallWalk Implementation (replaces old simple block) ===== local wallwalk = false -- toggled by GUI local isWallWalking = false -- Tunable parameters (adjust to taste) local STICK_DISTANCE = 3 -- how far to raycast to find walls local RAYCAST_ANGLE_COUNT = 7 -- number of rays around player local STICK_FORCE = 60 -- base push strength into wall local WALL_WALK_SPEED = 40 -- movement speed along wall local MAX_STICK_TIME = 60 -- safety timeout seconds local ORIENTATION_SMOOTH = 0.22 -- 0..1 lerp amount for smoothing orientation local VERT_COMPENSATION = 18 -- upward velocity to counter gravity while wallwalking -- Body objects local stickBodyVelocity = nil local stickBodyGyro = nil local renderConn -- RenderStepped connection local stickStartTime = 0 local function createBodies() if stickBodyVelocity then stickBodyVelocity:Destroy() end if stickBodyGyro then stickBodyGyro:Destroy() end stickBodyVelocity = Instance.new("BodyVelocity") stickBodyVelocity.MaxForce = Vector3.new(1e5, 1e5, 1e5) stickBodyVelocity.P = 3000 stickBodyVelocity.Velocity = Vector3.new(0,0,0) stickBodyVelocity.Parent = hrp stickBodyGyro = Instance.new("BodyGyro") stickBodyGyro.MaxTorque = Vector3.new(1e5, 1e5, 1e5) stickBodyGyro.D = 200 stickBodyGyro.Parent = hrp end local function destroyBodies() if stickBodyVelocity then pcall(function() stickBodyVelocity:Destroy() end) stickBodyVelocity = nil end if stickBodyGyro then pcall(function() stickBodyGyro:Destroy() end) stickBodyGyro = nil end -- restore humanoid autorotate if humanoid and humanoid.Parent then pcall(function() humanoid.AutoRotate = true end) end end -- Returns hit (RaycastResult) and distance from cast origin (or nil) local function findWall() local origin = hrp.Position local bestHit = nil local bestDist = STICK_DISTANCE + 0.1 local verticalOffsets = {0, 1, -1} for _, vOff in ipairs(verticalOffsets) do for i = 1, RAYCAST_ANGLE_COUNT do local theta = (i - 1) / RAYCAST_ANGLE_COUNT * math.pi * 2 local dir = Vector3.new(math.cos(theta), 0, math.sin(theta)) local castOrigin = origin + Vector3.new(0, vOff, 0) local params = RaycastParams.new() params.FilterDescendantsInstances = {character} params.FilterType = Enum.RaycastFilterType.Blacklist params.IgnoreWater = true local result = Workspace:Raycast(castOrigin, dir.Unit * STICK_DISTANCE, params) if result and result.Instance and result.Position then local dist = (result.Position - castOrigin).Magnitude if dist < bestDist then bestDist = dist bestHit = {Result = result, Dist = dist} end end end end return bestHit -- may be nil end local function wallProjectedVelocity(moveVector, wallNormal) local proj = moveVector - wallNormal * moveVector:Dot(wallNormal) if proj.Magnitude > 0.01 then return proj.Unit * WALL_WALK_SPEED else return Vector3.new(0,0,0) end end local function startWallWalk() if isWallWalking then return end isWallWalking = true stickStartTime = tick() createBodies() -- disable humanoid autorotate so BodyGyro controls orientation cleanly pcall(function() humanoid.AutoRotate = false end) end local function stopWallWalk() if not isWallWalking then return end isWallWalking = false destroyBodies() end local function wallWalkStep() -- if flying, don't try to wallwalk if flying then if isWallWalking then stopWallWalk() end return end if not wallwalk then if isWallWalking then stopWallWalk() end return end -- safety timeout if isWallWalking and (tick() - stickStartTime > MAX_STICK_TIME) then stopWallWalk() return end local hitInfo = findWall() if hitInfo and hitInfo.Result then local result = hitInfo.Result local normal = result.Normal or Vector3.new(0,0,0) local dist = hitInfo.Dist or 0.001 if not isWallWalking then startWallWalk() end -- movement input relative to camera (XZ movement) local move = Vector3.new(0,0,0) local cam = Workspace.CurrentCamera local forward = Vector3.new(cam.CFrame.LookVector.X, 0, cam.CFrame.LookVector.Z) if forward.Magnitude > 0 then forward = forward.Unit end local right = Vector3.new(cam.CFrame.RightVector.X, 0, cam.CFrame.RightVector.Z) if right.Magnitude > 0 then right = right.Unit end if UIS:IsKeyDown(Enum.KeyCode.W) then move = move + forward end if UIS:IsKeyDown(Enum.KeyCode.S) then move = move - forward end if UIS:IsKeyDown(Enum.KeyCode.A) then move = move - right end if UIS:IsKeyDown(Enum.KeyCode.D) then move = move + right end -- vertical movement along wall if UIS:IsKeyDown(Enum.KeyCode.Space) then move = move + Vector3.new(0,1,0) end if UIS:IsKeyDown(Enum.KeyCode.LeftShift) then move = move - Vector3.new(0,1,0) end local desiredVel = wallProjectedVelocity(move, normal) -- scale push into wall by closeness (closer = stronger) local closeness = math.clamp(1 - (dist / STICK_DISTANCE), 0, 1) local pushInto = -normal * (STICK_FORCE * 0.1 * closeness) -- upward compensation to resist gravity while attached (tweak VERT_COMPENSATION) local verticalComp = Vector3.new(0, VERT_COMPENSATION * 0.1 * (0.6 + 0.4 * closeness), 0) if stickBodyVelocity then -- combine desired lateral surface movement, push into wall, and vertical compensation stickBodyVelocity.Velocity = desiredVel + pushInto + verticalComp end -- smooth orientation: orient so "up" = -normal, and look direction aligned with camera projected onto wall tangent if stickBodyGyro then local up = -normal.Unit local camLook = Workspace.CurrentCamera.CFrame.LookVector local lookDir = (camLook - up * camLook:Dot(up)) if lookDir.Magnitude == 0 then lookDir = Vector3.new(0,0,-1) else lookDir = lookDir.Unit end local rightVec = lookDir:Cross(up).Unit local targetCFrame = CFrame.fromMatrix(hrp.Position, rightVec, up) -- smooth lerp from current gyro CFrame to target local current = stickBodyGyro.CFrame -- protect against nil if typeof(current) ~= "CFrame" then stickBodyGyro.CFrame = targetCFrame else stickBodyGyro.CFrame = current:Lerp(targetCFrame, ORIENTATION_SMOOTH) end end else -- no wall close: stop wallwalking if isWallWalking then stopWallWalk() end end end local function startWallWalkUpdate() if renderConn then return end renderConn = RunService.RenderStepped:Connect(function(dt) pcall(wallWalkStep) end) end local function stopWallWalkUpdate() if renderConn then renderConn:Disconnect() renderConn = nil end end -- Button Events (existing) flyBtn.MouseButton1Click:Connect(function() setFly(not flying) flyBtn.Text = flying and "Flying (On)" or "Flying (Off)" end) noclipBtn.MouseButton1Click:Connect(function() noclip = not noclip noclipBtn.Text = noclip and "NoClip (On)" or "NoClip (Off)" end) wallwalkBtn.MouseButton1Click:Connect(function() wallwalk = not wallwalk wallwalkBtn.Text = wallwalk and "WallWalk (On)" or "WallWalk (Off)" if wallwalk then startWallWalkUpdate() else stopWallWalkUpdate() stopWallWalk() end end) infJumpBtn.MouseButton1Click:Connect(function() infJump = not infJump infJumpBtn.Text = infJump and "Inf Jump (On)" or "Inf Jump (Off)" end) speedBox.FocusLost:Connect(function() local val = tonumber(speedBox.Text) if val then humanoid.WalkSpeed = val end end) jumpBox.FocusLost:Connect(function() local val = tonumber(jumpBox.Text) if val then humanoid.JumpPower = val end end) -- Cleanup and respawn handling player.CharacterAdded:Connect(function(char) -- update references character = char humanoid = character:WaitForChild("Humanoid") hrp = character:WaitForChild("HumanoidRootPart") -- ensure states off on respawn flying = false if flyVel then flyVel:Destroy(); flyVel = nil end if flyGyro then flyGyro:Destroy(); flyGyro = nil end pcall(function() RunService:UnbindFromRenderStep("Fly") end) noclip = false infJump = false wallwalk = false -- UI resets flyBtn.Text = "Toggle Fly" noclipBtn.Text = "Toggle NoClip" wallwalkBtn.Text = "Toggle WallWalk" infJumpBtn.Text = "Toggle Inf Jump" speedBox.Text = "" jumpBox.Text = "" -- stop wallwalk systems stopWallWalkUpdate() stopWallWalk() end)