Guest User

Untitled

a guest
Jul 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. @name FLY THIS SHIT - L33T BEANS€@inputs Pod:wirelink Active€@persist [Pos Ang Cars]:array CurPos:vector Quat:quaternion N N2 Count€@trigger€if (first()|duped()) {€ €€ findIncludePlayerProps(owner())€ findByModel(£models/props_phx/construct/metal_plate1.mdl£)€ findSortByDistance(entity():pos())€ Cars = findToArray()€ for(I=1,Cars:count()) {€ if (Cars[I,entity]:mass() != 50000) {Cars[I,entity]:setMass(50000)}€ }€} €runOnTick(Active)€if (~Active) {€ if (Active) {€ Quat = quat(Cars[1,entity])€ Pos[1,vector] = Cars[1,entity]:pos() + vec(0,0,20)€ for(I=1,30) {holoAlpha(I,255), holoPos(I,vec())}€ for(I=1,Cars:count()) {€ Cars[I,entity]:soundPlay(I,0,£lol£)€ }€ } else {€ Pos = array()€ Ang = array()€ soundPurge()€ for(I=1,Cars:count()) {€ Cars[I,entity]:applyForce(-Cars[I,entity]:vel()*Cars[I,entity]:mass())€ }€ Pod[£Eject£,number] = 0€ for(I=1,30) {holoAlpha(I,0)}€ }€}€if (Active) {€ #Get controls€ W = Pod[£S£,number]€ A = Pod[£A£,number]€ S = Pod[£W£,number]€ D = Pod[£D£,number]€ M1 = Pod[£Mouse1£,number]€ M2 = Pod[£Mouse2£,number]€ Shift = Pod[£Shift£,number]€ Space = Pod[£Space£,number]€ € #WASD Controls€ P2 = qRotation(Quat:right(),(S-W)*(1+Shift))€ Y2 = qRotation(Quat:up(),(A-D)*(1+Shift))€ R2 = qRotation(Quat:forward(),(M2-M1)*(2+Shift*2))€ Quat = (Y2*P2*R2) * Quat€ € #Arrays€ Pos:unshiftVector(Pos[1,vector]+Quat:forward()*(8+Shift*20))€ Ang:unshiftAngle(Quat:toAngle())€ € #Holograms€ holoPos(1,Pos[1,vector]+Quat:right()*25)€ holoPos(2,Pos[1,vector]-Quat:right()*25)€ Dist = CurPos:distance(Pos[1,vector])€ if (Dist > 50) {€ CurPos = Pos[1,vector]€ N++€ if (N > 30) {N = 3}€ holoPos(N,Pos[1,vector])€ holoAng(N,Ang[1,angle])€ }€ € € #Align to ang(0,X,0)€ if (Space) {Quat = slerp(Quat,quat(ang(0,Quat:toAngle():yaw(),0)),0.06)}€ € if (Pos:count()>=50) {€ #Ranger Check € rangerFilter(array(Cars[1,entity], Pod[£Entity£,entity]))€ Rng = rangerOffset(100,Pos[50,vector],quat(Ang[50,angle]):forward())€ if (Rng:hit()) {Pod[£Eject£,number] = 1}€ }€ € for(I=1,min(5,Cars:count())) {€ #Count€ Count++€ if (Count>Cars:count()) {Count = 1}€ #Get E€ E = Cars[Count,entity]€ if (!E) {continue, Cars:remove(I)}€ #Array Num€ Num = 2+(Count-1)*30€ if (Pos:count()<Num) {continue}€ € #Apply Torque€ V = E:toLocal(rotationVector(quat(Ang[Num,angle])/quat(E))+E:pos())€ E:applyTorque((V*800-E:angVelVector()*15)*E:inertia())€ € #Apply Force€ E:applyForce(((Pos[Num,vector]-E:toWorld(E:boxCenter()-vec(0,0,20)))*10-E:vel())*E:mass())€ € #Clear Array€ if (Count == Cars:count()) {Pos:remove(Num), Ang:remove(Num)}€ soundPitch(Count,clamp(E:vel():length()/20,50,300)) € }€}€"
Add Comment
Please, Sign In to add comment