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


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;
