Advertisement
RCAProduction

Untitled

Nov 26th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.79 KB | None | 0 0
  1. --RCA's HUD
  2. --Please use cracker64's script manager
  3. --VER 13 UPDATE {Not Available At Current Time}
  4.  
  5. --Version 13
  6.  
  7. print("RCA's HUD")
  8. print("Version XIII")
  9. print("Have Fun!")
  10.  
  11. local turquoiseOnScript = MANAGER.getsetting("RCA", "turquoiseOn")
  12.  
  13. local rclr, gclr, bclr = 0, 255, 165
  14. local rSlider, gSlider, bSlider, rtext, btext, gtext
  15. local defaultc, purplec, turquoisec, realisticCheck
  16. local coloruw
  17.  
  18. if not tpt.version.jacob1s_mod then --support jacob1's mod (jacob1 edit)
  19. --Windows
  20. local window1 = Window:new(-1, -1, 611, 383)
  21. local creditw = Window:new(-1, -1, 611, 383)
  22. local infow = Window:new(-1, -1, 611, 383)
  23. colourw = Window:new(-1, -1, 611, 383)
  24. local messagew = Window:new(-1, -1, 611, 383)
  25. local realisticw = Window:new(-1, -1, 611, 383)
  26.  
  27. --Texts
  28. local creditsttl = Label:new(270, 1, 50, 15, "CREDITS")
  29. local creditstxt = Label:new(1, 20, 611, 15, "Jacob1, Cracker 64, and the knowledge gained from all Lua programmers in TPT.")
  30. local infotxt = Label:new(1, 20, 611, 15, "How to use RCA's HUD (XIII V.2):")
  31. local instructions = Label:new(1, 40, 611, 15, "To turn the HUD on or off, use the H key on your keyboard.")
  32. local instructions2 = Label:new(1, 60, 611, 15, "To turn on or off the extra level of the HUD (TMP2, VX, VY) use the D key.")
  33. local instructions3 = Label:new(1, 80, 611, 15, "Pressing the M key will engage Realistic Mode. Every five frames WTRV is turned into DSTW")
  34. local instructions4 = Label:new(1, 90, 611, 15, "and all pixels are reset to normal temp. Press M again to turn off.")
  35. local rca = Label:new(500, 5, 100, 15, "RCA Production (2014)")
  36. rtext = Label:new(275, 10, 50, 15)
  37. rtext:text("0")
  38. gtext = Label:new(275, 40, 50, 15)
  39. gtext:text("255")
  40. btext = Label:new(275, 70, 50, 15)
  41. btext:text("165")
  42. local redl = Label:new(325, 10, 50, 15, "Red")
  43. local greenl = Label:new(325, 40, 50, 15, "Green")
  44. local bluel = Label:new(325, 70, 50, 15, "Blue")
  45. local messageText = Label:new(5, 5, 611, 15, "Hallo Sam. Jeg elsker deg... Du er veldig vakker... Jeg er forelsket.")
  46. local messageQuote1 = Label:new(5, 25, 611, 15, "Never get tired of doin' little things for others. Sometimes those little things occupy")
  47. local messageQuote2 = Label:new(5, 40, 611, 15, "the biggest part of their hearts. -lostfox")
  48.  
  49. --Red Slider
  50. rSlider = Slider:new(10, 10, 255, 15, 255)
  51. rSlider:value(0)
  52. --Green Slider
  53. gSlider = Slider:new(10, 40, 255, 15, 255)
  54. gSlider:value(255)
  55. --Blue Slider
  56. bSlider = Slider:new(10, 70, 255, 15, 255)
  57. bSlider:value(165)
  58.  
  59. rSlider:onValueChanged(function() rclr = rSlider:value() rtext:text(rclr) end)
  60. gSlider:onValueChanged(function() gclr = gSlider:value() gtext:text(gclr) end)
  61. bSlider:onValueChanged(function() bclr = bSlider:value() btext:text(bclr) end)
  62.  
  63. --Checkbox Default
  64. defaultc = Checkbox:new(10, 100, 10, 10, "Default")
  65. --Checkbox Purple
  66. purplec = Checkbox:new(10, 120, 10, 10, "Purple")
  67. --Checkbox Turquoise
  68. turquoisec = Checkbox:new(10, 140, 10, 10, "Turquoise")
  69. if turquoisec:checked() == false then
  70.     turquoisec:checked(turquoiseOnScript)
  71.     end
  72. --Realistic Checkbox (Turns realistic ability off)
  73. realisticCheck = Checkbox:new(10, 10, 10, 10, "Disable Realistic Mode")
  74. realisticCheck:checked(false)
  75.  
  76. --Credits Button
  77. local credits = Button:new(5, 5, 50, 15, "Credits")
  78. credits:action(function() ui.showWindow(creditw) end)
  79. --Close Credits Button
  80. local close2 = Button:new(508, 365, 100, 15, "Close Credits")
  81. close2:action(function() ui.closeWindow(creditw) end)
  82. --Info Button
  83. local info = Button:new(5, 25, 50, 15, "Info")
  84. info:action(function() ui.showWindow(infow) end)
  85. --Close Info Button
  86. local close3 = Button:new(508, 365, 100, 15, "Close Info")
  87. close3:action(function() ui.closeWindow(infow) end)
  88. --Colour Button
  89. local colourButton = Button:new(5, 45, 50, 15, "Colours")
  90. colourButton:action(function() ui.showWindow(colourw) end)
  91. --Close Colour Window
  92. local closeColour = Button:new(508, 365, 100, 15, "Close Colours")
  93. closeColour:action(function() ui.closeWindow(colourw) end)
  94. --Realistic Mode
  95. local realisticb = Button:new(5, 65, 50, 15, "Realistic")
  96. realisticb:action(function() ui.showWindow(realisticw) end)
  97. --Close Realistic
  98. local realisticc = Button:new(508, 365, 100, 15, "Close Realistic")
  99. realisticc:action(function() ui.closeWindow(realisticw) end)
  100. --Message
  101. local message = Button:new(5, 85, 50, 15, "Message")
  102. message:action(function() ui.showWindow(messagew) end)
  103. --Close Message
  104. local messagec = Button:new(508, 365, 100, 15, "Close Message")
  105. messagec:action(function() ui.closeWindow(messagew) end)
  106.  
  107. --I Button
  108. local infoButton = Button:new(597, 1, 15, 15, "I", "Info about RCA's HUD - Extras")
  109. infoButton:visible(false)
  110. infoButton:action(function() ui.showWindow(window1) end)
  111. --Exit Button
  112. local enterButton = Button:new(558, 365, 50, 15, "Exit")
  113. enterButton:action(function() ui.closeWindow(window1) end)
  114. --C Button
  115. local closeButton = Button:new(597, 97, 15, 15, "C", "Close")
  116. closeButton:visible(false)
  117. closeButton:action(function() infoButton:visible(false) closeButton:visible(false) end)
  118.  
  119. --E Button
  120. local extraButton = Button:new(613, 97, 15, 15, "E", "Extra Menu - Elements - Info")
  121. extraButton:action(function() infoButton:visible(true) closeButton:visible(true) end)
  122.  
  123. window1:addComponent(rca)
  124. window1:addComponent(enterButton)
  125. window1:addComponent(credits)
  126. window1:addComponent(info)
  127. window1:addComponent(colourButton)
  128. window1:addComponent(message)
  129. window1:addComponent(realisticb)
  130.  
  131. creditw:addComponent(close2)
  132. creditw:addComponent(creditsttl)
  133. creditw:addComponent(creditstxt)
  134.  
  135. infow:addComponent(infotxt)
  136. infow:addComponent(close3)
  137. infow:addComponent(instructions)
  138. infow:addComponent(instructions2)
  139. infow:addComponent(instructions3)
  140. infow:addComponent(instructions4)
  141.    
  142. colourw:addComponent(rSlider)
  143. colourw:addComponent(rtext)
  144. colourw:addComponent(closeColour)
  145. colourw:addComponent(gSlider)
  146. colourw:addComponent(bSlider)
  147. colourw:addComponent(gtext)
  148. colourw:addComponent(btext)
  149. colourw:addComponent(redl)
  150. colourw:addComponent(greenl)
  151. colourw:addComponent(bluel)
  152. colourw:addComponent(purplec)
  153. colourw:addComponent(defaultc)
  154. colourw:addComponent(turquoisec)
  155.    
  156. realisticw:addComponent(realisticc)
  157. realisticw:addComponent(realisticCheck)
  158.  
  159. messagew:addComponent(messagec)
  160. messagew:addComponent(messageText)
  161. messagew:addComponent(messageQuote1)
  162. messagew:addComponent(messageQuote2)
  163.  
  164. ui.addComponent(extraButton)
  165. ui.addComponent(infoButton)
  166. ui.addComponent(closeButton)
  167. end
  168.  
  169. hudon = true
  170. hudon2 = false
  171.  
  172. function keyclicky(key, nkey, modifier, event)
  173.     if (key == "h" and event == 1) then
  174.         hudon = not hudon
  175.         hudon2 = false
  176.     end
  177.     if (key == "d" and event == 1) and hudon == true then
  178.         hudon2 = not hudon2
  179.     end
  180. end
  181.  
  182. tpt.register_keypress(keyclicky)
  183.  
  184. function DrawHUD()  
  185.    
  186. MANAGER.savesetting("RCA", "turqoiseOn", turquoisec:checked())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement