Advertisement
assviolator9001

Untitled

Mar 31st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.37 KB | None | 0 0
  1. CreateClientConVar( "spell_spam", 0, false, false )
  2. CreateClientConVar( "spell_spell", "Avada kedavra", false, false )
  3. concommand.Add("openspell",function() proccess_harry() end)
  4. function proccess_harry()
  5. if unexpected_condition then print("Error in proccess_mainmenu") end
  6. -- Create Background
  7. local ply = LocalPlayer()
  8. local MainBackground = vgui.Create("DFrame")
  9. MainBackground:SetSize(300,180)
  10. MainBackground:SetPos((ScrW()/2)-(MainBackground:GetWide()/2), (ScrH()/2)-(MainBackground:GetTall()/2))
  11. MainBackground:SetTitle("Harry Potter Spell Exploit")
  12. MainBackground:SetVisible(true)
  13. MainBackground:SetDraggable(true)
  14. MainBackground:ShowCloseButton(true)
  15. MainBackground:SetDeleteOnClose(true)
  16. MainBackground:MakePopup()
  17. MainBackground.Paint = function()
  18. draw.RoundedBox(4, 0, 0, MainBackground:GetWide(), MainBackground:GetTall(), Color(0, 0, 200, 200))
  19. end
  20. -- Spell Input
  21. local SpellInput = vgui.Create("DButton", MainBackground)
  22. SpellInput:SetPos((MainBackground:GetWide()/4), 30)
  23. SpellInput:SetTall(20)
  24. SpellInput:SetWide(MainBackground:GetWide()/2)
  25. SpellInput:SetText("Set Spell")
  26. SpellInput.DoClick = function ()
  27. Derma_StringRequest("Select Spell","Enter the name of the spell","", function(text)
  28. local wandweapon = LocalPlayer():GetActiveWeapon()
  29. for k,v in ipairs(hp_mstick.GetMagic()) do
  30. if v.name == text then
  31. for j,z in ipairs(LocalPlayer():GetWeapons()) do
  32. if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand" then
  33. net.Start("setMagicTypeHP")
  34. net.WriteEntity(z)
  35. net.WriteString(text)
  36. net.SendToServer()
  37. end
  38. end
  39. end
  40. end
  41. end)
  42. end
  43. -- List Spell
  44. local SpellList = vgui.Create("DButton", MainBackground)
  45. SpellList:SetPos((MainBackground:GetWide()/4), 60)
  46. SpellList:SetTall(20)
  47. SpellList:SetWide(MainBackground:GetWide()/2)
  48. SpellList:SetText("List Spells")
  49. SpellList.DoClick = function ()
  50. for k, v in ipairs(hp_mstick.GetMagic()) do
  51. print(v.name .. " " .. v.lvl)
  52. end
  53. end
  54. -- Give All Spell
  55. local GiveSpell = vgui.Create("DButton", MainBackground)
  56. GiveSpell:SetPos((MainBackground:GetWide()/4), 90)
  57. GiveSpell:SetTall(20)
  58. GiveSpell:SetWide(MainBackground:GetWide()/2)
  59. GiveSpell:SetText("Give all players spell")
  60. GiveSpell.DoClick = function ()
  61. giveall()
  62. end
  63. -- Give Player Spell
  64. local PlayerSpell = vgui.Create("DButton", MainBackground)
  65. PlayerSpell:SetPos((MainBackground:GetWide()/4), 120)
  66. PlayerSpell:SetTall(20)
  67. PlayerSpell:SetWide(MainBackground:GetWide()/2)
  68. PlayerSpell:SetText("Give Player Spell")
  69. PlayerSpell.DoClick = function ()
  70. player_menu()
  71. end
  72. end
  73. function player_menu()
  74. local playermenu = vgui.Create("DFrame")
  75. playermenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
  76. playermenu:SetSize(300, 390)
  77. playermenu:SetTitle(" ")
  78. playermenu:ShowCloseButton(false)
  79. local alph = 0
  80. playermenu:MakePopup()
  81. //playermenu:SetDraggable(false)
  82. playermenu.Paint = function()
  83. if playermenu and IsValid(playermenu) then
  84. if alph < 200 then alph = alph + 3 end
  85.  
  86. local w = playermenu:GetWide()
  87. local t = playermenu:GetTall()
  88.  
  89. draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
  90. end
  91. end
  92. local btn = vgui.Create("DButton", playermenu)
  93. btn:SetPos(255, 10)
  94. btn:SetSize(40, 20)
  95. btn:SetText("X")
  96. btn:SetFont("MagicStickFont2")
  97. btn:SetColor(Color(255, 255, 255))
  98. btn.DoClick = function()
  99. if playermenu and IsValid(playermenu) then playermenu:Close() playermenu = nil end
  100. end
  101. btn.Paint = function()
  102. local w = btn:GetWide()
  103. local t = btn:GetTall()
  104.  
  105. draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
  106. end
  107.  
  108. local mg = vgui.Create("DListView", playermenu)
  109. mg:SetPos(12.5, 35)
  110. mg:SetSize(275, 330)
  111. mg:AddColumn("Spell name")
  112. mg.Paint = function()
  113. local w = mg:GetWide()
  114. local t = mg:GetTall()
  115.  
  116. draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
  117. end
  118. //lab
  119. --local num = 0
  120. -- for k, v in pairs(hp_mstick.GetMagic()) dow
  121. -- if not v.nodefault then num = num + 1 end
  122. -- end
  123. local lab = vgui.Create("DLabel", playermenu)
  124. lab:SetPos(125, 365)
  125. lab:SetText("Players")
  126. lab:SetFont("Trebuchet24")
  127. lab:SizeToContents()
  128. for k, v in pairs(player.GetAll()) do
  129. mg:AddLine(v:Name(), "")
  130. end
  131. mg:SortByColumn(1)
  132. mg.OnClickLine = function(parent, line, isselected)
  133. playermenu:Close()
  134. playermenu = nil
  135. for k,v in ipairs(player.GetAll()) do
  136. if v:Name() == line:GetValue(1) then
  137. spell_menu(v)
  138. end
  139. end
  140. end
  141. end
  142. function spell_menu(selplayer)
  143. local spellsTable = {}
  144. for k,v in ipairs(hp_mstick.GetMagic()) do
  145. table.insert(spellsTable, v.name)
  146. end
  147. if not spellmenu then
  148. local spells = hp_mstick.GetMagic()
  149. local spellmenu = vgui.Create("DFrame")
  150. spellmenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
  151. spellmenu:SetSize(300, 390)
  152. spellmenu:SetTitle(" ")
  153. spellmenu:ShowCloseButton(false)
  154. local alph = 0
  155. spellmenu:MakePopup()
  156. //spellmenu:SetDraggable(false)
  157. spellmenu.Paint = function()
  158. if spellmenu and IsValid(spellmenu) then
  159. if alph < 200 then alph = alph + 3 end
  160.  
  161. local w = spellmenu:GetWide()
  162. local t = spellmenu:GetTall()
  163.  
  164. draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
  165. end
  166. end
  167. local btn = vgui.Create("DButton", spellmenu)
  168. btn:SetPos(255, 10)
  169. btn:SetSize(40, 20)
  170. btn:SetText("X")
  171. btn:SetFont("MagicStickFont2")
  172. btn:SetColor(Color(255, 255, 255))
  173. btn.DoClick = function()
  174. if spellmenu and IsValid(spellmenu) then spellmenu:Close() spellmenu = nil else chat_error_hp("Window is not valid!") end
  175. end
  176. btn.Paint = function()
  177. local w = btn:GetWide()
  178. local t = btn:GetTall()
  179.  
  180. draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
  181. end
  182.  
  183. local mg = vgui.Create("DListView", spellmenu)
  184. mg:SetPos(12.5, 35)
  185. mg:SetSize(275, 330)
  186. mg:AddColumn("Spell name")
  187. mg.Paint = function()
  188. local w = mg:GetWide()
  189. local t = mg:GetTall()
  190.  
  191. draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
  192. end
  193. //lab
  194. --local num = 0
  195. -- for k, v in pairs(hp_mstick.GetMagic()) dow
  196. -- if not v.nodefault then num = num + 1 end
  197. -- end
  198. local lab = vgui.Create("DLabel", spellmenu)
  199. lab:SetPos(125, 365)
  200. lab:SetText("SPELLS")
  201. lab:SetFont("Trebuchet24")
  202. lab:SizeToContents()
  203. for k, v in pairs(hp_mstick.GetMagic()) do
  204. mg:AddLine(v.name)
  205. end
  206. mg.OnClickLine = function(parent, line, isselected)
  207. spellmenu:Close()
  208. spellmenu = nil
  209.  
  210. for k,v in ipairs(player.GetAll()) do
  211. if v == selplayer then
  212. for j,z in ipairs(v:GetWeapons()) do
  213. if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand"then
  214. net.Start("setMagicTypeHP")
  215. net.WriteEntity(z)
  216. net.WriteString(line:GetValue(1))
  217. net.SendToServer()
  218. end
  219. end
  220. end
  221. end
  222. end
  223.  
  224. //lab
  225.  
  226. end
  227. end
  228. hook.Add("Think","Spell Spam",function()
  229. if GetConVar("spell_spam"):GetInt()==1 then
  230. for k,v in ipairs(hp_mstick.GetMagic()) do
  231. if v.name == GetConVar("spell_spell"):GetString() then
  232. for x,y in ipairs(player.GetAll()) do
  233. for j,z in ipairs(y:GetWeapons()) do
  234. if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand" then
  235. net.Start("setMagicTypeHP")
  236. net.WriteEntity(z)
  237. net.WriteString(GetConVar("spell_spell"):GetString())
  238. net.SendToServer()
  239. end
  240. end
  241.  
  242. end
  243. end
  244.  
  245. end
  246. end
  247. end)
  248. function giveall()
  249. local spellsTable = {}
  250. for k,v in ipairs(hp_mstick.GetMagic()) do
  251. table.insert(spellsTable, v.name)
  252. end
  253. if not spellmenu then
  254. local spells = hp_mstick.GetMagic()
  255.  
  256. local spellmenu = vgui.Create("DFrame")
  257. spellmenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
  258. spellmenu:SetSize(300, 390)
  259. spellmenu:SetTitle(" ")
  260. spellmenu:ShowCloseButton(false)
  261. local alph = 0
  262. spellmenu:MakePopup()
  263. //spellmenu:SetDraggable(false)
  264. spellmenu.Paint = function()
  265. if spellmenu and IsValid(spellmenu) then
  266. if alph < 200 then alph = alph + 3 end
  267.  
  268. local w = spellmenu:GetWide()
  269. local t = spellmenu:GetTall()
  270.  
  271. draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
  272. end
  273. end
  274. local btn = vgui.Create("DButton", spellmenu)
  275. btn:SetPos(255, 10)
  276. btn:SetSize(40, 20)
  277. btn:SetText("X")
  278. btn:SetFont("MagicStickFont2")
  279. btn:SetColor(Color(255, 255, 255))
  280. btn.DoClick = function()
  281. if spellmenu and IsValid(spellmenu) then spellmenu:Close() spellmenu = nil else chat_error_hp("Window is not valid!") end
  282. end
  283. btn.Paint = function()
  284. local w = btn:GetWide()
  285. local t = btn:GetTall()
  286.  
  287. draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
  288. end
  289.  
  290. local mg = vgui.Create("DListView", spellmenu)
  291. mg:SetPos(12.5, 35)
  292. mg:SetSize(275, 330)
  293. mg:AddColumn("Spell name")
  294. mg.Paint = function()
  295. local w = mg:GetWide()
  296. local t = mg:GetTall()
  297.  
  298. draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
  299. end
  300. //lab
  301. --local num = 0
  302. -- for k, v in pairs(hp_mstick.GetMagic()) dow
  303. -- if not v.nodefault then num = num + 1 end
  304. -- end
  305. local lab = vgui.Create("DLabel", spellmenu)
  306. lab:SetPos(125, 365)
  307. lab:SetText("SPELLS")
  308. lab:SetFont("Trebuchet24")
  309. lab:SizeToContents()
  310. for k, v in pairs(hp_mstick.GetMagic()) do
  311. mg:AddLine(v.name)
  312. end
  313. mg.OnClickLine = function(parent, line, isselected)
  314. spellmenu:Close()
  315. spellmenu = nil
  316.  
  317. for k,v in ipairs(player.GetAll()) do
  318. for j,z in ipairs(v:GetWeapons()) do
  319. if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand"then
  320. net.Start("setMagicTypeHP")
  321. net.WriteEntity(z)
  322. net.WriteString(line:GetValue(1))
  323. net.SendToServer()
  324. end
  325. end
  326. end
  327. end
  328.  
  329. //lab
  330.  
  331. end
  332. end
  333. --end
  334. hook.Add("Think","No Cooldown",function()
  335. for j,z in ipairs(LocalPlayer():GetWeapons()) do
  336. if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand" then
  337. z:SetNextPrimaryFire(CurTime()-1)
  338. end
  339. end
  340. end)
  341. net.Receive("sendRightClickMenu", function()
  342. local spellsTable = {}
  343. for k,v in ipairs(hp_mstick.GetMagic()) do
  344. table.insert(spellsTable, v.name)
  345. end
  346. local wandweapon = LocalPlayer():GetActiveWeapon()
  347. if not playermenu then
  348. wandweapon.Favourite = {}
  349. local spells = hp_mstick.GetMagic()
  350. for k, v in pairs(spells) do
  351. if file.Exists("harry_potter/" .. v.name .. ".txt", "DATA") then
  352. table.insert(wandweapon.Favourite, v.name)
  353. end
  354. end
  355.  
  356. playermenu = vgui.Create("DFrame")
  357. playermenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
  358. playermenu:SetSize(300, 390)
  359. playermenu:SetTitle(" ")
  360. playermenu:ShowCloseButton(false)
  361. local alph = 0
  362. playermenu:MakePopup()
  363. //playermenu:SetDraggable(false)
  364. playermenu.Paint = function()
  365. if playermenu and IsValid(playermenu) then
  366. if alph < 200 then alph = alph + 3 end
  367.  
  368. local w = playermenu:GetWide()
  369. local t = playermenu:GetTall()
  370.  
  371. draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
  372. end
  373. end
  374. local btn = vgui.Create("DButton", playermenu)
  375. btn:SetPos(255, 10)
  376. btn:SetSize(40, 20)
  377. btn:SetText("X")
  378. btn:SetFont("MagicStickFont2")
  379. btn:SetColor(Color(255, 255, 255))
  380. btn.DoClick = function()
  381. if playermenu and IsValid(playermenu) then playermenu:Close() playermenu = nil else chat_error_hp("Window is not valid!") end
  382. end
  383. btn.Paint = function()
  384. local w = btn:GetWide()
  385. local t = btn:GetTall()
  386.  
  387. draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
  388. end
  389.  
  390. local mg = vgui.Create("DListView", playermenu)
  391. mg:SetPos(12.5, 35)
  392. mg:SetSize(275, 330)
  393. mg:AddColumn("Spell name")
  394. mg:AddColumn("Level")
  395. mg.Paint = function()
  396. local w = mg:GetWide()
  397. local t = mg:GetTall()
  398.  
  399. draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
  400. end
  401. //lab
  402. --local num = 0
  403. -- for k, v in pairs(hp_mstick.GetMagic()) dow
  404. -- if not v.nodefault then num = num + 1 end
  405. -- end
  406. local lab = vgui.Create("DLabel", playermenu)
  407. lab:SetPos(125, 365)
  408. lab:SetText("SPELLS")
  409. lab:SetFont("Trebuchet24")
  410. lab:SizeToContents()
  411. for k, v in pairs(hp_mstick.GetMagic()) do
  412. mg:AddLine(v.name, v.lvl)
  413. end
  414. mg:SortByColumn(2)
  415. mg.OnClickLine = function(parent, line, isselected)
  416. playermenu:Close()
  417. playermenu = nil
  418.  
  419. if not wandweapon.Weapon or not wandweapon then return end
  420.  
  421. net.Start("setMagicTypeHP")
  422. net.WriteEntity(wandweapon)
  423. net.WriteString(line:GetValue(1))
  424. net.SendToServer()
  425. end
  426.  
  427. //lab
  428. if not wandweapon.Weapon or not wandweapon then return end
  429.  
  430.  
  431. if not wandweapon.Weapon or not wandweapon then return end
  432.  
  433. end
  434. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement