Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FF2 Script: Jump Peak Freeze + GUI + FPS + Texture Removal + Ball Magnet Catch
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local Lighting = game:GetService("Lighting")
- local StatsService = game:GetService("Stats")
- local lp = Players.LocalPlayer
- -- Wait for player and character to load
- repeat task.wait() until lp and lp.Character and lp:FindFirstChild("PlayerGui")
- local char = lp.Character or lp.CharacterAdded:Wait()
- local humanoid = char:WaitForChild("Humanoid")
- local hrp = char:WaitForChild("HumanoidRootPart")
- -- FPS Unlocker: Try to set FPS cap to 120 if supported
- if setfpscap then pcall(function() setfpscap(120) end) end
- -- Remove all textures for performance
- local function removeTextures()
- for _, obj in ipairs(game:GetDescendants()) do
- if obj:IsA("Texture") or obj:IsA("Decal") or obj:IsA("SurfaceAppearance") or obj:IsA("ShirtGraphic") then
- pcall(function() obj:Destroy() end)
- end
- end
- end
- removeTextures()
- -- Continuously remove any new textures added later
- game.DescendantAdded:Connect(function(obj)
- if obj:IsA("Texture") or obj:IsA("Decal") or obj:IsA("SurfaceAppearance") or obj:IsA("ShirtGraphic") then
- pcall(function() obj:Destroy() end)
- end
- end)
- -- GUI Setup
- local gui = Instance.new("ScreenGui")
- gui.Name = "JumpControlGui"
- gui.ResetOnSpawn = false
- gui.IgnoreGuiInset = false
- gui.Parent = lp:WaitForChild("PlayerGui")
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 200, 0, 100)
- frame.Position = UDim2.new(0.5, -100, 0.5, -50)
- frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
- frame.Active = true
- frame.Draggable = true
- frame.Parent = gui
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(1, 0, 0.5, 0)
- toggleButton.Position = UDim2.new(0, 0, 0, 0)
- toggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
- toggleButton.Font = Enum.Font.SourceSansBold
- toggleButton.TextSize = 16
- toggleButton.TextColor3 = Color3.new(1, 1, 1)
- toggleButton.Text = "Freeze: ON"
- toggleButton.Parent = frame
- local minimizeButton = Instance.new("TextButton")
- minimizeButton.Size = UDim2.new(1, 0, 0.5, 0)
- minimizeButton.Position = UDim2.new(0, 0, 0.5, 0)
- minimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- minimizeButton.Font = Enum.Font.SourceSansBold
- minimizeButton.TextSize = 14
- minimizeButton.TextColor3 = Color3.new(1, 1, 1)
- minimizeButton.Text = "Shrink"
- minimizeButton.Parent = frame
- local freezeEnabled = true
- local minimized = false
- toggleButton.MouseButton1Click:Connect(function()
- freezeEnabled = not freezeEnabled
- toggleButton.Text = freezeEnabled and "Freeze: ON" or "Freeze: OFF"
- toggleButton.BackgroundColor3 = freezeEnabled and Color3.fromRGB(0, 170, 0) or Color3.fromRGB(170, 0, 0)
- end)
- minimizeButton.MouseButton1Click:Connect(function()
- minimized = not minimized
- frame.Size = minimized and UDim2.new(0, 120, 0, 30) or UDim2.new(0, 200, 0, 100)
- toggleButton.Visible = not minimized
- minimizeButton.Text = minimized and "Expand" or "Shrink"
- end)
- -- FPS and Ping Display
- local statsLabel = Instance.new("TextLabel")
- statsLabel.Size = UDim2.new(0, 300, 0, 20)
- statsLabel.Position = UDim2.new(1, -310, 0, 5)
- statsLabel.AnchorPoint = Vector2.new(0, 0)
- statsLabel.BackgroundTransparency = 1
- statsLabel.TextColor3 = Color3.new(1, 1, 1)
- statsLabel.TextStrokeTransparency = 0.5
- statsLabel.Font = Enum.Font.SourceSansBold
- statsLabel.TextSize = 16
- statsLabel.TextXAlignment = Enum.TextXAlignment.Right
- statsLabel.Text = "FPS: -- | Ping: --"
- statsLabel.Parent = gui
- local frameCounter, totalTime = 0, 0
- RunService.RenderStepped:Connect(function(dt)
- frameCounter += 1
- totalTime += dt
- if totalTime >= 1 then
- local fps = frameCounter
- frameCounter, totalTime = 0, 0
- local ping = "N/A"
- local success, result = pcall(function()
- return math.floor(lp:GetNetworkPing() * 1000)
- end)
- if success and result then
- ping = result .. " ms"
- end
- statsLabel.Text = "FPS: " .. fps .. " | Ping: " .. ping
- end
- end)
- -- Jump Peak Freeze Logic (persists after respawn)
- local jumping = false
- local frozen = false
- local function onHumanoidStateChanged(_, newState)
- if not freezeEnabled then return end
- if newState == Enum.HumanoidStateType.Jumping then
- jumping = true
- elseif newState == Enum.HumanoidStateType.Freefall and jumping and not frozen then
- task.spawn(function()
- while hrp.Velocity.Y > 0 do task.wait() end
- frozen = true
- local wasAnchored = hrp.Anchored
- hrp.Anchored = true
- wait(0.85)
- hrp.Anchored = wasAnchored
- frozen = false
- jumping = false
- end)
- elseif newState == Enum.HumanoidStateType.Landed then
- jumping = false
- end
- end
- humanoid.StateChanged:Connect(onHumanoidStateChanged)
- -- Reconnect on respawn to keep script active
- lp.CharacterAdded:Connect(function(character)
- char = character
- humanoid = char:WaitForChild("Humanoid")
- hrp = char:WaitForChild("HumanoidRootPart")
- humanoid.StateChanged:Connect(onHumanoidStateChanged)
- end)
- -- Ball magnet catch feature
- -- Sphere to visualize magnet hitbox
- local magnetSphere = Instance.new("Part")
- magnetSphere.Shape = Enum.PartType.Ball
- magnetSphere.Size = Vector3.new(6.5, 6.5, 6.5) -- diameter = 3.25 radius * 2
- magnetSphere.Transparency = 0.8
- magnetSphere.Anchored = true
- magnetSphere.CanCollide = false
- magnetSphere.Material = Enum.Material.Neon
- magnetSphere.Color = Color3.fromRGB(255, 165, 0) -- Orange
- magnetSphere.Parent = workspace
- -- Utility function to get ball and catch mode state
- local function getBallAndCatchMode()
- local ball = workspace:FindFirstChild("Ball") -- adjust name if needed
- local catchMode = false
- local statusGui = lp:FindFirstChild("PlayerGui") and lp.PlayerGui:FindFirstChild("StatusGui")
- if statusGui then
- local catchLabel = statusGui:FindFirstChild("CatchMode")
- if catchLabel and catchLabel:IsA("BoolValue") then
- catchMode = catchLabel.Value
- elseif catchLabel and catchLabel:IsA("TextLabel") then
- catchMode = catchLabel.Text == "Catch"
- end
- end
- return ball, catchMode
- end
- RunService.Heartbeat:Connect(function()
- local ball, catchMode = getBallAndCatchMode()
- if ball and ball.PrimaryPart and catchMode then
- local hrpPos = hrp.Position
- magnetSphere.Position = ball.PrimaryPart.Position -- Show sphere at ball location
- -- Check distance between ball and humanoid root part
- local distance = (ball.PrimaryPart.Position - hrpPos).Magnitude
- if distance <= 3.25 then
- -- Snap ball to humanoid root part (magnet effect)
- ball:SetPrimaryPartCFrame(CFrame.new(hrpPos))
- end
- else
- -- Hide magnetSphere offscreen if no ball or not catch mode
- magnetSphere.Position = Vector3.new(0, -5000, 0)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment