local l=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 Q=setmetatable({},l)Q.__index=Q function Q.new()local x=setmetatable(l.new(),Q)x.parentUIFrame=nil x.jumpButton=nil x.characterAddedConn=nil x.humanoidStateEnabledChangedConn=nil x.humanoidJumpPowerConn=nil x.humanoidParentConn=nil x.externallyEnabled=false x.jumpPower=0 x.jumpStateEnabled=true x.isJumping=false x.humanoid=nil return x end local x=game:GetService("\080\108\097\121\101\114\115")function Q.EnableButton(l,Q)if Q then if not l.jumpButton then l:Create()end local Q=x.LocalPlayer.Character and x.LocalPlayer.Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if Q and(l.externallyEnabled and(l.externallyEnabled and Q.JumpPower>0))then l.jumpButton.Visible=true return end else l.jumpButton.Visible=false l.isJumping=false l.jumpButton.ImageRectOffset=Vector2.new(1,146)end end function Q.UpdateEnabled(l)if l.jumpPower>0 and l.jumpStateEnabled then l:EnableButton(true)return end l:EnableButton(false)end function Q.HumanoidChanged(l,Q)local V=x.LocalPlayer.Character and x.LocalPlayer.Character:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if V then if Q=="\074\117\109\112\080\111\119\101\114"then l.jumpPower=V.JumpPower l:UpdateEnabled()return end if Q=="\080\097\114\101\110\116"and not V.Parent then l.humanoidChangeConn:Disconnect()end end end function Q.HumanoidStateEnabledChanged(l,Q,x)if Q==Enum.HumanoidStateType.Jumping then l.jumpStateEnabled=x l:UpdateEnabled()end end function Q.CharacterAdded(l,Q)if l.humanoidChangeConn then l.humanoidChangeConn:Disconnect()l.humanoidChangeConn=nil end l.humanoid=Q:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")while not l.humanoid do Q.ChildAdded:wait()l.humanoid=Q:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")end l.humanoidJumpPowerConn=(l.humanoid:GetPropertyChangedSignal("\074\117\109\112\080\111\119\101\114")):Connect(function()l.jumpPower=l.humanoid.JumpPower l:UpdateEnabled()end)l.humanoidParentConn=(l.humanoid:GetPropertyChangedSignal("\080\097\114\101\110\116")):Connect(function()if not l.humanoid.Parent then l.humanoidJumpPowerConn:Disconnect()l.humanoidJumpPowerConn=nil l.humanoidParentConn:Disconnect()l.humanoidParentConn=nil end end)l.humanoidStateEnabledChangedConn=l.humanoid.StateEnabledChanged:Connect(function(Q,x)l:HumanoidStateEnabledChanged(Q,x)end)l.jumpPower=l.humanoid.JumpPower l.jumpStateEnabled=l.humanoid:GetStateEnabled(Enum.HumanoidStateType.Jumping)l:UpdateEnabled()end function Q.SetupCharacterAddedFunction(l)l.characterAddedConn=x.LocalPlayer.CharacterAdded:Connect(function(Q)l:CharacterAdded(Q)end)if x.LocalPlayer.Character then l:CharacterAdded(x.LocalPlayer.Character)end end function Q.Enable(l,Q,x)if x then l.parentUIFrame=x end l.externallyEnabled=Q l:EnableButton(Q)end local V=game:GetService("\071\117\105\083\101\114\118\105\099\101")function Q.Create(l)if not l.parentUIFrame then return end if l.jumpButton then l.jumpButton:Destroy()l.jumpButton=nil end local Q=math.min(l.parentUIFrame.AbsoluteSize.x,l.parentUIFrame.AbsoluteSize.y)<=500 if Q then local l=70 else v7=120 end l.jumpButton=Instance.new("\073\109\097\103\101\066\117\116\116\111\110")l.jumpButton.Name="\074\117\109\112\066\117\116\116\111\110"l.jumpButton.Visible=false l.jumpButton.BackgroundTransparency=1 l.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"l.jumpButton.ImageRectOffset=Vector2.new(1,146)l.jumpButton.ImageRectSize=Vector2.new(144,144)l.jumpButton.Size=UDim2.new(0,v7,0,v7)l.jumpButton.Position=Q and UDim2.new(1,-(v7*1.5-10),1,-v7-20)or UDim2.new(1,-(v7*1.5-10),1,-v7*1.75)local x=nil l.jumpButton.InputBegan:connect(function(Q)if not(not x)or Q.UserInputType~=Enum.UserInputType.Touch or Q.UserInputState~=Enum.UserInputState.Begin then return end x=Q l.jumpButton.ImageRectOffset=Vector2.new(146,146)l.isJumping=true end)local function p()x=nil l.isJumping=false l.jumpButton.ImageRectOffset=Vector2.new(1,146)end l.jumpButton.InputEnded:connect(function(l)if l==x then p()end end)V.MenuOpened:connect(function()if x then p()end end)if not l.characterAddedConn then l:SetupCharacterAddedFunction()end l.jumpButton.Parent=l.parentUIFrame end return Q


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);
	local function u4()
		u3 = nil;
		p18.isJumping = false;
		p18.jumpButton.ImageRectOffset = Vector2.new(1, 146);
	end;
	p18.jumpButton.InputEnded:connect(function(p20)
		if p20 == u3 then
			u4();
		end;
	end);
	l__GuiService__2.MenuOpened:connect(function()
		if u3 then
			u4();
		end;
	end);
	if not p18.characterAddedConn then
		p18:SetupCharacterAddedFunction();
	end;
	p18.jumpButton.Parent = p18.parentUIFrame;
end;
return v2;
