Rojhann10

Untitled

Jan 10th, 2026
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.69 KB | None | 0 0
  1. -- Create ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Name = "CircleGui"
  4. screenGui.ResetOnSpawn = false
  5. screenGui.IgnoreGuiInset = true
  6. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  7.  
  8. -- Function to get jump button
  9. local function getJumpButton()
  10. local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  11. local touchGui = playerGui:FindFirstChild("TouchGui")
  12. if touchGui then
  13. local touchControlFrame = touchGui:FindFirstChild("TouchControlFrame")
  14. if touchControlFrame then
  15. local jumpButton = touchControlFrame:FindFirstChild("JumpButton")
  16. if jumpButton and jumpButton:IsA("ImageButton") then
  17. return jumpButton
  18. end
  19. end
  20. end
  21. return nil
  22. end
  23.  
  24. local jumpButton = getJumpButton()
  25.  
  26. -- Outer black circle
  27. local outerCircle = Instance.new("Frame")
  28. outerCircle.Name = "OuterCircleFrame"
  29. outerCircle.AnchorPoint = Vector2.new(0.5, 0.5)
  30. outerCircle.BackgroundColor3 = Color3.new(0, 0, 0)
  31. outerCircle.BackgroundTransparency = 0.4
  32. outerCircle.BorderSizePixel = 0
  33. outerCircle.Parent = screenGui
  34.  
  35. -- Outer white outline
  36. local outerStroke = Instance.new("UIStroke")
  37. outerStroke.Color = Color3.new(1, 1, 1)
  38. outerStroke.Thickness = 2
  39. outerStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  40. outerStroke.Parent = outerCircle
  41.  
  42. local outerCorner = Instance.new("UICorner")
  43. outerCorner.CornerRadius = UDim.new(1, 0)
  44. outerCorner.Parent = outerCircle
  45.  
  46. -- Inner grey transparent button
  47. local innerButton = Instance.new("TextButton")
  48. innerButton.Name = "InnerButton"
  49. innerButton.AnchorPoint = Vector2.new(0.5, 0.5)
  50. innerButton.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
  51. innerButton.BackgroundTransparency = 0.4
  52. innerButton.BorderSizePixel = 0
  53. innerButton.Text = "⬆️"
  54. innerButton.TextScaled = true
  55. innerButton.Font = Enum.Font.SourceSansBold
  56. innerButton.TextColor3 = Color3.new(1, 1, 1)
  57. innerButton.Parent = outerCircle
  58.  
  59. -- More padding so text becomes smaller
  60. local padding = Instance.new("UIPadding")
  61. padding.PaddingTop = UDim.new(0.2, 0)
  62. padding.PaddingBottom = UDim.new(0.2, 0)
  63. padding.PaddingLeft = UDim.new(0.2, 0)
  64. padding.PaddingRight = UDim.new(0.2, 0)
  65. padding.Parent = innerButton
  66.  
  67. -- White outline for inner button
  68. local innerStroke = Instance.new("UIStroke")
  69. innerStroke.Color = Color3.new(1, 1, 1)
  70. innerStroke.Thickness = 2
  71. innerStroke.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  72. innerStroke.Parent = innerButton
  73.  
  74. local innerCorner = Instance.new("UICorner")
  75. innerCorner.CornerRadius = UDim.new(1, 0)
  76. innerCorner.Parent = innerButton
  77.  
  78. -- Function to keep aligned with jump button
  79. local function updateCircles()
  80. if jumpButton then
  81. local size = jumpButton.Size
  82. local position = jumpButton.Position
  83.  
  84. outerCircle.Size = UDim2.new(size.X.Scale, size.X.Offset + 14, size.Y.Scale, size.Y.Offset + 14)
  85. outerCircle.Position = position
  86.  
  87. innerButton.Size = UDim2.new(1, -14, 1, -14)
  88. innerButton.Position = UDim2.new(0.5, 0, 0.5, 0)
  89. else
  90. outerCircle.Size = UDim2.new(0, 90, 0, 90)
  91. outerCircle.Position = UDim2.new(1, -100, 1, -100)
  92. innerButton.Size = UDim2.new(1, -14, 1, -14)
  93. innerButton.Position = UDim2.new(0.5, 0, 0.5, 0)
  94. end
  95. end
  96.  
  97. game:GetService("RunService").RenderStepped:Connect(updateCircles)
  98.  
  99. local RunService = game:GetService("RunService")
  100.  
  101. -- Continuously hide the default jump button
  102. RunService.RenderStepped:Connect(function()
  103. local jb = getJumpButton()
  104. if jb then
  105. jb.Visible = false
  106. end
  107. end)
  108. -- ✅ Jump logic with hold support and no floating
  109. local holding = false
  110. local jumpDelay = 0.0 -- seconds between jumps while holding
  111.  
  112. local function tryJump()
  113. local player = game.Players.LocalPlayer
  114. local character = player.Character or player.CharacterAdded:Wait()
  115. local humanoid = character:FindFirstChildOfClass("Humanoid")
  116. if humanoid then
  117. local state = humanoid:GetState()
  118. if humanoid.FloorMaterial ~= Enum.Material.Air
  119. or state == Enum.HumanoidStateType.Swimming
  120. or state == Enum.HumanoidStateType.Climbing
  121. or state == Enum.HumanoidStateType.Seated then
  122. humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  123. end
  124. end
  125. end
  126.  
  127. innerButton.MouseButton1Down:Connect(function()
  128. holding = true
  129. while holding do
  130. tryJump()
  131. task.wait(jumpDelay)
  132. end
  133. end)
  134.  
  135. innerButton.MouseButton1Up:Connect(function()
  136. holding = false
  137. end)
  138.  
  139. -- Extra safety for touch devices (ends hold if touch stops outside button)
  140. innerButton.MouseLeave:Connect(function()
  141. holding = false
  142. end)
Advertisement
Add Comment
Please, Sign In to add comment