local rs=game:GetService("RunService") local ps=game:GetService("Players") local lp=ps.LocalPlayer local en={} en.tpdirs={ Vector3.new(1,0,0), Vector3.new(-1,0,0), Vector3.new(0,0,1), Vector3.new(0,0,-1) } en.rotreq=math.pi*.9 en.cornerdist=.7 en.lastlook=Vector3.new(0,0,1) local function getchar() return lp.Character end function en.getrotspeed(rp) local lv=rp.CFrame.LookVector return math.acos(math.clamp(lv:Dot(en.lastlook),-1,1)) end function en.getcorners(cf,sz) local t={} for x=-1,1,2 do for y=-1,1,2 do for z=-1,1,2 do local c=Vector3.new(x,y,z)*.5 t[#t+1]=cf:PointToWorldSpace(c*sz) end end end return t end function en.getworldup(p) local wu=Vector3.new(0,1,0) local lu=p.CFrame:VectorToObjectSpace(wu) local f={ Vector3.new(1,0,0),Vector3.new(-1,0,0), Vector3.new(0,1,0),Vector3.new(0,-1,0), Vector3.new(0,0,1),Vector3.new(0,0,-1) } table.sort(f,function(a,b) return math.acos(math.clamp(a:Dot(lu),-1,1))0 and rel.Z<0 and tdir.X<0 then dist*=-1 end if rel.X<0 and rel.Z>0 and tdir.X>0 then dist*=-1 end if rel.X<0 and rel.Z<0 and tdir.X<0 then dist*=-1 end if rel.X>0 and rel.Z>0 and tdir.X>0 then dist*=-1 end rp.CFrame+=wdir.Unit*dist end function en.check(rp) if en.getrotspeed(rp)