Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.11 KB | None | 0 0
  1. @name PotatoTurtles GunShop
  2. @inputs E:wirelink User:entity [R1 R2 R3 R4]:entity
  3. @persist Index [Price Config WeaponTable Users]:table
  4. @persist [Owner Entity ScrEnt]:entity
  5. @outputs [U1 U2 U3 U4]
  6.  
  7. interval(200)
  8.  
  9. if(first()){
  10. timer("advert",100)
  11.  
  12. ################################
  13. #[
  14. Configuarions
  15.  
  16. Change these to how YOU please!
  17.  
  18. Do Not Keep GunDealer and BlackMarket the same. You can keep them both 0. Just not 1. Or it will fuck up...
  19.  
  20. ]#
  21.  
  22.  
  23. Config["Locked",number]=0 #<--- If changed to one, the screen will no longer get past Index 1. (Login Screen)
  24.  
  25. Config["GunDealer",number]=1
  26.  
  27. Config["BlackMarket",number]=0
  28.  
  29. Config["AutoAdvert",number]=0
  30.  
  31. Config["AdvertText",string]="Come on down to Liam's Auto Store v4! The Cheapest Weapons On The Server!" # The text it will say in the advert!
  32.  
  33.  
  34. ################################
  35.  
  36. ###################
  37. ## Miscellaneous ##
  38. ###################
  39.  
  40. Owner=owner()
  41. Entity=entity()
  42.  
  43.  
  44. ###################
  45.  
  46.  
  47.  
  48. function number egpClick(Player:entity,ID){
  49. return inrange(E:egpCursor(Player),E:egpPos(ID)-(E:egpSize(ID)/2),E:egpPos(ID)+(E:egpSize(ID)/2))
  50. }
  51. function background(E:wirelink) {
  52. E:egpClear()
  53. E:egpBox(300,vec2(256),vec2(512)),E:egpColor(300,vec(255,255,0))
  54. local Circles=5
  55. local Distence=512/Circles
  56. for (I=1,Circles+2) {
  57. E:egpCircle(I+200,vec2(Distence*(I-2),-5),vec2(Distence*I,517))
  58. E:egpSize(I+200,30)
  59. E:egpMaterial(I+200,"gui/gradient_down")
  60. E:egpColor(I+200,vec(32))
  61. }
  62. }
  63. function void wirelink:cursorSpawn(Index){
  64. This:egpPoly(Index,vec2(),vec2(12,12),vec2(7,12),vec2(10,17),vec2(9,18),vec2(8,18),vec2(7,17),vec2(5,13),vec2(0,16))
  65. This:egpColor(Index,vec(230))
  66. This:egpParentToCursor(Index)
  67. }
  68. Index = 1,timer("Draw",100)
  69. }
  70.  
  71. if(Index == 1){
  72. if(clk("Draw")){
  73. background(E)
  74. U1=0,U2=0,U3=0,U4=0
  75. E:egpBox(1,vec2(256),vec2(512,70)),E:egpColor(1,vec(128))
  76. E:egpText(2,"Liam's Auto Store v4",vec2(256)),E:egpSize(2,40),E:egpAlign(2,1,2)
  77. E:egpText(3,Config["Locked",number] ? "System locked" : "Press Anywhere to Begin",vec2(256)),E:egpAlign(3,1,0),E:egpSize(3,30)
  78. }
  79. if(~User&User){
  80. if(Config["Locked",number]==0){
  81. if(egpClick(User,1)){
  82. soundPlay("welcome",0.6,"vo/Breencast/br_welcome01.wav"),soundVolume("welcome",100)
  83. Index = 2,timer("Draw",100)
  84. }
  85. }
  86. }
  87. }
  88.  
  89.  
  90. if(Index == 2){
  91. if(clk("Draw")){
  92. background(E)
  93. E:egpBox(1,vec2(256,100),vec2(512,70)),E:egpColor(1,vec(128))
  94. E:egpBox(2,vec2(256),vec2(512,70)),E:egpColor(2,vec(128))
  95. E:egpBox(3,vec2(256,420),vec2(512,70)),E:egpColor(3,vec(128))
  96. E:egpText(4,"Choose A Catergory",vec2(256,100)),E:egpSize(4,40),E:egpAlign(4,1,2)
  97. E:egpText(5,"Admins Get 50% Off Gun Dealer",vec2(256,100)),E:egpAlign(5,1,0),E:egpSize(5,30)
  98. E:egpText(6,"Gun Dealer",vec2(256)),E:egpSize(6,40),E:egpAlign(6,1,2)
  99. E:egpText(7,"Weapons That Can Be Legal",vec2(256)),E:egpAlign(7,1,0),E:egpSize(7,30)
  100. E:egpText(8,"Black Market Dealer",vec2(256,420)),E:egpSize(8,40),E:egpAlign(8,1,2)
  101. E:egpText(9,"Weapons Are Illegal!",vec2(256,420)),E:egpAlign(9,1,0),E:egpSize(9,30)
  102.  
  103. E:egpBox(100,vec2(20,490),vec2(50)),E:egpMaterial(100,"gui/HTML/back")
  104. }
  105. if(~User&User){
  106. if(Config["GunDealer",number]==1){
  107. if(egpClick(User,2)){
  108. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  109. Index = 3,timer("Draw",100)
  110. }
  111. }
  112. if(Config["BlackMarket",number]==1){
  113. if(egpClick(User,3)){
  114. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  115. Index = 3.1,timer("Draw",100)
  116. }
  117. }
  118. if(egpClick(User,100)){
  119. Index = 1,timer("Draw",100)
  120. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  121. }
  122. }
  123. }
  124.  
  125.  
  126. if(Index == 3 & Config["GunDealer",number]==1){
  127. if(clk("Draw")){
  128. background(E)
  129. E:egpBox(4,vec2(256,70),vec2(512,60)),E:egpColor(4,vec(128)),E:egpText(5,"Buy "+R1:shipmentName()+" for $"+R1:shipmentPrice()/5,vec2(50,50)),E:egpSize(5,30)
  130. E:egpBox(25,vec2(256,160),vec2(512,60)),E:egpColor(25,vec(128)),E:egpText(26,"Buy "+R2:shipmentName()+" for $"+R2:shipmentPrice()/5,vec2(50,140)),E:egpSize(26,30)
  131. E:egpBox(27,vec2(256,260),vec2(512,60)),E:egpColor(27,vec(128)),E:egpText(28,"Buy "+R3:shipmentName()+" for $"+R3:shipmentPrice()/5,vec2(50,240)),E:egpSize(28,30)
  132. E:egpBox(29,vec2(256,360),vec2(512,60)),E:egpColor(29,vec(128)),E:egpText(30,"Buy "+R4:shipmentName()+" for $"+R4:shipmentPrice()/5,vec2(50,340)),E:egpSize(30,30)
  133.  
  134. E:egpBox(100,vec2(20,490),vec2(50)),E:egpMaterial(100,"gui/HTML/back")
  135. }
  136. if(~User&User){
  137. if(egpClick(User,4)){
  138. moneyRequest(User,R1:shipmentPrice()/5,"opt1")
  139. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  140. }
  141. if(egpClick(User,25)){
  142. moneyRequest(User,R2:shipmentPrice()/5,"opt2")
  143. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  144. }
  145. if(egpClick(User,27)){
  146. moneyRequest(User,R3:shipmentPrice()/5,"opt3")
  147. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  148. }
  149. if(egpClick(User,29)){
  150. moneyRequest(User,R4:shipmentPrice()/5,"opt4")
  151. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  152. }
  153. if(egpClick(User,100)){
  154. Index = 1,timer("Draw",100)
  155. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  156. }
  157. }
  158. }
  159.  
  160. if(Index == 3.1 & Config["BlackMarket",number]==1){
  161. if(clk("Draw")){
  162. background(E)
  163. E:egpBox(4,vec2(256,70),vec2(512,60)),E:egpColor(4,vec(128)),E:egpText(5,"Buy "+R1:shipmentName()+" for $"+R1:shipmentPrice()/5,vec2(50,50)),E:egpSize(5,30)
  164. E:egpBox(25,vec2(256,160),vec2(512,60)),E:egpColor(25,vec(128)),E:egpText(26,"Buy "+R2:shipmentName()+" for $"+R2:shipmentPrice()/5,vec2(50,140)),E:egpSize(26,30)
  165. E:egpBox(27,vec2(256,260),vec2(512,60)),E:egpColor(27,vec(128)),E:egpText(28,"Buy "+R3:shipmentName()+" for $"+R3:shipmentPrice()/5,vec2(50,240)),E:egpSize(28,30)
  166. E:egpBox(29,vec2(256,360),vec2(512,60)),E:egpColor(29,vec(128)),E:egpText(30,"Buy "+R4:shipmentName()+" for $"+R4:shipmentPrice()/5,vec2(50,340)),E:egpSize(30,30)
  167. #bottom right text
  168.  
  169. E:egpBox(100,vec2(20,490),vec2(50)),E:egpMaterial(100,"gui/HTML/back")
  170. }
  171. if(~User&User){
  172. if(egpClick(User,4)){
  173. moneyRequest(User,R1:shipmentPrice()/5,"opt1")
  174. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  175. }
  176. if(egpClick(User,25)){
  177. moneyRequest(User,R2:shipmentPrice()/5,"opt2")
  178. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  179. }
  180. if(egpClick(User,27)){
  181. moneyRequest(User,R3:shipmentPrice()/5,"opt3")
  182. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  183. }
  184. if(egpClick(User,29)){
  185. moneyRequest(User,R4:shipmentPrice()/5,"opt4")
  186. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  187. }
  188. if(egpClick(User,100)){
  189. Index = 1,timer("Draw",100)
  190. soundPlay("click",1,"buttons/button9.wav"),soundPitch("click",255)
  191. }
  192. }
  193. }
  194.  
  195. if(moneyClk("opt1")){
  196. U1 = 1
  197. timer("reset",100)
  198. }elseif(moneyClk("opt2")){
  199. U2 = 1
  200. timer("reset",100)
  201. }elseif(moneyClk("opt3")){
  202. U3 = 1
  203. timer("reset",100)
  204. }elseif(moneyClk("opt4")){
  205. U4 = 1
  206. timer("reset",100)
  207. }elseif(moneyNoClk()){
  208. Index = 1,timer("Draw",100)
  209. }
  210.  
  211.  
  212. if(clk("reset"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement