Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name UrumasiCam
- @persist Colormode SSAOon SSAORC SSAONoS SSAOSR Textured PixelSize TRes Loaded Tex:table S:wirelink Screen:entity SP:vector Box:vector Res Scanning Distance T Dist ShadowR ShadowS DeltaT LightP:vector Result:vector Sample
- @persist K Sl Open O:entity Max Buffer:table Canvas:vector2 MID HLoaded Start Pause Rec MinT MaxT Times:array
- @persist Glass:vector ShadowDist GlassTransparency
- @inputs DigitalScreen:wirelink
- #[
- Created by Urumasi
- http://steamcommunity.com/id/urumasi/
- How to use:
- Place this chip onto a digital screen. If the E2 does not do anything, wire the digital screen wirelink to the E2 and replace the E2.
- ]#
- if(first()){
- #ifdef entity:wirelink()
- S = entity():isConstrainedTo():wirelink()
- #else
- if(!->DigitalScreen){
- runOnFile(0)
- runOnHTTP(0)
- exit()
- }
- S = DigitalScreen
- #endif
- runOnTick(1)
- runOnHTTP(1)
- Times = array(0,0,0)
- Canvas = vec2(144, 515)
- O = owner()
- function wirelink:initScreen(Res){
- This[1048574]=0
- This[1048569]=3
- This[1048575]=1
- This[1048572]=This[1048573]=Res
- }
- function vector clampV(CV:vector, N1, N2){
- return vec(clamp(CV:x(), N1, N2), clamp(CV:y(), N1, N2), clamp(CV:z(), N1, N2))
- }
- function number vector:vAng(V:vector){
- return acos(This:dot(V)/(This:length()*V:length()))
- }
- function vector array:avgV(){
- Out = vec()
- foreach(K, V:vector=This){
- Out+=V/This:count()
- }
- return Out
- }
- function vector signV(SV:vector){
- return vec(abs(SV:x())>0.05?sign(SV:x()) :1, abs(SV:y())>0.05?sign(SV:y()) :1, abs(SV:z())>0.05?sign(SV:z()) :1)
- }
- function vector vector:mul(MV:vector){
- return vec(This:x()*MV:x(), This:y()*MV:y(), This:z()*MV:z())
- }
- function entity:obj(ID, Size:vector, Dir:vector, M:string, Push, C:vector){
- holoCreate(ID, vec(), vec(1), This:angles(), C, M)
- HS = This:aabbSize():mul(Size)
- holoScaleUnits(ID, HS)
- holoPos(ID, This:toWorld((This:aabbSize()/2+(Push*HS/2)):mul(Dir)))
- holoParent(ID, This)
- holoDisableShading(ID, 1)
- }
- function entity:objMenu(ID, Size:vector2, Pos:vector2, M:string, C:vector){
- RPos = vec((Pos:y()+Size:y()/2)/Canvas:y(), (Pos:x()+Size:x()/2)*Max/Canvas:x()+1-Max, 0.9)
- RSize = vec(Size:y()/Canvas:y(), Size:x()*Max/Canvas:x(), 0.1)
- holoCreate(ID, vec(), vec(1), holoEntity(9):angles(), C, M)
- HS = This:aabbSize():mul(RSize)
- holoScaleUnits(ID, HS)
- holoPos(ID, This:toWorld(This:aabbSize():mul(RPos)-This:aabbSize()/2))
- holoParent(ID, 9)
- holoDisableShading(ID, 1)
- }
- function entity:slide(N){
- holoPos(1, This:toWorld(vec(0,N*This:aabbSize():y(),0))-This:pos()+holoEntity(1):pos())
- holoPos(5, This:toWorld(vec(0,N*This:aabbSize():y(),0))-This:pos()+holoEntity(5):pos())
- holoPos(6, This:toWorld(vec(0,N*This:aabbSize():y(),0))-This:pos()+holoEntity(6):pos())
- holoPos(9, This:toWorld(vec(0,N*This:aabbSize():y(),0))-This:pos()+holoEntity(9):pos())
- Sl += N
- }
- function number lookingAt(I, R){
- return (O:shootPos()+O:eye()*O:shootPos():distance(holoEntity(I):pos())):distance(holoEntity(I):pos())<R
- }
- function ranger cRanger(RDistance, RPosition:vector, RDirection:vector){
- Ro = rangerOffset(RDistance, RPosition, RDirection)
- ShadowDist += Ro:pos():distance(RPosition)
- if(Ro:matType()=="glass"){
- ShadowDist += 2
- Glass = clampV(Glass-vec(GlassTransparency)+(GlassTransparency*Ro:entity():getColor()/255), 0, 1)
- Ro = cRanger(RDistance-Ro:distance(), Ro:pos()+RDirection*2, RDirection)
- }
- return Ro
- }
- GlassTransparency = 0.3
- MinT = 0.1
- MaxT = 5
- Colormode = 1
- SSAOon = 0
- SSAORC = 100
- Textured = 0
- PixelSize = 0.25
- SSAONoS = 12
- SSAOSR = 7.5
- TRes = 64
- Sample = 2
- Res = 64
- ShadowR = 500
- ShadowS = 150
- S:initScreen(Res)
- Screen = S:entity()
- Box = Screen:boxSize()
- Dist = 300
- Screen:setMaterial("models/shiny")
- Screen:setColor(vec(0))
- for(I=1, 4){
- holoCreate(I+300)
- holoScale(I+300, vec(0.3))
- }
- rangerPersist(1)
- rangerFilter(players())
- rangerFilter(Screen)
- httpRequest("https://dl.dropboxusercontent.com/s/1y699eveu5raw27/all.txt")
- Max = Canvas:x()/Canvas:y()
- Screen:obj(1, vec(1,0.05,0.82), vec(0,1,0), "cube", 1, vec(200))
- Screen:obj(2, vec(1,0.05,0.82), vec(0,-1,0), "cube", 1, vec(200))
- Screen:obj(3, vec(0.05,1,0.82), vec(1,0,0), "cube", 1, vec(200))
- Screen:obj(4, vec(0.05,1,0.82), vec(-1,0,0), "cube", 1, vec(200))
- Screen:obj(5, vec(0.1,0.1,0.82), vec(1,1,0), "hq_cylinder", 0, vec(200))
- Screen:obj(6, vec(0.1,0.1,0.82), vec(-1,1,0), "hq_cylinder", 0, vec(200))
- Screen:obj(7, vec(0.1,0.1,0.82), vec(1,-1,0), "hq_cylinder", 0, vec(200))
- Screen:obj(8, vec(0.1,0.1,0.82), vec(-1,-1,0), "hq_cylinder", 0, vec(200))
- Screen:obj(9, vec(1.1,1,0.82), vec(), "cube", 0, vec(200))
- Screen:obj(201, vec(1,0.05,1), vec(0,1.01,-0.125), "cube", 1, vec())
- Screen:obj(202, vec(1,0.05,1), vec(0,-1.01,-0.125), "cube", 1, vec())
- Screen:obj(203, vec(0.05,1,1), vec(1.01,0,-0.125), "cube", 1, vec())
- Screen:obj(204, vec(0.05,1,1), vec(-1.01,0,-0.125), "cube", 1, vec())
- Screen:obj(205, vec(0.1,0.1,1), vec(1.01,1.01,-0.26), "hq_cylinder", 0, vec())
- Screen:obj(206, vec(0.1,0.1,1), vec(-1.01,1.01,-0.26), "hq_cylinder", 0, vec())
- Screen:obj(207, vec(0.1,0.1,1), vec(1.01,-1.01,-0.26), "hq_cylinder", 0, vec())
- Screen:obj(208, vec(0.1,0.1,1), vec(-1.01,-1.01,-0.26), "hq_cylinder", 0, vec())
- Screen:obj(209, vec(1.05,1.05,1), vec(0,0,-0.4), "cube", 0, vec(0))
- Screen:obj(210, vec(1.11,1.01,1), vec(0,0,-0.4), "cube", 0, vec(0))
- holoParent(201, 1)
- holoParent(205, 5)
- holoParent(206, 6)
- holoParent(210, 9)
- Buffer:pushArray(array(vec2(8,37), vec2(29,0), "cube", vec()))
- Buffer:pushArray(array(vec2(16,8), vec2(37,0), "cube", vec()))
- Buffer:pushArray(array(vec2(16,8), vec2(37,16), "cube", vec()))
- Buffer:pushArray(array(vec2(8,8), vec2(50,8), "cube", vec()))
- Buffer:pushArray(array(vec2(8,13), vec2(50,24), "cube", vec()))
- Buffer:pushArray(array(vec2(8,37), vec2(61,0), "cube", vec()))
- Buffer:pushArray(array(vec2(16,8), vec2(69,0), "cube", vec()))
- Buffer:pushArray(array(vec2(16,8), vec2(69,14), "cube", vec()))
- Buffer:pushArray(array(vec2(16,8), vec2(69,29), "cube", vec()))
- Buffer:pushArray(array(vec2(24,8), vec2(88,0), "cube", vec()))
- Buffer:pushArray(array(vec2(24,8), vec2(88,14), "cube", vec()))
- Buffer:pushArray(array(vec2(24,8), vec2(88,29), "cube", vec()))
- Buffer:pushArray(array(vec2(8,7), vec2(88,8), "cube", vec()))
- Buffer:pushArray(array(vec2(8,7), vec2(104,22), "cube", vec()))
- Buffer:pushArray(array(vec2(19,3), vec2(0,57), "cube", vec()))
- Buffer:pushArray(array(vec2(19,3), vec2(125,57), "cube", vec()))
- Buffer:pushArray(array(vec2(3,19), vec2(133,49), "cube", vec()))
- Buffer:pushArray(array(vec2(26,26), vec2(33,97), "hq_rcube", vec(255,0,0))) #27
- Buffer:pushArray(array(vec2(26,26), vec2(60,97), "hq_rcube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(26,26), vec2(87,97), "hq_rcube", vec(255,0,0)))
- Buffer:pushArray(array(vec2(140,4), vec2(0,126), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(0,132), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(0,140), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(0,148), "cube", vec()))
- Buffer:pushArray(array(vec2(4,4), vec2(0,136), "cube", vec()))
- Buffer:pushArray(array(vec2(4,4), vec2(9,144), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(14,132), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(14,140), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(14,148), "cube", vec()))
- Buffer:pushArray(array(vec2(4,4), vec2(14,136), "cube", vec()))
- Buffer:pushArray(array(vec2(4,4), vec2(23,144), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(28,132), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(37,132), "cube", vec()))
- Buffer:pushArray(array(vec2(5,4), vec2(32,132), "cube", vec()))
- Buffer:pushArray(array(vec2(5,4), vec2(32,141), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(42,132), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(51,132), "cube", vec()))
- Buffer:pushArray(array(vec2(5,4), vec2(46,132), "cube", vec()))
- Buffer:pushArray(array(vec2(5,4), vec2(46,148), "cube", vec()))
- Buffer:pushArray(array(vec2(20,20), vec2(97,132), "hq_cylinder", vec(100)))
- Buffer:pushArray(array(vec2(20,20), vec2(120,132), "hq_cylinder", vec(100)))
- Buffer:pushArray(array(vec2(24,20), vec2(107,132), "cube", vec(100)))
- Buffer:pushArray(array(vec2(18,18), vec2(98,133), "hq_cylinder", vec(200))) #52 # 98 - 121 !!!
- Buffer:pushArray(array(vec2(140,4), vec2(0,154), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(0,160), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(12,160), "cube", vec()))
- Buffer:pushArray(array(vec2(2,6), vec2(4,162), "cube", vec()))
- Buffer:pushArray(array(vec2(6,6), vec2(5,164), "cube", vec()))
- Buffer:pushArray(array(vec2(2,6), vec2(10,162), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(17,160), "cube", vec()))
- Buffer:pushArray(array(vec2(4,20), vec2(26,160), "cube", vec()))
- Buffer:pushArray(array(vec2(5,4), vec2(21,160), "cube", vec()))
- Buffer:pushArray(array(vec2(5,4), vec2(21,169), "cube", vec()))
- Buffer:pushArray(array(vec2(13,4), vec2(31,160), "cube", vec()))
- Buffer:pushArray(array(vec2(4,16), vec2(35,164), "cube", vec()))
- Buffer:pushArray(array(vec2(20,20), vec2(97,160), "hq_cylinder", vec(100)))
- Buffer:pushArray(array(vec2(20,20), vec2(120,160), "hq_cylinder", vec(100)))
- Buffer:pushArray(array(vec2(24,20), vec2(107,160), "cube", vec(100)))
- Buffer:pushArray(array(vec2(18,18), vec2(98,161), "hq_cylinder", vec(200))) #68
- Buffer:pushArray(array(vec2(14,14), vec2(0,191), "hq_cylinder", vec(150)))
- Buffer:pushArray(array(vec2(14,14), vec2(127,191), "hq_cylinder", vec(150)))
- Buffer:pushArray(array(vec2(131,2), vec2(6,197), "cube", vec(230)))
- Buffer:pushArray(array(vec2(8,8), vec2(46,194), "hq_cylinder", vec())) #72
- Buffer:pushArray(array(vec2(37,37), vec2(11,219), "cube", vec()))
- Buffer:pushArray(array(vec2(37,37), vec2(54,219), "cube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(37,37), vec2(97,219), "cube", vec()))
- Buffer:pushArray(array(vec2(33,33), vec2(13,221), "models/holograms/right_prism.mdl", vec(255))) #76
- Buffer:pushArray(array(vec2(33,33), vec2(56,221), "models/holograms/right_prism.mdl", vec(255)))
- Buffer:pushArray(array(vec2(33,33), vec2(99,221), "models/holograms/right_prism.mdl", vec(255)))
- Buffer:pushArray(array(vec2(33,33), vec2(13,221), "models/holograms/right_prism.mdl", vec(255))) #79
- Buffer:pushArray(array(vec2(33,33), vec2(56,221), "models/holograms/right_prism.mdl", vec(255)))
- Buffer:pushArray(array(vec2(33,33), vec2(99,221), "models/holograms/right_prism.mdl", vec(255)))
- Buffer:pushArray(array(vec2(140,4), vec2(0,258), "cube", vec()))
- Buffer:pushArray(array(vec2(140,4), vec2(0,458), "cube", vec()))
- Buffer:pushArray(array(vec2(24,24), vec2(22,478), "hq_rcube", vec()))
- Buffer:pushArray(array(vec2(44,32), vec2(12,483), "hq_rcube", vec()))
- Buffer:pushArray(array(vec2(22,22), vec2(23,488), "hq_tube", vec(200))) #86
- Buffer:pushArray(array(vec2(4,4), vec2(49,486), "hq_cylinder", vec(200)))
- Buffer:pushArray(array(vec2(36,26), vec2(95,489), "hq_rcube", vec()))
- Buffer:pushArray(array(vec2(22,22), vec2(91,470), "hq_cylinder", vec()))
- Buffer:pushArray(array(vec2(20,20), vec2(113,472), "hq_cylinder", vec()))
- Buffer:pushArray(array(vec2(10,20), vec2(84,491), "cube", vec())) #91
- Buffer:pushArray(array(vec2(32,32), vec2(32,42), "hq_rcube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(32,32), vec2(57,42), "hq_rcube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(32,32), vec2(82,42), "hq_rcube", vec(0,200,0))) #94
- Buffer:pushArray(array(vec2(24,3), vec2(60,84), "cube", vec()))
- Buffer:pushArray(array(vec2(24,3), vec2(60,84), "cube", vec()))
- Buffer:pushArray(array(vec2(45,45), vec2(89,470), "cube", vec())) #97
- Buffer:pushArray(array(vec2(45,45), vec2(12,470), "prism", vec()))
- Buffer:pushArray(array(vec2(15,45), vec2(12,470), "cube", vec()))
- Buffer:pushArray(array(vec2(15,45), vec2(42,470), "cube", vec()))
- Buffer:pushArray(array(vec2(30), vec2(0,425), "hq_rcube", vec(0,200,0))) #101
- Buffer:pushArray(array(vec2(30), vec2(31,425), "hq_rcube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(30), vec2(56,425), "hq_rcube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(30), vec2(87,425), "hq_rcube", vec(0,200,0)))
- Buffer:pushArray(array(vec2(30), vec2(112,425), "hq_rcube", vec(0,200,0)))
- function table:addT(Ta:table){
- for(I=1, Ta:count()){
- This:pushArray(Ta[I, array])
- }
- }
- }else{
- if(!Loaded & httpClk()){
- Tex = vonDecodeTable(httpData())
- Loaded = 1
- }
- if(SP!=Screen:pos()){
- Dist = 1e10
- R = rangerOffset(Dist, Screen:toWorld(vec(Box:x(), Box:y(), 0)/2), -Screen:up())
- holoPos(301, R:position())
- D1 = R:distance()
- R = rangerOffset(Dist, Screen:toWorld(vec(-Box:x(), Box:y(), 0)/2), -Screen:up())
- holoPos(302, R:position())
- D2 = R:distance()
- R = rangerOffset(Dist, Screen:toWorld(vec(Box:x(), -Box:y(), 0)/2), -Screen:up())
- holoPos(303, R:position())
- D3 = R:distance()
- R = rangerOffset(Dist, Screen:toWorld(vec(-Box:x(), -Box:y(), 0)/2), -Screen:up())
- holoPos(304, R:position())
- D4 = R:distance()
- SP = Screen:pos()
- R = rangerOffset(Dist, SP, -Screen:up())
- LightP = R:position()+vec(200,200,100)
- }
- if(HLoaded & Loaded & T<Res^2 & Start & !Pause){
- while(perf(90) & T<Res^2){
- PX = T%Res
- PY = floor(T/Res)
- ResA = array()
- for(I=1, Sample^2){
- Glass = vec(1)
- ShadowDist = 0
- RPos = Screen:toWorld(vec((PY+((I-1)%Sample)/Sample)*Box:y()/Res-Box:y()/2, (PX+floor((I-1)/Sample)/Sample)*Box:x()/Res-Box:x()/2, 0))
- R = cRanger(Dist, RPos, -Screen:up())
- Dot = clamp(!R:hitWorld()? R:hitNormal():dot(vec(1,1,0.5)) : 1, 0, 1)
- HN = R:hitWorld()? R:hitNormal() :R:entity():toLocalAxis(R:hitNormal())
- if(Colormode==0 | Colormode==1){
- PC = R:hitWorld()? vec(1) :R:entity():getColor()/255
- }else{
- LPos = R:hitWorld()?R:pos() :R:entity():toLocal(R:pos())
- if(abs(HN:z())>0.5){
- PC = hsv2rgb(((sin(LPos:x()*10)*cos(LPos:y()*10)+1)*180+ShadowDist*10)%360, 1, 1)/255
- }elseif(abs(HN:x())>0.5){
- PC = hsv2rgb(((sin(LPos:z()*10)*cos(LPos:y()*10)+1)*180+ShadowDist*10)%360, 1, 1)/255
- }elseif(abs(HN:y())>0.5){
- PC = hsv2rgb(((sin(LPos:x()*10)*cos(LPos:z()*10)+1)*180+ShadowDist*10)%360, 1, 1)/255
- }
- }
- Color = (Dot*PC):mul(Colormode!=2?Glass :vec(1))
- Shadow = 1
- if(R:hit()){
- ShadowDist = 0
- R2 = cRanger(ShadowR, R:position(), vec(1,1,0.5))
- if(R2:hit()){
- Shadow = clamp(ShadowDist/ShadowS+0.3, 0, 1)
- }
- }
- Shine = 5*clamp(10-abs(R:hitNormal():vAng(-Screen:up())-R:hitNormal():vAng(R:position()-LightP)), 0, 10)/255
- TC = vec(1)
- HP = R:hitWorld()? R:position() :R:entity():toLocal(R:position())
- N2 = (signV(HN)-HN)
- TP = N2:mul(HP):rotate(HN:toAngle()+ang(90,0,0))
- if(Textured & Colormode!=2){
- MT = R:matType()
- if(abs(HN:z())>0.5){
- TC = Tex[MT, table][floor((HP:x()/PixelSize)%TRes)+1, array]:vector(floor((HP:y()/PixelSize)%TRes)+1)/255
- }elseif(abs(HN:x())>0.5){
- TC = Tex[MT, table][floor((HP:z()/PixelSize)%TRes)+1, array]:vector(floor((HP:y()/PixelSize)%TRes)+1)/255
- }elseif(abs(HN:y())>0.5){
- TC = Tex[MT, table][floor((HP:z()/PixelSize)%TRes)+1, array]:vector(floor((HP:x()/PixelSize)%TRes)+1)/255
- }
- }
- SSAO = 0
- if(SSAOon){
- for(SI=1, SSAONoS){
- RA = random(0,360)
- SR = cRanger(Dist, RPos+Screen:toWorld(vec(cos(RA), sin(RA), 0)*sqrt(random(0,1))*SSAOSR)-Screen:pos(), -Screen:up())
- SSAO += SR:distance()<R:distance() & abs(R:distance()-SR:distance())<SSAORC
- }
- SSAO = ((SSAONoS-SSAO)/SSAONoS)+0.4
- }else{
- SSAO = 1
- }
- ResultC = clampV(SSAO*TC*Color*Shadow+vec(Shine), 0, 1)
- if(Colormode==0){
- ResultC = vec(ResultC:x()*0.2126+ResultC:y()*0.7152+ResultC:z()*0.0722)
- }
- ResA:pushVector(ResultC*255)
- }
- Result = ResA:avgV()
- S[T] = rgb2digi(clampV(Result, 0, 255), 3)
- T++
- DeltaT++
- }
- if(changed(time())){
- Time = (Res^2-T)/DeltaT
- Times:pushNumber(Time)
- Times:removeNumber(1)
- RTime = Times:average()
- Ht = floor(RTime/3600)
- Mt = floor(RTime/60)%60
- St = floor(RTime%60)
- holoMaterial(101, "models/cheeze/buttons2/"+(Ht%10))
- holoMaterial(102, "models/cheeze/buttons2/"+(floor(Mt/10)%10))
- holoMaterial(103, "models/cheeze/buttons2/"+(Mt%10))
- holoMaterial(104, "models/cheeze/buttons2/"+(floor(St/10)%10))
- holoMaterial(105, "models/cheeze/buttons2/"+(St%10))
- DeltaT=0
- rangerFilter(players())
- }
- if(T==Res^2){
- if(Rec){
- T = 0
- }else{
- for(I=1, 5){
- holoMaterial(100+I, "models/cheeze/buttons2/0")
- }
- Start=T=Pause=Rec = 0
- for(I=1, 8){
- holoAlpha(83+I, 255)
- }
- for(I=1, 4){
- holoAlpha(I+96, 0)
- }
- }
- }
- }
- }
- while(Buffer:count() & holoCanCreate() & perf(90)){
- Val = Buffer:removeArray(1)
- Screen:objMenu(10+MID, Val:vector2(1), Val:vector2(2), Val:string(3), Val:vector(4))
- MID++
- }
- if(Buffer:count()==0 & !HLoaded){
- HLoaded = 1
- holoMaterial(27, "models/cheeze/buttons2/1")
- holoMaterial(28, "models/cheeze/buttons2/2")
- holoMaterial(29, "models/cheeze/buttons2/3")
- holoPos(52, holoEntity(52):toWorld(vec(0,0,0.08)))
- holoPos(68, holoEntity(68):toWorld(vec(0,0,0.08)))
- holoPos(72, holoEntity(72):toWorld(vec(0,0,0.08)))
- holoPos(69, holoEntity(69):toWorld(vec(0,0,0.08)))
- holoPos(70, holoEntity(70):toWorld(vec(0,0,0.08)))
- AB = Screen:aabbSize()
- holoAng(76, holoEntity(76):toWorld(ang(180,180,90)))
- holoScaleUnits(76, vec(33/Canvas:y(), 0.2, 33*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(76, holoEntity(76):toWorld(vec(0,0.05,0)))
- holoMaterial(76, "vgui/bg-lines")
- holoAng(77, holoEntity(77):toWorld(ang(180,180,90)))
- holoScaleUnits(77, vec(33/Canvas:y(), 0.2, 33*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(77, holoEntity(77):toWorld(vec(0,0.05,0)))
- holoMaterial(77, "editor/axis_helper")
- holoAng(78, holoEntity(78):toWorld(ang(180,180,90)))
- holoScaleUnits(78, vec(33/Canvas:y(), 0.2, 33*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(78, holoEntity(78):toWorld(vec(0,0.05,0)))
- holoMaterial(78, "effects/flashlight/tech")
- holoAng(79, holoEntity(79):toWorld(ang(180,0,90)))
- holoScaleUnits(79, vec(33/Canvas:y(), 0.2, 33*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(79, holoEntity(79):toWorld(vec(0,0.05,0)))
- holoAng(80, holoEntity(80):toWorld(ang(180,0,90)))
- holoScaleUnits(80, vec(33/Canvas:y(), 0.2, 33*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(80, holoEntity(80):toWorld(vec(0,0.05,0)))
- holoAng(81, holoEntity(81):toWorld(ang(180,0,90)))
- holoScaleUnits(81, vec(33/Canvas:y(), 0.2, 33*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(81, holoEntity(81):toWorld(vec(0,0.05,0)))
- holoPos(86, holoEntity(86):toWorld(vec(0,0,0.08)))
- holoPos(87, holoEntity(87):toWorld(vec(0,0,0.08)))
- holoClipEnabled(91, 1, 1)
- holoClip(91, 1, vec(-10/Canvas:y(), -5*Max/Canvas:x(), 0):mul(AB), vec(1,-0.5,0), 0)
- holoClipEnabled(91, 2, 1)
- holoClip(91, 2, vec(10/Canvas:y(), -5*Max/Canvas:x(), 0):mul(AB), vec(-1,-0.5,0), 0)
- holoAng(95, holoEntity(95):toWorld(ang(0,45,0)))
- holoAng(96, holoEntity(96):toWorld(ang(0,-45,0)))
- holoMaterial(92, "models/cheeze/buttons2/"+(floor(Res/100)%10))
- holoMaterial(93, "models/cheeze/buttons2/"+(floor(Res/10)%10))
- holoMaterial(94, "models/cheeze/buttons2/"+(Res%10))
- holoAlpha(97, 0)
- holoAlpha(98, 0)
- holoAlpha(99, 0)
- holoAlpha(100, 0)
- holoAng(98, holoEntity(98):toWorld(ang(180,180,90)))
- holoScaleUnits(98, vec(45/Canvas:y(), 0.2, 45*Max/Canvas:x()):mul(vec(AB:x(), AB:z(), AB:y())))
- holoPos(72, holoEntity(69):toWorld(vec(0,127*((PixelSize-MinT)/(MaxT-MinT))*Max/Canvas:x(),0):mul(AB)))
- for(I=1, 5){
- holoMaterial(100+I, "models/cheeze/buttons2/0")
- }
- }
- K = O:keyUse()
- if(O:shootPos():distance(Screen:pos())<500 & $K==1 & O:aimEntity()==Screen & !O:keyAttack1() & HLoaded){
- Open = !Open
- Screen:soundPlay(1, 1, "doors/doormove2.wav")
- soundPitch(1, 255)
- exit()
- }
- if(Open & Sl<Max+0.05){
- Screen:slide(0.02)
- }
- if(!Open & Sl>0.01){
- Screen:slide(-0.02)
- }
- Open = Open
- if(Open){
- if(lookingAt(24, 3)){
- holoColor(24, vec(100))
- if($K==1 & Res>1 & !Start){
- holoEntity(24):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Res /= 2
- holoMaterial(92, "models/cheeze/buttons2/"+(floor(Res/100)%10))
- holoMaterial(93, "models/cheeze/buttons2/"+(floor(Res/10)%10))
- holoMaterial(94, "models/cheeze/buttons2/"+(Res%10))
- S:initScreen(Res)
- }
- }else{
- holoColor(24, vec())
- }
- if(lookingAt(25, 3)){
- holoColor(25, vec(100))
- holoColor(26, vec(100))
- if($K==1 & Res<512 & !Start){
- holoEntity(25):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Res *= 2
- holoMaterial(92, "models/cheeze/buttons2/"+(floor(Res/100)%10))
- holoMaterial(93, "models/cheeze/buttons2/"+(floor(Res/10)%10))
- holoMaterial(94, "models/cheeze/buttons2/"+(Res%10))
- S:initScreen(Res)
- }
- }else{
- holoColor(25, vec())
- holoColor(26, vec())
- }
- if(lookingAt(84, 5) & !Start){
- holoColor(84, vec(100))
- holoColor(85, vec(100))
- if($K==1){
- holoEntity(84):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Start = 1
- for(I=1, 8){
- holoAlpha(83+I, 0)
- }
- holoAlpha(97, 255)
- holoAlpha(99, 255)
- holoAlpha(100, 255)
- exit()
- }
- }else{
- holoColor(84, vec())
- holoColor(85, vec())
- }
- if(lookingAt(88, 5) & !Start){
- holoColor(88, vec(100))
- holoColor(89, vec(100))
- holoColor(90, vec(100))
- holoColor(91, vec(100))
- if($K==1){
- holoEntity(88):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Start=Rec = 1
- for(I=1, 8){
- holoAlpha(83+I, 0)
- }
- holoAlpha(97, 255)
- holoAlpha(99, 255)
- holoAlpha(100, 255)
- exit()
- }
- }else{
- holoColor(88, vec())
- holoColor(89, vec())
- holoColor(90, vec())
- holoColor(91, vec())
- }
- if(lookingAt(84, 5) & Start & !Pause){
- holoColor(99, vec(100))
- holoColor(100, vec(100))
- if($K==1){
- holoEntity(99):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Pause = 1
- holoAlpha(99, 0)
- holoAlpha(100, 0)
- holoAlpha(98, 255)
- exit()
- }
- }else{
- holoColor(99, vec())
- holoColor(100, vec())
- }
- if(lookingAt(84, 5) & Start & Pause){
- holoColor(98, vec(100))
- if($K==1){
- holoEntity(98):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Pause = 0
- holoAlpha(99, 255)
- holoAlpha(100, 255)
- holoAlpha(98, 0)
- exit()
- }
- }else{
- holoColor(98, vec())
- }
- if(lookingAt(97, 5) & Start){
- holoColor(97, vec(100))
- if($K==1){
- holoEntity(97):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- for(I=1, 5){
- holoMaterial(100+I, "models/cheeze/buttons2/0")
- }
- Start=T=Pause=Rec = 0
- for(I=1, 8){
- holoAlpha(83+I, 255)
- }
- for(I=1, 4){
- holoAlpha(I+96, 0)
- }
- }
- }else{
- holoColor(97, vec())
- }
- if($K==1 & !Start){
- if(lookingAt(27, 2.5)){
- holoEntity(27):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Sample = 1
- holoColor(27, vec(0,200,0))
- holoColor(28, vec(255,0,0))
- holoColor(29, vec(255,0,0))
- }elseif(lookingAt(28, 2.5)){
- holoEntity(28):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Sample = 2
- holoColor(27, vec(255,0,0))
- holoColor(28, vec(0,200,0))
- holoColor(29, vec(255,0,0))
- }elseif(lookingAt(29, 2.5)){
- holoEntity(29):soundPlay(1, 0.5, "buttons/button10.wav")
- print("x3 sample is unavailable as it reaches tick quota, to enable this, uncomment lines 599-602")
- #[
- Sample = 3
- holoColor(27, vec(255,0,0))
- holoColor(28, vec(255,0,0))
- holoColor(29, vec(0,200,0))
- ]#
- }elseif(lookingAt(51, 3)){
- holoEntity(51):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- if(SSAOon){
- holoPos(52, holoEntity(52):toWorld(vec(0,-23*Max/Canvas:x(),0):mul(Screen:aabbSize())))
- holoColor(49, vec(100))
- holoColor(50, vec(100))
- holoColor(51, vec(100))
- }else{
- holoPos(52, holoEntity(52):toWorld(vec(0,23*Max/Canvas:x(),0):mul(Screen:aabbSize())))
- holoColor(49, vec(0,200,0))
- holoColor(50, vec(0,200,0))
- holoColor(51, vec(0,200,0))
- }
- SSAOon = !SSAOon
- }elseif(lookingAt(67, 3)){
- holoEntity(67):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- if(Textured){
- holoPos(68, holoEntity(68):toWorld(vec(0,-23*Max/Canvas:x(),0):mul(Screen:aabbSize())))
- holoColor(65, vec(100))
- holoColor(66, vec(100))
- holoColor(67, vec(100))
- }else{
- holoPos(68, holoEntity(68):toWorld(vec(0,23*Max/Canvas:x(),0):mul(Screen:aabbSize())))
- holoColor(65, vec(0,200,0))
- holoColor(66, vec(0,200,0))
- holoColor(67, vec(0,200,0))
- }
- Textured = !Textured
- }elseif(lookingAt(73, 3)){
- holoEntity(73):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Colormode = 0
- holoColor(73, vec(0,200,0))
- holoColor(74, vec())
- holoColor(75, vec())
- }elseif(lookingAt(74, 3)){
- holoEntity(74):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Colormode = 1
- holoColor(73, vec())
- holoColor(74, vec(0,200,0))
- holoColor(75, vec())
- }elseif(lookingAt(75, 3)){
- holoEntity(75):soundPlay(1, 0.5, "buttons/button22.wav")
- soundPitch(1, 255)
- Colormode = 2
- holoColor(73, vec())
- holoColor(74, vec())
- holoColor(75, vec(0,200,0))
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement