Ppnikabut

freeze junp

Jun 20th, 2025 (edited)
1,692
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.04 KB | None | 0 0
  1. -- FF2 Script: Jump Peak Freeze + GUI + FPS + Texture Removal + Ball Magnet Catch
  2.  
  3. local Players = game:GetService("Players")
  4. local RunService = game:GetService("RunService")
  5. local Lighting = game:GetService("Lighting")
  6. local StatsService = game:GetService("Stats")
  7.  
  8. local lp = Players.LocalPlayer
  9.  
  10. -- Wait for player and character to load
  11. repeat task.wait() until lp and lp.Character and lp:FindFirstChild("PlayerGui")
  12. local char = lp.Character or lp.CharacterAdded:Wait()
  13. local humanoid = char:WaitForChild("Humanoid")
  14. local hrp = char:WaitForChild("HumanoidRootPart")
  15.  
  16. -- FPS Unlocker: Try to set FPS cap to 120 if supported
  17. if setfpscap then pcall(function() setfpscap(120) end) end
  18.  
  19. -- Remove all textures for performance
  20. local function removeTextures()
  21.     for _, obj in ipairs(game:GetDescendants()) do
  22.         if obj:IsA("Texture") or obj:IsA("Decal") or obj:IsA("SurfaceAppearance") or obj:IsA("ShirtGraphic") then
  23.             pcall(function() obj:Destroy() end)
  24.         end
  25.     end
  26. end
  27. removeTextures()
  28.  
  29. -- Continuously remove any new textures added later
  30. game.DescendantAdded:Connect(function(obj)
  31.     if obj:IsA("Texture") or obj:IsA("Decal") or obj:IsA("SurfaceAppearance") or obj:IsA("ShirtGraphic") then
  32.         pcall(function() obj:Destroy() end)
  33.     end
  34. end)
  35.  
  36. -- GUI Setup
  37. local gui = Instance.new("ScreenGui")
  38. gui.Name = "JumpControlGui"
  39. gui.ResetOnSpawn = false
  40. gui.IgnoreGuiInset = false
  41. gui.Parent = lp:WaitForChild("PlayerGui")
  42.  
  43. local frame = Instance.new("Frame")
  44. frame.Size = UDim2.new(0, 200, 0, 100)
  45. frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  46. frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  47. frame.Active = true
  48. frame.Draggable = true
  49. frame.Parent = gui
  50.  
  51. local toggleButton = Instance.new("TextButton")
  52. toggleButton.Size = UDim2.new(1, 0, 0.5, 0)
  53. toggleButton.Position = UDim2.new(0, 0, 0, 0)
  54. toggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
  55. toggleButton.Font = Enum.Font.SourceSansBold
  56. toggleButton.TextSize = 16
  57. toggleButton.TextColor3 = Color3.new(1, 1, 1)
  58. toggleButton.Text = "Freeze: ON"
  59. toggleButton.Parent = frame
  60.  
  61. local minimizeButton = Instance.new("TextButton")
  62. minimizeButton.Size = UDim2.new(1, 0, 0.5, 0)
  63. minimizeButton.Position = UDim2.new(0, 0, 0.5, 0)
  64. minimizeButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
  65. minimizeButton.Font = Enum.Font.SourceSansBold
  66. minimizeButton.TextSize = 14
  67. minimizeButton.TextColor3 = Color3.new(1, 1, 1)
  68. minimizeButton.Text = "Shrink"
  69. minimizeButton.Parent = frame
  70.  
  71. local freezeEnabled = true
  72. local minimized = false
  73.  
  74. toggleButton.MouseButton1Click:Connect(function()
  75.     freezeEnabled = not freezeEnabled
  76.     toggleButton.Text = freezeEnabled and "Freeze: ON" or "Freeze: OFF"
  77.     toggleButton.BackgroundColor3 = freezeEnabled and Color3.fromRGB(0, 170, 0) or Color3.fromRGB(170, 0, 0)
  78. end)
  79.  
  80. minimizeButton.MouseButton1Click:Connect(function()
  81.     minimized = not minimized
  82.     frame.Size = minimized and UDim2.new(0, 120, 0, 30) or UDim2.new(0, 200, 0, 100)
  83.     toggleButton.Visible = not minimized
  84.     minimizeButton.Text = minimized and "Expand" or "Shrink"
  85. end)
  86.  
  87. -- FPS and Ping Display
  88. local statsLabel = Instance.new("TextLabel")
  89. statsLabel.Size = UDim2.new(0, 300, 0, 20)
  90. statsLabel.Position = UDim2.new(1, -310, 0, 5)
  91. statsLabel.AnchorPoint = Vector2.new(0, 0)
  92. statsLabel.BackgroundTransparency = 1
  93. statsLabel.TextColor3 = Color3.new(1, 1, 1)
  94. statsLabel.TextStrokeTransparency = 0.5
  95. statsLabel.Font = Enum.Font.SourceSansBold
  96. statsLabel.TextSize = 16
  97. statsLabel.TextXAlignment = Enum.TextXAlignment.Right
  98. statsLabel.Text = "FPS: -- | Ping: --"
  99. statsLabel.Parent = gui
  100.  
  101. local frameCounter, totalTime = 0, 0
  102. RunService.RenderStepped:Connect(function(dt)
  103.     frameCounter += 1
  104.     totalTime += dt
  105.     if totalTime >= 1 then
  106.         local fps = frameCounter
  107.         frameCounter, totalTime = 0, 0
  108.  
  109.         local ping = "N/A"
  110.         local success, result = pcall(function()
  111.             return math.floor(lp:GetNetworkPing() * 1000)
  112.         end)
  113.         if success and result then
  114.             ping = result .. " ms"
  115.         end
  116.  
  117.         statsLabel.Text = "FPS: " .. fps .. " | Ping: " .. ping
  118.     end
  119. end)
  120.  
  121. -- Jump Peak Freeze Logic (persists after respawn)
  122. local jumping = false
  123. local frozen = false
  124.  
  125. local function onHumanoidStateChanged(_, newState)
  126.     if not freezeEnabled then return end
  127.     if newState == Enum.HumanoidStateType.Jumping then
  128.         jumping = true
  129.     elseif newState == Enum.HumanoidStateType.Freefall and jumping and not frozen then
  130.         task.spawn(function()
  131.             while hrp.Velocity.Y > 0 do task.wait() end
  132.             frozen = true
  133.             local wasAnchored = hrp.Anchored
  134.             hrp.Anchored = true
  135.             wait(0.85)
  136.             hrp.Anchored = wasAnchored
  137.             frozen = false
  138.             jumping = false
  139.         end)
  140.     elseif newState == Enum.HumanoidStateType.Landed then
  141.         jumping = false
  142.     end
  143. end
  144.  
  145. humanoid.StateChanged:Connect(onHumanoidStateChanged)
  146.  
  147. -- Reconnect on respawn to keep script active
  148. lp.CharacterAdded:Connect(function(character)
  149.     char = character
  150.     humanoid = char:WaitForChild("Humanoid")
  151.     hrp = char:WaitForChild("HumanoidRootPart")
  152.     humanoid.StateChanged:Connect(onHumanoidStateChanged)
  153. end)
  154.  
  155. -- Ball magnet catch feature
  156.  
  157. -- Sphere to visualize magnet hitbox
  158. local magnetSphere = Instance.new("Part")
  159. magnetSphere.Shape = Enum.PartType.Ball
  160. magnetSphere.Size = Vector3.new(6.5, 6.5, 6.5) -- diameter = 3.25 radius * 2
  161. magnetSphere.Transparency = 0.8
  162. magnetSphere.Anchored = true
  163. magnetSphere.CanCollide = false
  164. magnetSphere.Material = Enum.Material.Neon
  165. magnetSphere.Color = Color3.fromRGB(255, 165, 0) -- Orange
  166. magnetSphere.Parent = workspace
  167.  
  168. -- Utility function to get ball and catch mode state
  169. local function getBallAndCatchMode()
  170.     local ball = workspace:FindFirstChild("Ball") -- adjust name if needed
  171.     local catchMode = false
  172.     local statusGui = lp:FindFirstChild("PlayerGui") and lp.PlayerGui:FindFirstChild("StatusGui")
  173.     if statusGui then
  174.         local catchLabel = statusGui:FindFirstChild("CatchMode")
  175.         if catchLabel and catchLabel:IsA("BoolValue") then
  176.             catchMode = catchLabel.Value
  177.         elseif catchLabel and catchLabel:IsA("TextLabel") then
  178.             catchMode = catchLabel.Text == "Catch"
  179.         end
  180.     end
  181.     return ball, catchMode
  182. end
  183.  
  184. RunService.Heartbeat:Connect(function()
  185.     local ball, catchMode = getBallAndCatchMode()
  186.     if ball and ball.PrimaryPart and catchMode then
  187.         local hrpPos = hrp.Position
  188.         magnetSphere.Position = ball.PrimaryPart.Position -- Show sphere at ball location
  189.  
  190.         -- Check distance between ball and humanoid root part
  191.         local distance = (ball.PrimaryPart.Position - hrpPos).Magnitude
  192.         if distance <= 3.25 then
  193.             -- Snap ball to humanoid root part (magnet effect)
  194.             ball:SetPrimaryPartCFrame(CFrame.new(hrpPos))
  195.         end
  196.     else
  197.         -- Hide magnetSphere offscreen if no ball or not catch mode
  198.         magnetSphere.Position = Vector3.new(0, -5000, 0)
  199.     end
  200. end)
Advertisement
Add Comment
Please, Sign In to add comment