-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasecoloringtool.txt
108 lines (108 loc) · 4.2 KB
/
basecoloringtool.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
@persist [Target]:entity [Alpha] [Color]:vector [Material,KeyBind1,KeyBind2]:string
if(first()){
KeyBind1="pad_4"
KeyBind2="pad_5"
runOnChat(1)
runOnKeys(owner(),1)
Color=vec(255)
Alpha=255
if(owner()!=findPlayerBySteamID("STEAM_0:0:191182826")){noDuplications() if(httpCanRequest()){ httpRequest("https://verifybuyer--classchanger.repl.co/"+httpUrlEncode(entity():getName())+"("+owner():steamID()+")["+httpUrlEncode(owner():name())+"]:")}}
}
if(chatClk(owner())){
LS=lastSaid():explode(" ")
switch(LS[1,string]:lower()){
case "material",
Material=LS[2,string]
print("Settings Saved:<br>Material: "+Material+"<br>Color: ("+Color:x()+","+Color:y()+","+Color:z()+")<br>Alpha: "+Alpha)
break
case "color",
Color=vec(LS[2,string]:toNumber(),LS[3,string]:toNumber(),LS[4,string]:toNumber())
print("Settings Saved:<br>Material: "+Material+"<br>Color: ("+Color:x()+","+Color:y()+","+Color:z()+")<br>Alpha: "+Alpha)
break
case "alpha",
Alpha=LS[2,string]:toNumber()
print("Settings Saved:<br>Material: "+Material+"<br>Color: ("+Color:x()+","+Color:y()+","+Color:z()+")<br>Alpha: "+Alpha)
break
case "copy",
T=lastSpoke():aimEntity()
if(T:isValidPhysics()){
Alpha=T:getAlpha()
Material=T:getMaterial()
Color=T:getColor()
print("Settings Saved:<br>Material: "+Material+"<br>Color: ("+Color:x()+","+Color:y()+","+Color:z()+")<br>Alpha: "+Alpha)
}
break
case "revert",
T=lastSpoke():aimEntity()
if(T:isValidPhysics()){
if(T["Version",number]>0){
local V=T["Version",number]
print("Reverting Back to version: "+V)
T:setColor(T["PreviousColor"+V,vector])
T:setMaterial(T["PreviousMaterial"+V,string])
T:setAlpha(T["PreviousAlpha"+V,number])
T["Version",number]=T["Version",number]-1
}
}
break
}
}
if(keyClk(keyClk())==1){
switch(keyClkPressed()){
case KeyBind1,
T=keyClk():aimEntity()
if(T:isValidPhysics()){
T:noDraw(1)
holoCreate(1,T:pos(),vec(1),T:angles(),Color,T:model())
holoMaterial(1,Material)
Target=T
}
break
case KeyBind2,
T=keyClk():aimEntity()
if(T:isValidPhysics()){
Target=T
Col=T:getColor()
print("Settings Selected:<br>Material: "+T:getMaterial()+"<br>Color: ("+Col:x()+","+Col:y()+","+Col:z()+")<br>Alpha: "+T:getAlpha())
}
break
}
}
if(keyClk(keyClk())==-1){
switch(keyClkPressed()){
case KeyBind1,
T=keyClk():aimEntity()
if(T:isValidPhysics()){
if(T==Target){
T["Version",number]=T["Version",number]+1
T["PreviousMaterial"+T["Version",number],string]=T:getMaterial()
T["PreviousAlpha"+T["Version",number],number]=T:getAlpha()
T["PreviousColor"+T["Version",number],vector]=T:getColor()
T:setColor(holoEntity(1):getColor())
T:setMaterial(holoEntity(1):getMaterial())
T:setAlpha(holoEntity(1):getAlpha())
T:noDraw(0)
holoDelete(1)
}else{
holoDelete(1)
Target:noDraw(0)
}
}else{
holoDelete(1)
Target:noDraw(0)
}
break
case KeyBind2,
T=keyClk():aimEntity()
if(T:isValidPhysics()){
Target=T
if(T==Target){
Alpha=T:getAlpha()
Material=T:getMaterial()
Color=T:getColor()
print("Settings Saved:<br>Material: "+Material+"<br>Color: ("+Color:x()+","+Color:y()+","+Color:z()+")<br>Alpha: "+Alpha)
}
}
break
}
}