Advertisement
CREONIX

EXPLOIT HOVERBOARD

Sep 21st, 2018
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.30 KB | None | 0 0
  1. hostname: [UK][NEW] Rustic Roleplay 2.0 | Mining | Refined | Oil | Custom
  2. version : 18.02.07/24 7220 secure
  3. udp/ip : 54.36.224.253:27015 -- FIXED (пофиксилииии)
  4. map : rp_downtown_tits_v1 at: 0 x, 0 y, 0 z
  5.  
  6. // ADDED FREE HOVERBOARD
  7. table.insert( HoverboardTypes, {
  8. bonus = {
  9. twist = 6,
  10. flip = 6,
  11. speed = 6,
  12. jump = 6,
  13. turn = 6
  14. },
  15. Price = 1, -- PRICE IS 0
  16. mcontrol = 5,
  17. shake = 5,
  18. trailsize = math.Clamp( 2, 0, 10 ),
  19. height = math.Clamp( 55, 36, 100 ),
  20. viewdist = math.Clamp( 125, 64, 256 ),
  21. trail = Vector( 10, 10, 10 ),
  22. boost = Vector( 10, 10, 10 ),
  23. recharge = Vector( 10, 10, 10 ),
  24. attributes = {
  25. speed = math.Clamp( 10, 0, 15 ),
  26. jump = math.Clamp( 10, 0, 15 ),
  27. turn = math.Clamp( 10, 0, 15 ),
  28. flip = math.Clamp( 10, 0, 15 ),
  29. twist = math.Clamp( 10, 0, 15 ),
  30. },
  31. model = "models/squint_hoverboard/hotrod.mdl",
  32. name = "HotRod",
  33. rotation = 90,
  34. driver = Vector( 1.5, 0, -1.5 ),
  35. effect_1 = {
  36. effect = "plasma_thruster_middle",
  37. position = Vector( 11, 22, 0 ),
  38. normal = Vector( 0, 1.85, 0.90 ),
  39. },
  40. effect_2 = {
  41. effect = "plasma_thruster_middle",
  42. position = Vector( -11, 22, 0 ),
  43. normal = Vector( 0, 1.85, 0.90 ),
  44. },
  45. effect_3 = {
  46. effect = "plasma_thruster_middle",
  47. position = Vector( 11, 27.5, 0 ),
  48. normal = Vector( 0, 1.85, 0.90 ),
  49. },
  50. effect_4 = {
  51. effect = "plasma_thruster_middle",
  52. position = Vector( -11, 27.5, 0 ),
  53. normal = Vector( 0, 1.85, 0.90 ),
  54. },
  55. effect_5 = {
  56. effect = "plasma_thruster_middle",
  57. position = Vector( 11, 33, 0 ),
  58. normal = Vector( 0, 1.85, 0.90 ),
  59. },
  60. effect_6 = {
  61. effect = "plasma_thruster_middle",
  62. position = Vector( -11, 33, 0 ),
  63. normal = Vector( 0, 1.85, 0.90 ),
  64. },
  65. effect_7 = {
  66. effect = "trail",
  67. position = Vector( 8.5, 40, -2.5 ),
  68. },
  69. effect_8 = {
  70. effect = "trail",
  71. position = Vector( -8.5, 40, -2.5 ),
  72. },
  73. files = {
  74. "materials/models/squint_hoverboard/hotrod/hotrod.vmt",
  75. "materials/models/squint_hoverboard/hotrod/hotrod.vtf",
  76. }
  77. } )
  78.  
  79. // MENU BUY HOVERBOARD
  80. concommand.Add("creo_menu",function()
  81. -- Don't draw the frame if it already exists.
  82. if IsValid(gHoverDealer_Frame) then return end
  83.  
  84. -- The frame itself.
  85. gHoverDealer_Frame = vgui.Create( "DFrame" )
  86. gHoverDealer_Frame:SetSize( 700, 500 )
  87. gHoverDealer_Frame:SetTitle( "" )
  88. gHoverDealer_Frame:MakePopup()
  89. gHoverDealer_Frame:SetDraggable( false )
  90. gHoverDealer_Frame:SetVisible( true )
  91. gHoverDealer_Frame:Center()
  92. gHoverDealer_Frame:ShowCloseButton( false )
  93. -- Cache the icon here if it exists.
  94. local gradRight = Material("vgui/gradient-l")
  95. gHoverDealer_Frame.Paint = function( self, w, h )
  96.  
  97. -- Background.
  98. surface.SetDrawColor( gHoverDealer.Config.ClientSide.Background_Color )
  99. surface.DrawRect( 0, 0, w, h )
  100.  
  101. -- Gradient.
  102. surface.SetMaterial( gradRight )
  103. surface.SetDrawColor( gHoverDealer.Config.ClientSide.BackgroundTabGrad_Color )
  104. surface.DrawTexturedRect( 0, 0, w, 50 )
  105.  
  106. -- Left Line.
  107. surface.SetDrawColor( gHoverDealer.Config.ClientSide.LeftLine_Color )
  108. surface.DrawRect( 0, 0, 3, h )
  109.  
  110. -- Right Line.
  111. surface.SetDrawColor( gHoverDealer.Config.ClientSide.RightLine_Color )
  112. surface.DrawRect( w-3, 0, 3, h )
  113.  
  114. -- Title.
  115. draw.SimpleText(gHoverDealer.Config.ClientSide.Menu_Title, "gHoverDealer_ShopUIFont", 10, 25, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER)
  116.  
  117. end
  118.  
  119. -- Close button.
  120. gHoverDealer_CloseButton = vgui.Create( "DButton", gHoverDealer_Frame )
  121. gHoverDealer_CloseButton:SetPos( gHoverDealer_Frame:GetWide()-53, 0 )
  122. gHoverDealer_CloseButton:SetSize( 50, 50 )
  123. gHoverDealer_CloseButton:SetText( "" )
  124. gHoverDealer_CloseButton.Paint = function(self, w, h)
  125. if self:IsHovered() then
  126. surface.SetDrawColor( Color(215,25,25) )
  127. surface.DrawRect(0,0,w,h)
  128. end
  129. draw.SimpleText( 'X', "gHoverDealer_ShopUIFont", w/2, h/2, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER )
  130. end
  131. gHoverDealer_CloseButton.DoClick = function()
  132. if IsValid(gHoverDealer_Frame) then
  133. gHoverDealer_Frame:Close()
  134. end
  135. end
  136.  
  137. -- Create the list to hold all the players lines.
  138. gHoverDealer_ShopList = vgui.Create("DPanelList", gHoverDealer_Frame )
  139. gHoverDealer_ShopList:SetSize( gHoverDealer_Frame:GetWide()-6, gHoverDealer_Frame:GetTall() - 70 )
  140. gHoverDealer_ShopList:SetPos( 3, 60 )
  141. gHoverDealer_ShopList:EnableHorizontal(false)
  142. gHoverDealer_ShopList:EnableVerticalScrollbar(false)
  143. gHoverDealer_ShopList:SetSpacing(8)
  144. -- Paint the Panel list empty, this avoids a white box replacing it.
  145. gHoverDealer_ShopList.Paint = function(self, w, h) end
  146.  
  147. -- This is the panel that holds the chosenopponents.
  148. local Potentialchosenopponents = vgui.Create("DPanel", gHoverDealer_Frame)
  149. Potentialchosenopponents:SetPos(3, 60)
  150. Potentialchosenopponents:SetSize(gHoverDealer_Frame:GetWide()-6, gHoverDealer_Frame:GetTall()-60)
  151. Potentialchosenopponents.Paint = function(self, w, h)
  152. draw.RoundedBox(0, 10, 30, w-20, 2, Color(2,170,235,230) )
  153. draw.SimpleText("Pick a HoverBoard: Click to Spawn/Purchase!", "gHoverDealer_ShopUIFont", w/2, 30, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
  154. end
  155.  
  156. --
  157. Potentialchosenopponents.scroll = vgui.Create("DScrollPanel", Potentialchosenopponents)
  158. Potentialchosenopponents.scroll:SetPos(0, 35)
  159. Potentialchosenopponents.scroll:SetSize(Potentialchosenopponents:GetWide()+15, Potentialchosenopponents:GetTall()-35)
  160.  
  161.  
  162. for k, v in pairs(HoverboardTypes) do
  163. gHoverDealer_ShopItem = vgui.Create("DPanel",Potentialchosenopponents.scroll)
  164. gHoverDealer_ShopItem:SetSize(120, 120)
  165. gHoverDealer_ShopItem:SetText("")
  166. gHoverDealer_ShopItem:Dock(TOP)
  167. -- Cache the icon here if it exists.
  168. local gradRight = Material("vgui/gradient-l")
  169. gHoverDealer_ShopItem.Paint = function(self, w, h)
  170.  
  171. -- Gradient.
  172. surface.SetMaterial( gradRight )
  173. surface.SetDrawColor( Color(55,55,55,220) )
  174. surface.DrawTexturedRect( 0, 0, w, h )
  175.  
  176. surface.SetDrawColor( Color(255,255,255) )
  177. surface.DrawOutlinedRect(0,0,w,h)
  178.  
  179. draw.SimpleText(v.name, "gHoverDealer_ShopDescriptionFont", 120, h/2, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  180. draw.SimpleText(DarkRP.formatMoney(v.Price), "gHoverDealer_ShopItemFont", 445, 65, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
  181.  
  182. if table.HasValue(gHoverDealer_Hoverboards, v.name) then
  183. draw.SimpleText("OWNED", "gHoverDealer_ShopItemFont", 330, 65, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_CENTER, TEXT_ALIGN_BOTTOM)
  184. end
  185.  
  186. end
  187.  
  188. gHoverDealer_ReturnButton = vgui.Create("DButton", gHoverDealer_ShopItem )
  189. gHoverDealer_ReturnButton:SetSize(90, 40)
  190. gHoverDealer_ReturnButton:SetPos(500, 35)
  191. gHoverDealer_ReturnButton:SetText("")
  192. gHoverDealer_ReturnButton.Paint = function(self, w, h)
  193.  
  194. surface.SetDrawColor( gHoverDealer.Config.ClientSide.ReturnButton_Color )
  195. surface.DrawRect( 0, 0, w, h )
  196.  
  197. if self:IsHovered() then
  198. surface.SetDrawColor( gHoverDealer.Config.ClientSide.ButtonOutline_Color )
  199. surface.DrawOutlinedRect(0,0,w,h)
  200. end
  201.  
  202. draw.SimpleText("Return", "gHoverDealer_ShopDescriptionFont", 25, 25, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  203.  
  204. end
  205. gHoverDealer_ReturnButton.DoClick = function()
  206.  
  207. net.Start("gHoverDealer_ReturnItem")
  208. net.WriteTable(v)
  209. net.SendToServer()
  210.  
  211. end
  212.  
  213. gHoverDealer_PurchaseButton = vgui.Create("DButton", gHoverDealer_ShopItem )
  214. gHoverDealer_PurchaseButton:SetSize(90, 40)
  215. gHoverDealer_PurchaseButton:SetPos(600, 35)
  216. gHoverDealer_PurchaseButton:SetText("")
  217. gHoverDealer_PurchaseButton.Paint = function(self, w, h)
  218.  
  219. surface.SetDrawColor( gHoverDealer.Config.ClientSide.PurchaseButton_Color )
  220. surface.DrawRect( 0, 0, w, h )
  221.  
  222. if self:IsHovered() then
  223. surface.SetDrawColor( gHoverDealer.Config.ClientSide.ButtonOutline_Color )
  224. surface.DrawOutlinedRect(0,0,w,h)
  225. end
  226.  
  227. draw.SimpleText("Purchase", "gHoverDealer_ShopDescriptionFont", 20, 25, gHoverDealer.Config.Base.Font_Color, TEXT_ALIGN_LEFT, TEXT_ALIGN_BOTTOM)
  228.  
  229. end
  230. gHoverDealer_PurchaseButton.DoClick = function()
  231.  
  232. net.Start("gHoverDealer_BuyItem")
  233. net.WriteTable(v)
  234. net.SendToServer()
  235.  
  236. end
  237.  
  238. -- The 3d model
  239. local icon = vgui.Create( "DModelPanel", gHoverDealer_ShopItem )
  240. icon:SetPos(0,0)
  241. icon:SetSize(130,100)
  242. icon:SetModel(v.model)
  243.  
  244. local mn, mx = icon.Entity:GetRenderBounds()
  245. local size = 0
  246. size = math.max( size, math.abs( mn.x ) + math.abs( mx.x ) )
  247. size = math.max( size, math.abs( mn.y ) + math.abs( mx.y ) )
  248. size = math.max( size, math.abs( mn.z ) + math.abs( mx.z ) )
  249. icon:SetFOV( 45 )
  250. icon:SetCamPos( Vector( size+4, size+4, size+4 ) )
  251. icon:SetLookAt( ( mn + mx ) * 0.5 )
  252. function icon:LayoutEntity(Entity) end
  253.  
  254. Potentialchosenopponents.scroll:Add(gHoverDealer_ShopItem)
  255.  
  256. end
  257.  
  258. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement