local function b(b,E,p,l,m)local M=Instance.new("\073\109\097\103\101\076\097\098\101\108")M.Name=b M.Image=DPAD_SHEET M.ImageRectOffset=l M.ImageRectSize=m M.BackgroundTransparency=1 M.Size=p M.Position=E M.Parent=DPadFrame return M end local function E()return Vector2.new(DPadFrame.AbsolutePosition.x+DPadFrame.AbsoluteSize.x/2,DPadFrame.AbsolutePosition.y+DPadFrame.AbsoluteSize.y/2)end local function p()local b=LocalPlayer and LocalPlayer.Character if b then if CachedHumanoid and CachedHumanoid.Parent==b then return CachedHumanoid else CachedHumanoid=nil for b,E in pairs(b:GetChildren())do if E:IsA("\072\117\109\097\110\111\105\100")then CachedHumanoid=E return CachedHumanoid end end end end end
--[[ Local Functions ]]
--
local function createArrowLabel(name, position, size, rectOffset, rectSize)
	local image = Instance.new("ImageLabel")
	image.Name = name
	image.Image = DPAD_SHEET
	image.ImageRectOffset = rectOffset
	image.ImageRectSize = rectSize
	image.BackgroundTransparency = 1
	image.Size = size
	image.Position = position
	image.Parent = DPadFrame

	return image
end

local function getCenterPosition()
	return Vector2.new(
		DPadFrame.AbsolutePosition.x + DPadFrame.AbsoluteSize.x / 2,
		DPadFrame.AbsolutePosition.y + DPadFrame.AbsoluteSize.y / 2
	)
end

local function getHumanoid()
	local character = LocalPlayer and LocalPlayer.Character
	if character then
		if CachedHumanoid and CachedHumanoid.Parent == character then
			return CachedHumanoid
		else
			CachedHumanoid = nil
			for _, child in pairs(character:GetChildren()) do
				if child:IsA("Humanoid") then
					CachedHumanoid = child
					return CachedHumanoid
				end
			end
		end
	end
end
