Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local TouchGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local JumpButton = Instance.new("ImageButton")
- --Properties:
- TouchGui.Name = "TouchGui"
- TouchGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- TouchGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- TouchGui.ResetOnSpawn = false
- Frame.Parent = TouchGui
- Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Frame.BackgroundTransparency = 1.000
- Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Frame.BorderSizePixel = 0
- Frame.Position = UDim2.new(0.768423378, 0, 0.65143925, 0)
- Frame.Size = UDim2.new(0, 90, 0, 90)
- JumpButton.Name = "JumpButton"
- JumpButton.Parent = Frame
- JumpButton.BackgroundTransparency = 1.000
- JumpButton.Size = UDim2.new(1, 0, 1, 0)
- JumpButton.Image = "http://www.roblox.com/asset/?id=15336783491"
- JumpButton.PressedImage = "http://www.roblox.com/asset/?id=15336787588"
- -- Scripts:
- local function QVALUN_fake_script() -- JumpButton.LocalScript
- local script = Instance.new('LocalScript', JumpButton)
- -- Reference to the ImageButton
- local imageButton = script.Parent
- -- Flag to check if the button is held
- local buttonHeld = false
- -- Function to make the player jump with a minimum jump power of 50
- local function makePlayerJump()
- -- Get the LocalPlayer
- local player = game.Players.LocalPlayer
- -- Ensure the player character exists and has a Humanoid
- if player and player.Character and player.Character:FindFirstChildOfClass("Humanoid") then
- local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
- -- Save the original JumpPower
- local originalJumpPower = humanoid.JumpPower
- -- Ensure the JumpPower is at least 50
- if humanoid.JumpPower < 50 then
- humanoid.JumpPower = 50
- end
- -- Make the character jump
- humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- -- Restore the original JumpPower after a short delay
- wait(0.1)
- humanoid.JumpPower = originalJumpPower
- else
- warn("Character or Humanoid not found")
- end
- end
- -- Function to handle button press
- local function onButtonDown()
- buttonHeld = true
- while buttonHeld do
- makePlayerJump()
- wait(0.1) -- Adjust the interval as needed
- end
- end
- -- Function to handle button release
- local function onButtonUp()
- buttonHeld = false
- end
- -- Function to handle mouse leave
- local function onMouseLeave()
- buttonHeld = false
- end
- -- Connect the functions to the ImageButton's events
- imageButton.MouseButton1Down:Connect(onButtonDown)
- imageButton.MouseButton1Up:Connect(onButtonUp)
- imageButton.MouseLeave:Connect(onMouseLeave)
- end
- coroutine.wrap(QVALUN_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement