local m=require(script.Parent:WaitForChild("\066\097\115\101\067\104\097\114\097\099\116\101\114\067\111\110\116\114\111\108\108\101\114"))local o=setmetatable({},m)o.__index=o function o.new()local c=setmetatable(m.new(),o)c.parentUIFrame=nil c.jumpButton=nil c.characterAddedConn=nil c.humanoidStateEnabledChangedConn=nil c.humanoidJumpPowerConn=nil c.humanoidParentConn=nil c.externallyEnabled=false c.jumpPower=0 c.jumpStateEnabled=true c.isJumping=false c.humanoid=nil return c end local c=game:GetService("\080\108\097\121\101\114\115")function o.EnableButton(m,o)if o then if not m.jumpButton then m:Create()end local o=c.LocalPlayer.Character and c.LocalPlayer.Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if o and(m.externallyEnabled and(m.externallyEnabled and o.JumpPower>0))then m.jumpButton.Visible=true return end else m.jumpButton.Visible=false m.isJumping=false m.jumpButton.ImageRectOffset=Vector2.new(1,146)end end function o.UpdateEnabled(m)if m.jumpPower>0 and m.jumpStateEnabled then m:EnableButton(true)return end m:EnableButton(false)end function o.HumanoidChanged(m,o)local h=c.LocalPlayer.Character and c.LocalPlayer.Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if h then if o=="\074\117\109\112\080\111\119\101\114"then m.jumpPower=h.JumpPower m:UpdateEnabled()return end if o=="\080\097\114\101\110\116"and not h.Parent then m.humanoidChangeConn:Disconnect()end end end function o.HumanoidStateEnabledChanged(m,o,c)if o==Enum.HumanoidStateType.Jumping then m.jumpStateEnabled=c m:UpdateEnabled()end end function o.CharacterAdded(m,o)if m.humanoidChangeConn then m.humanoidChangeConn:Disconnect()m.humanoidChangeConn=nil end m.humanoid=o:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")while not m.humanoid do o.ChildAdded:wait()m.humanoid=o:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end m.humanoidJumpPowerConn=(m.humanoid:GetPropertyChangedSignal("\074\117\109\112\080\111\119\101\114")):Connect(function()m.jumpPower=m.humanoid.JumpPower m:UpdateEnabled()end)m.humanoidParentConn=(m.humanoid:GetPropertyChangedSignal("\080\097\114\101\110\116")):Connect(function()if not m.humanoid.Parent then m.humanoidJumpPowerConn:Disconnect()m.humanoidJumpPowerConn=nil m.humanoidParentConn:Disconnect()m.humanoidParentConn=nil end end)m.humanoidStateEnabledChangedConn=m.humanoid.StateEnabledChanged:Connect(function(o,c)m:HumanoidStateEnabledChanged(o,c)end)m.jumpPower=m.humanoid.JumpPower m.jumpStateEnabled=m.humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping)m:UpdateEnabled()end function o.SetupCharacterAddedFunction(m)m.characterAddedConn=c.LocalPlayer.CharacterAdded:Connect(function(o)m:CharacterAdded(o)end)if c.LocalPlayer.Character then m:CharacterAdded(c.LocalPlayer.Character)end end function o.Enable(m,o,c)if c then m.parentUIFrame=c end m.externallyEnabled=o m:EnableButton(o)end local h=game:GetService("\071\117\105\083\101\114\118\105\099\101")function o.Create(m)if not m.parentUIFrame then return end if m.jumpButton then m.jumpButton:Destroy()m.jumpButton=nil end local o=math.min(m.parentUIFrame.AbsoluteSize.x,m.parentUIFrame.AbsoluteSize.y)<=500 if o then local m=70 else v7=120 end m.jumpButton=Instance.new("\073\109\097\103\101\066\117\116\116\111\110")m.jumpButton.Name="\074\117\109\112\066\117\116\116\111\110"m.jumpButton.Visible=false m.jumpButton.BackgroundTransparency=1 m.jumpButton.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\073\110\112\117\116\047\084\111\117\099\104\067\111\110\116\114\111\108\115\083\104\101\101\116\086\050\046\112\110\103"m.jumpButton.ImageRectOffset=Vector2.new(1,146)m.jumpButton.ImageRectSize=Vector2.new(144,144)m.jumpButton.Size=UDim2.new(0,v7,0,v7)m.jumpButton.Position=o and UDim2.new(1,-(v7*1.5-10),1,-v7-20)or UDim2.new(1,-(v7*1.5-10),1,-v7*1.75)local c=nil m.jumpButton.InputBegan:connect(function(o)if not(not c)or o.UserInputType~=Enum.UserInputType.Touch or o.UserInputState~=Enum.UserInputState.Begin then return end c=o m.jumpButton.ImageRectOffset=Vector2.new(146,146)m.isJumping=true end)m.jumpButton.InputEnded:connect(function(o)if o==c then c=nil m.isJumping=false m.jumpButton.ImageRectOffset=Vector2.new(1,146)end end)h.MenuOpened:connect(function()if c then c=nil m.isJumping=false m.jumpButton.ImageRectOffset=Vector2.new(1,146)end end)if not m.characterAddedConn then m:SetupCharacterAddedFunction()end m.jumpButton.Parent=m.parentUIFrame end return o
-- Decompiled with the Synapse X Luau decompiler.

local v1 = require(script.Parent:WaitForChild("BaseCharacterController"))
local v2 = setmetatable({}, v1)
v2.__index = v2
function v2.new()
	local v3 = setmetatable(v1.new(), v2)
	v3.parentUIFrame = nil
	v3.jumpButton = nil
	v3.characterAddedConn = nil
	v3.humanoidStateEnabledChangedConn = nil
	v3.humanoidJumpPowerConn = nil
	v3.humanoidParentConn = nil
	v3.externallyEnabled = false
	v3.jumpPower = 0
	v3.jumpStateEnabled = true
	v3.isJumping = false
	v3.humanoid = nil
	return v3
end
local l__Players__1 = game:GetService("Players")
function v2.EnableButton(p1, p2)
	if p2 then
		if not p1.jumpButton then
			p1:Create()
		end
		local v4 = l__Players__1.LocalPlayer.Character
			and l__Players__1.LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
		if v4 and p1.externallyEnabled and p1.externallyEnabled and v4.JumpPower > 0 then
			p1.jumpButton.Visible = true
			return
		end
	else
		p1.jumpButton.Visible = false
		p1.isJumping = false
		p1.jumpButton.ImageRectOffset = Vector2.new(1, 146)
	end
end
function v2.UpdateEnabled(p3)
	if p3.jumpPower > 0 and p3.jumpStateEnabled then
		p3:EnableButton(true)
		return
	end
	p3:EnableButton(false)
end
function v2.HumanoidChanged(p4, p5)
	local v5 = l__Players__1.LocalPlayer.Character
		and l__Players__1.LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
	if v5 then
		if p5 == "JumpPower" then
			p4.jumpPower = v5.JumpPower
			p4:UpdateEnabled()
			return
		end
		if p5 == "Parent" and not v5.Parent then
			p4.humanoidChangeConn:Disconnect()
		end
	end
end
function v2.HumanoidStateEnabledChanged(p6, p7, p8)
	if p7 == Enum.HumanoidStateType.Jumping then
		p6.jumpStateEnabled = p8
		p6:UpdateEnabled()
	end
end
function v2.CharacterAdded(p9, p10)
	if p9.humanoidChangeConn then
		p9.humanoidChangeConn:Disconnect()
		p9.humanoidChangeConn = nil
	end
	p9.humanoid = p10:FindFirstChildOfClass("Humanoid")
	while not p9.humanoid do
		p10.ChildAdded:wait()
		p9.humanoid = p10:FindFirstChildOfClass("Humanoid")
	end
	p9.humanoidJumpPowerConn = p9.humanoid:GetPropertyChangedSignal("JumpPower"):Connect(function()
		p9.jumpPower = p9.humanoid.JumpPower
		p9:UpdateEnabled()
	end)
	p9.humanoidParentConn = p9.humanoid:GetPropertyChangedSignal("Parent"):Connect(function()
		if not p9.humanoid.Parent then
			p9.humanoidJumpPowerConn:Disconnect()
			p9.humanoidJumpPowerConn = nil
			p9.humanoidParentConn:Disconnect()
			p9.humanoidParentConn = nil
		end
	end)
	p9.humanoidStateEnabledChangedConn = p9.humanoid.StateEnabledChanged:Connect(function(p11, p12)
		p9:HumanoidStateEnabledChanged(p11, p12)
	end)
	p9.jumpPower = p9.humanoid.JumpPower
	p9.jumpStateEnabled = p9.humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping)
	p9:UpdateEnabled()
end
function v2.SetupCharacterAddedFunction(p13)
	p13.characterAddedConn = l__Players__1.LocalPlayer.CharacterAdded:Connect(function(p14)
		p13:CharacterAdded(p14)
	end)
	if l__Players__1.LocalPlayer.Character then
		p13:CharacterAdded(l__Players__1.LocalPlayer.Character)
	end
end
function v2.Enable(p15, p16, p17)
	if p17 then
		p15.parentUIFrame = p17
	end
	p15.externallyEnabled = p16
	p15:EnableButton(p16)
end
local l__GuiService__2 = game:GetService("GuiService")
function v2.Create(p18)
	if not p18.parentUIFrame then
		return
	end
	if p18.jumpButton then
		p18.jumpButton:Destroy()
		p18.jumpButton = nil
	end
	local v6 = math.min(p18.parentUIFrame.AbsoluteSize.x, p18.parentUIFrame.AbsoluteSize.y) <= 500
	if v6 then
		local v7 = 70
	else
		v7 = 120
	end
	p18.jumpButton = Instance.new("ImageButton")
	p18.jumpButton.Name = "JumpButton"
	p18.jumpButton.Visible = false
	p18.jumpButton.BackgroundTransparency = 1
	p18.jumpButton.Image = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"
	p18.jumpButton.ImageRectOffset = Vector2.new(1, 146)
	p18.jumpButton.ImageRectSize = Vector2.new(144, 144)
	p18.jumpButton.Size = UDim2.new(0, v7, 0, v7)
	p18.jumpButton.Position = v6 and UDim2.new(1, -(v7 * 1.5 - 10), 1, -v7 - 20)
		or UDim2.new(1, -(v7 * 1.5 - 10), 1, -v7 * 1.75)
	local u3 = nil
	p18.jumpButton.InputBegan:connect(function(p19)
		if
			not not u3
			or p19.UserInputType ~= Enum.UserInputType.Touch
			or p19.UserInputState ~= Enum.UserInputState.Begin
		then
			return
		end
		u3 = p19
		p18.jumpButton.ImageRectOffset = Vector2.new(146, 146)
		p18.isJumping = true
	end)
	p18.jumpButton.InputEnded:connect(function(p20)
		if p20 == u3 then
			u3 = nil
			p18.isJumping = false
			p18.jumpButton.ImageRectOffset = Vector2.new(1, 146)
		end
	end)
	l__GuiService__2.MenuOpened:connect(function()
		if u3 then
			u3 = nil
			p18.isJumping = false
			p18.jumpButton.ImageRectOffset = Vector2.new(1, 146)
		end
	end)
	if not p18.characterAddedConn then
		p18:SetupCharacterAddedFunction()
	end
	p18.jumpButton.Parent = p18.parentUIFrame
end
return v2
