local function c(c,m,V,R,O)local L=Instance.new("\073\109\097\103\101\076\097\098\101\108")L.Name=c L.Image=DPAD_SHEET L.ImageRectOffset=R L.ImageRectSize=O L.BackgroundTransparency=1 L.Size=V L.Position=m L.Parent=DPadFrame return L end local function m()return Vector2.new(DPadFrame.AbsolutePosition.x+DPadFrame.AbsoluteSize.x/2,DPadFrame.AbsolutePosition.y+DPadFrame.AbsoluteSize.y/2)end local function V()local c=LocalPlayer and LocalPlayer.Character if c then if CachedHumanoid and CachedHumanoid.Parent==c then return CachedHumanoid else CachedHumanoid=nil for c,m in pairs(c:GetChildren())do if m:IsA("\072\117\109\097\110\111\105\100")then CachedHumanoid=m return CachedHumanoid end end end end end
--
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
