local R=plr.Character.HumanoidRootPart local d,e=script.Parent.Vel,script.Parent.PVel local B=Vector3.new(sens,sens,sens)local C=0 local z=0 local y=1 local a=-90 a=math.rad(a)function Rotate()local d=R.CFrame.lookVector local e=math.atan2(d.z,d.x)if e<-1.57 and z>1.57 then C=C-math.pi*2 elseif e>1.57 and z<-1.57 then C=C+math.pi*2 end C=C*(1-y)+e*y local B=C+a z=e script.Parent.F.Rotation=-math.deg(B)end while true do d.Value=R.Velocity wait()e.Value=d.Value d.Value=R.Velocity local C=script.Parent.Diff C.Value=(e.Value-d.Value)*B local z=C.Value.X/4 z=math.min(z,.5)z=math.max(z,-0.5)local y=C.Value.Z/4 y=math.min(y,.5)y=math.max(y,-0.5)Rotate()script.Parent.F.Dot.Position=UDim2.new(-z+.5,-8,-y+.5,-8)local a=(Vector2.new(C.Value.X/2,C.Value.Z/2)).Magnitude if a<min then a=0 end script.Parent.TL.Text=math.floor(math.min(a,max)*100)/100 .." \071"end
--// DON'T EDIT BELOW

local target = plr.Character.HumanoidRootPart

local vel, pvel = script.Parent.Vel, script.Parent.PVel

local sensitivity = Vector3.new(sens, sens, sens)

local slurAngle = 0
local previousDesiredAngle = 0
local spinSpeed = 1 --ratio per second
local rotationOffset = -90 --in degrees
rotationOffset = math.rad(rotationOffset)

function Rotate()
	local vec = target.CFrame.lookVector
	local desiredAngle = math.atan2(vec.z, vec.x)
	if desiredAngle < -1.57 and previousDesiredAngle > 1.57 then
		slurAngle = slurAngle - math.pi * 2
	elseif desiredAngle > 1.57 and previousDesiredAngle < -1.57 then
		slurAngle = slurAngle + math.pi * 2
	end
	slurAngle = slurAngle * (1 - spinSpeed) + desiredAngle * spinSpeed
	local a = slurAngle + rotationOffset
	previousDesiredAngle = desiredAngle
	script.Parent.F.Rotation = -math.deg(a)
end
while true do
	vel.Value = target.Velocity
	wait() --REQUIRED while loop
	pvel.Value = vel.Value
	vel.Value = target.Velocity

	local diff = script.Parent.Diff
	diff.Value = ((pvel.Value - vel.Value) * sensitivity)

	local xz = (diff.Value.X / 4)
	xz = math.min(xz, 0.5)
	xz = math.max(xz, -0.5)

	local yz = (diff.Value.Z / 4)
	yz = math.min(yz, 0.5)
	yz = math.max(yz, -0.5)
	Rotate()
	script.Parent.F.Dot.Position = UDim2.new(-xz + 0.5, -8, -yz + 0.5, -8)

	local mag = Vector2.new(diff.Value.X / 2, diff.Value.Z / 2).Magnitude
	if mag < min then
		mag = 0
	end
	script.Parent.TL.Text = math.floor(math.min(mag, max) * 100) / 100 .. " G"
end
