--==========================================================================================-- -- MANKI 2K - STUNT SYSTEM WITH BIND EDITOR (FULL VERSION) --==========================================================================================-- -- === BINDS (editable via GUI) === local BINDS = { STOPPIE = Enum.KeyCode.H, WHEELIE = Enum.KeyCode.P, JUMP = Enum.KeyCode.C } -- === PARAMETERS === local ANGLE_STOPPIE = 43 local ANGLE_WHEELIE = 40 local TURN_SPEED = 2.5 local JUMP_POWER = 50 local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local CoreGui = game:GetService("CoreGui") local LocalPlayer = Players.LocalPlayer local activeStunt = nil local mainConnection = nil local lockedSpeedMagnitude = 0 local currentHeadingAngle = 0 local originalMaterials = {} local waitingForBind = nil -- режим ожидания нажатия для смены бинда -- === HELPER FUNCTIONS === local function getBikeElements() local character = LocalPlayer.Character if not character then return nil, nil end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid or not humanoid.Sit then return nil, nil end local seat = humanoid.SeatPart if seat and seat:IsA("VehicleSeat") then pcall(function() if setnetworkowner then setnetworkowner(seat, LocalPlayer) end end) end local bike = character:FindFirstChildOfClass("Model") or game.Workspace:FindFirstChild(LocalPlayer.Name .. "'s Bike") return seat, bike end local function toggleFriction(disable) local _, bike = getBikeElements() if not bike then return end for _, part in pairs(bike:GetDescendants()) do if part:IsA("BasePart") and (string.find(string.lower(part.Name), "wheel") or string.find(string.lower(part.Name), "tire")) then if disable then if not originalMaterials[part] then originalMaterials[part] = part.CustomPhysicalProperties or PhysicalProperties.new(part.Material) end part.CustomPhysicalProperties = PhysicalProperties.new(0.7, 0, 0, 1, 1) else if originalMaterials[part] then part.CustomPhysicalProperties = originalMaterials[part] end end end end end local function stopAllStunts() if mainConnection then mainConnection:Disconnect() mainConnection = nil end toggleFriction(false) originalMaterials = {} lockedSpeedMagnitude = 0 currentHeadingAngle = 0 activeStunt = nil local seat, _ = getBikeElements() if seat and seat:IsA("VehicleSeat") then seat.AssemblyAngularVelocity = Vector3.new(0, 0, 0) end print("[Stunt System]: Physics fully restored.") end -- === STUNT LOGIC === local function processStuntLogic(deltaTime) if not activeStunt then return end local seat, _ = getBikeElements() if not seat or not seat:IsA("VehicleSeat") then stopAllStunts() return end if UserInputService:IsKeyDown(Enum.KeyCode.A) or UserInputService:IsKeyDown(Enum.KeyCode.Left) then currentHeadingAngle = currentHeadingAngle + (TURN_SPEED * deltaTime) elseif UserInputService:IsKeyDown(Enum.KeyCode.D) or UserInputService:IsKeyDown(Enum.KeyCode.Right) then currentHeadingAngle = currentHeadingAngle - (TURN_SPEED * deltaTime) end local baseCFrame = CFrame.Angles(0, currentHeadingAngle, 0) local flatLook = baseCFrame.LookVector.Unit local targetRadX = 0 if activeStunt == "Stoppie" then targetRadX = math.rad(-ANGLE_STOPPIE) elseif activeStunt == "Wheelie" then targetRadX = math.rad(ANGLE_WHEELIE) end seat.CFrame = CFrame.new(seat.Position) * CFrame.Angles(0, currentHeadingAngle, 0) * CFrame.Angles(targetRadX, 0, 0) local currentYVelocity = seat.AssemblyLinearVelocity.Y seat.AssemblyLinearVelocity = Vector3.new(flatLook.X * lockedSpeedMagnitude, currentYVelocity, flatLook.Z * lockedSpeedMagnitude) seat.AssemblyAngularVelocity = Vector3.new(0, 0, 0) end -- === INPUT HANDLER (with dynamic binds) === UserInputService.InputBegan:Connect(function(input, gameProcessed) if gameProcessed then return end -- Если мы в режиме ожидания бинда - не обрабатываем действия if waitingForBind then return end local seat, _ = getBikeElements() if not seat then return end -- Jump if input.KeyCode == BINDS.JUMP then seat.AssemblyLinearVelocity = Vector3.new(seat.AssemblyLinearVelocity.X, JUMP_POWER, seat.AssemblyLinearVelocity.Z) print("[Stunt System]: Jump!") end -- Stoppie if input.KeyCode == BINDS.STOPPIE then if activeStunt == "Stoppie" then stopAllStunts() elseif activeStunt == nil then activeStunt = "Stoppie" print("[Stunt System]: STOPPIE activated.") local _, y, _ = seat.CFrame:ToEulerAnglesXYZ() currentHeadingAngle = y local speed = seat.AssemblyLinearVelocity.Magnitude lockedSpeedMagnitude = math.clamp(speed, 45, 80) toggleFriction(true) mainConnection = RunService.Heartbeat:Connect(processStuntLogic) end end -- Wheelie if input.KeyCode == BINDS.WHEELIE then if activeStunt == "Wheelie" then stopAllStunts() elseif activeStunt == nil then activeStunt = "Wheelie" print("[Stunt System]: WHEELIE activated.") local _, y, _ = seat.CFrame:ToEulerAnglesXYZ() currentHeadingAngle = y local speed = seat.AssemblyLinearVelocity.Magnitude lockedSpeedMagnitude = math.clamp(speed, 45, 80) toggleFriction(true) mainConnection = RunService.Heartbeat:Connect(processStuntLogic) end end end) -- === BIND CHANGE HANDLER === UserInputService.InputBegan:Connect(function(input, gameProcessed) if not waitingForBind then return end if gameProcessed then return end -- Ignore modifier keys and system keys if input.KeyCode == Enum.KeyCode.Unknown then return end if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift or input.KeyCode == Enum.KeyCode.LeftControl or input.KeyCode == Enum.KeyCode.RightControl or input.KeyCode == Enum.KeyCode.LeftAlt or input.KeyCode == Enum.KeyCode.RightAlt then return end -- Save new bind BINDS[waitingForBind] = input.KeyCode print("[Stunt System]: Bind for " .. waitingForBind .. " changed to " .. tostring(input.KeyCode)) waitingForBind = nil -- Refresh GUI createStuntMenu() end) LocalPlayer.CharacterRemoving:Connect(stopAllStunts) --==========================================================================================-- -- GUI MENU WITH BIND EDITOR --==========================================================================================-- function createStuntMenu() local oldGui = CoreGui:FindFirstChild("MankiStuntMenu") if oldGui then oldGui:Destroy() end local screenGui = Instance.new("ScreenGui") screenGui.Name = "MankiStuntMenu" screenGui.ResetOnSpawn = false local success, _ = pcall(function() screenGui.Parent = CoreGui end) if not success then screenGui.Parent = LocalPlayer:WaitForChild("PlayerGui") end -- Bigger frame for bind buttons local mainFrame = Instance.new("Frame") mainFrame.Size = UDim2.new(0, 280, 0, 340) mainFrame.Position = UDim2.new(0.05, 0, 0.35, 0) mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25) mainFrame.BorderSizePixel = 0 mainFrame.Active = true mainFrame.Draggable = true mainFrame.Parent = screenGui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 8) corner.Parent = mainFrame local title = Instance.new("TextLabel") title.Size = UDim2.new(1, 0, 0, 30) title.BackgroundColor3 = Color3.fromRGB(35, 35, 35) title.Text = "MANKI 2K - SETTINGS" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.SourceSansBold title.TextSize = 16 title.Parent = mainFrame local titleCorner = Instance.new("UICorner") titleCorner.CornerRadius = UDim.new(0, 8) titleCorner.Parent = title -- === SLIDER CREATOR === local function createSlider(yPosition, labelText, defaultValue, callback) local textLabel = Instance.new("TextLabel") textLabel.Size = UDim2.new(1, -20, 0, 20) textLabel.Position = UDim2.new(0, 10, 0, yPosition) textLabel.BackgroundTransparency = 1 textLabel.Text = labelText .. ": " .. defaultValue textLabel.TextColor3 = Color3.fromRGB(200, 200, 200) textLabel.Font = Enum.Font.SourceSans textLabel.TextSize = 14 textLabel.TextXAlignment = Enum.TextXAlignment.Left textLabel.Parent = mainFrame local sliderTrack = Instance.new("Frame") sliderTrack.Size = UDim2.new(1, -20, 0, 6) sliderTrack.Position = UDim2.new(0, 10, 0, yPosition + 22) sliderTrack.BackgroundColor3 = Color3.fromRGB(50, 50, 50) sliderTrack.BorderSizePixel = 0 sliderTrack.Parent = mainFrame local sliderFill = Instance.new("Frame") sliderFill.Size = UDim2.new(defaultValue / 100, 0, 1, 0) sliderFill.BackgroundColor3 = Color3.fromRGB(0, 120, 255) sliderFill.BorderSizePixel = 0 sliderFill.Parent = sliderTrack local sliderButton = Instance.new("ImageButton") sliderButton.Size = UDim2.new(0, 14, 0, 14) sliderButton.Position = UDim2.new(defaultValue / 100, -7, 0.5, -7) sliderButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255) sliderButton.BorderSizePixel = 0 sliderButton.Parent = sliderTrack local buttonCorner = Instance.new("UICorner") buttonCorner.CornerRadius = UDim.new(1, 0) buttonCorner.Parent = sliderButton local dragging = false local function updateSlider(input) local originalX = sliderTrack.AbsolutePosition.X local width = sliderTrack.AbsoluteSize.X local mouseX = input.Position.X local percentage = math.clamp((mouseX - originalX) / width, 0, 1) local value = math.round(percentage * 100) sliderButton.Position = UDim2.new(percentage, -7, 0.5, -7) sliderFill.Size = UDim2.new(percentage, 0, 1, 0) textLabel.Text = labelText .. ": " .. value callback(value) end sliderButton.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) UserInputService.InputChanged:Connect(function(input) if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then updateSlider(input) end end) end -- === BIND BUTTON CREATOR === local function createBindButton(yPosition, labelText, bindKey, bindName) local frame = Instance.new("Frame") frame.Size = UDim2.new(1, -20, 0, 28) frame.Position = UDim2.new(0, 10, 0, yPosition) frame.BackgroundTransparency = 1 frame.Parent = mainFrame local label = Instance.new("TextLabel") label.Size = UDim2.new(0.5, 0, 1, 0) label.Position = UDim2.new(0, 0, 0, 0) label.BackgroundTransparency = 1 label.Text = labelText label.TextColor3 = Color3.fromRGB(200, 200, 200) label.Font = Enum.Font.SourceSans label.TextSize = 14 label.TextXAlignment = Enum.TextXAlignment.Left label.Parent = frame local button = Instance.new("TextButton") button.Size = UDim2.new(0, 80, 1, -4) button.Position = UDim2.new(0.6, 0, 0, 2) button.BackgroundColor3 = Color3.fromRGB(60, 60, 60) button.Text = tostring(bindKey):gsub("Enum.KeyCode.", "") button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Font = Enum.Font.SourceSansBold button.TextSize = 13 button.BorderSizePixel = 0 button.Parent = frame local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 4) btnCorner.Parent = button button.MouseButton1Click:Connect(function() if waitingForBind then print("[Stunt System]: Already waiting for bind: " .. waitingForBind) return end waitingForBind = bindName button.Text = "PRESS KEY" button.BackgroundColor3 = Color3.fromRGB(200, 50, 50) print("[Stunt System]: Waiting for key press for " .. bindName) end) end -- === Sliders === createSlider(45, "WHEELIE ANGLE", ANGLE_WHEELIE, function(value) ANGLE_WHEELIE = value end) createSlider(110, "STOPPIE ANGLE", ANGLE_STOPPIE, function(value) ANGLE_STOPPIE = value end) -- === Bind buttons === createBindButton(175, "Wheelie Key", BINDS.WHEELIE, "WHEELIE") createBindButton(208, "Stoppie Key", BINDS.STOPPIE, "STOPPIE") createBindButton(241, "Jump Key", BINDS.JUMP, "JUMP") -- Info text local infoLabel = Instance.new("TextLabel") infoLabel.Size = UDim2.new(1, -20, 0, 20) infoLabel.Position = UDim2.new(0, 10, 0, 278) infoLabel.BackgroundTransparency = 1 infoLabel.Text = "Click bind button then press new key" infoLabel.TextColor3 = Color3.fromRGB(150, 150, 150) infoLabel.Font = Enum.Font.SourceSans infoLabel.TextSize = 11 infoLabel.TextXAlignment = Enum.TextXAlignment.Left infoLabel.Parent = mainFrame end -- Init createStuntMenu() print("[Manki 2K]: Loaded! Binds can be changed via GUI.")