Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CreateClientConVar( "spell_spam", 0, false, false )
- CreateClientConVar( "spell_spell", "Avada kedavra", false, false )
- concommand.Add("openspell",function() proccess_harry() end)
- function proccess_harry()
- if unexpected_condition then print("Error in proccess_mainmenu") end
- -- Create Background
- local ply = LocalPlayer()
- local MainBackground = vgui.Create("DFrame")
- MainBackground:SetSize(300,180)
- MainBackground:SetPos((ScrW()/2)-(MainBackground:GetWide()/2), (ScrH()/2)-(MainBackground:GetTall()/2))
- MainBackground:SetTitle("Harry Potter Spell Exploit")
- MainBackground:SetVisible(true)
- MainBackground:SetDraggable(true)
- MainBackground:ShowCloseButton(true)
- MainBackground:SetDeleteOnClose(true)
- MainBackground:MakePopup()
- MainBackground.Paint = function()
- draw.RoundedBox(4, 0, 0, MainBackground:GetWide(), MainBackground:GetTall(), Color(0, 0, 200, 200))
- end
- -- Spell Input
- local SpellInput = vgui.Create("DButton", MainBackground)
- SpellInput:SetPos((MainBackground:GetWide()/4), 30)
- SpellInput:SetTall(20)
- SpellInput:SetWide(MainBackground:GetWide()/2)
- SpellInput:SetText("Set Spell")
- SpellInput.DoClick = function ()
- Derma_StringRequest("Select Spell","Enter the name of the spell","", function(text)
- local wandweapon = LocalPlayer():GetActiveWeapon()
- for k,v in ipairs(hp_mstick.GetMagic()) do
- if v.name == text then
- for j,z in ipairs(LocalPlayer():GetWeapons()) do
- if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand" then
- net.Start("setMagicTypeHP")
- net.WriteEntity(z)
- net.WriteString(text)
- net.SendToServer()
- end
- end
- end
- end
- end)
- end
- -- List Spell
- local SpellList = vgui.Create("DButton", MainBackground)
- SpellList:SetPos((MainBackground:GetWide()/4), 60)
- SpellList:SetTall(20)
- SpellList:SetWide(MainBackground:GetWide()/2)
- SpellList:SetText("List Spells")
- SpellList.DoClick = function ()
- for k, v in ipairs(hp_mstick.GetMagic()) do
- print(v.name .. " " .. v.lvl)
- end
- end
- -- Give All Spell
- local GiveSpell = vgui.Create("DButton", MainBackground)
- GiveSpell:SetPos((MainBackground:GetWide()/4), 90)
- GiveSpell:SetTall(20)
- GiveSpell:SetWide(MainBackground:GetWide()/2)
- GiveSpell:SetText("Give all players spell")
- GiveSpell.DoClick = function ()
- giveall()
- end
- -- Give Player Spell
- local PlayerSpell = vgui.Create("DButton", MainBackground)
- PlayerSpell:SetPos((MainBackground:GetWide()/4), 120)
- PlayerSpell:SetTall(20)
- PlayerSpell:SetWide(MainBackground:GetWide()/2)
- PlayerSpell:SetText("Give Player Spell")
- PlayerSpell.DoClick = function ()
- player_menu()
- end
- end
- function player_menu()
- local playermenu = vgui.Create("DFrame")
- playermenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
- playermenu:SetSize(300, 390)
- playermenu:SetTitle(" ")
- playermenu:ShowCloseButton(false)
- local alph = 0
- playermenu:MakePopup()
- //playermenu:SetDraggable(false)
- playermenu.Paint = function()
- if playermenu and IsValid(playermenu) then
- if alph < 200 then alph = alph + 3 end
- local w = playermenu:GetWide()
- local t = playermenu:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
- end
- end
- local btn = vgui.Create("DButton", playermenu)
- btn:SetPos(255, 10)
- btn:SetSize(40, 20)
- btn:SetText("X")
- btn:SetFont("MagicStickFont2")
- btn:SetColor(Color(255, 255, 255))
- btn.DoClick = function()
- if playermenu and IsValid(playermenu) then playermenu:Close() playermenu = nil end
- end
- btn.Paint = function()
- local w = btn:GetWide()
- local t = btn:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
- end
- local mg = vgui.Create("DListView", playermenu)
- mg:SetPos(12.5, 35)
- mg:SetSize(275, 330)
- mg:AddColumn("Spell name")
- mg.Paint = function()
- local w = mg:GetWide()
- local t = mg:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
- end
- //lab
- --local num = 0
- -- for k, v in pairs(hp_mstick.GetMagic()) dow
- -- if not v.nodefault then num = num + 1 end
- -- end
- local lab = vgui.Create("DLabel", playermenu)
- lab:SetPos(125, 365)
- lab:SetText("Players")
- lab:SetFont("Trebuchet24")
- lab:SizeToContents()
- for k, v in pairs(player.GetAll()) do
- mg:AddLine(v:Name(), "")
- end
- mg:SortByColumn(1)
- mg.OnClickLine = function(parent, line, isselected)
- playermenu:Close()
- playermenu = nil
- for k,v in ipairs(player.GetAll()) do
- if v:Name() == line:GetValue(1) then
- spell_menu(v)
- end
- end
- end
- end
- function spell_menu(selplayer)
- local spellsTable = {}
- for k,v in ipairs(hp_mstick.GetMagic()) do
- table.insert(spellsTable, v.name)
- end
- if not spellmenu then
- local spells = hp_mstick.GetMagic()
- local spellmenu = vgui.Create("DFrame")
- spellmenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
- spellmenu:SetSize(300, 390)
- spellmenu:SetTitle(" ")
- spellmenu:ShowCloseButton(false)
- local alph = 0
- spellmenu:MakePopup()
- //spellmenu:SetDraggable(false)
- spellmenu.Paint = function()
- if spellmenu and IsValid(spellmenu) then
- if alph < 200 then alph = alph + 3 end
- local w = spellmenu:GetWide()
- local t = spellmenu:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
- end
- end
- local btn = vgui.Create("DButton", spellmenu)
- btn:SetPos(255, 10)
- btn:SetSize(40, 20)
- btn:SetText("X")
- btn:SetFont("MagicStickFont2")
- btn:SetColor(Color(255, 255, 255))
- btn.DoClick = function()
- if spellmenu and IsValid(spellmenu) then spellmenu:Close() spellmenu = nil else chat_error_hp("Window is not valid!") end
- end
- btn.Paint = function()
- local w = btn:GetWide()
- local t = btn:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
- end
- local mg = vgui.Create("DListView", spellmenu)
- mg:SetPos(12.5, 35)
- mg:SetSize(275, 330)
- mg:AddColumn("Spell name")
- mg.Paint = function()
- local w = mg:GetWide()
- local t = mg:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
- end
- //lab
- --local num = 0
- -- for k, v in pairs(hp_mstick.GetMagic()) dow
- -- if not v.nodefault then num = num + 1 end
- -- end
- local lab = vgui.Create("DLabel", spellmenu)
- lab:SetPos(125, 365)
- lab:SetText("SPELLS")
- lab:SetFont("Trebuchet24")
- lab:SizeToContents()
- for k, v in pairs(hp_mstick.GetMagic()) do
- mg:AddLine(v.name)
- end
- mg.OnClickLine = function(parent, line, isselected)
- spellmenu:Close()
- spellmenu = nil
- for k,v in ipairs(player.GetAll()) do
- if v == selplayer then
- for j,z in ipairs(v:GetWeapons()) do
- if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand"then
- net.Start("setMagicTypeHP")
- net.WriteEntity(z)
- net.WriteString(line:GetValue(1))
- net.SendToServer()
- end
- end
- end
- end
- end
- //lab
- end
- end
- hook.Add("Think","Spell Spam",function()
- if GetConVar("spell_spam"):GetInt()==1 then
- for k,v in ipairs(hp_mstick.GetMagic()) do
- if v.name == GetConVar("spell_spell"):GetString() then
- for x,y in ipairs(player.GetAll()) do
- for j,z in ipairs(y:GetWeapons()) do
- if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand" then
- net.Start("setMagicTypeHP")
- net.WriteEntity(z)
- net.WriteString(GetConVar("spell_spell"):GetString())
- net.SendToServer()
- end
- end
- end
- end
- end
- end
- end)
- function giveall()
- local spellsTable = {}
- for k,v in ipairs(hp_mstick.GetMagic()) do
- table.insert(spellsTable, v.name)
- end
- if not spellmenu then
- local spells = hp_mstick.GetMagic()
- local spellmenu = vgui.Create("DFrame")
- spellmenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
- spellmenu:SetSize(300, 390)
- spellmenu:SetTitle(" ")
- spellmenu:ShowCloseButton(false)
- local alph = 0
- spellmenu:MakePopup()
- //spellmenu:SetDraggable(false)
- spellmenu.Paint = function()
- if spellmenu and IsValid(spellmenu) then
- if alph < 200 then alph = alph + 3 end
- local w = spellmenu:GetWide()
- local t = spellmenu:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
- end
- end
- local btn = vgui.Create("DButton", spellmenu)
- btn:SetPos(255, 10)
- btn:SetSize(40, 20)
- btn:SetText("X")
- btn:SetFont("MagicStickFont2")
- btn:SetColor(Color(255, 255, 255))
- btn.DoClick = function()
- if spellmenu and IsValid(spellmenu) then spellmenu:Close() spellmenu = nil else chat_error_hp("Window is not valid!") end
- end
- btn.Paint = function()
- local w = btn:GetWide()
- local t = btn:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
- end
- local mg = vgui.Create("DListView", spellmenu)
- mg:SetPos(12.5, 35)
- mg:SetSize(275, 330)
- mg:AddColumn("Spell name")
- mg.Paint = function()
- local w = mg:GetWide()
- local t = mg:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
- end
- //lab
- --local num = 0
- -- for k, v in pairs(hp_mstick.GetMagic()) dow
- -- if not v.nodefault then num = num + 1 end
- -- end
- local lab = vgui.Create("DLabel", spellmenu)
- lab:SetPos(125, 365)
- lab:SetText("SPELLS")
- lab:SetFont("Trebuchet24")
- lab:SizeToContents()
- for k, v in pairs(hp_mstick.GetMagic()) do
- mg:AddLine(v.name)
- end
- mg.OnClickLine = function(parent, line, isselected)
- spellmenu:Close()
- spellmenu = nil
- for k,v in ipairs(player.GetAll()) do
- for j,z in ipairs(v:GetWeapons()) do
- if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand"then
- net.Start("setMagicTypeHP")
- net.WriteEntity(z)
- net.WriteString(line:GetValue(1))
- net.SendToServer()
- end
- end
- end
- end
- //lab
- end
- end
- --end
- hook.Add("Think","No Cooldown",function()
- for j,z in ipairs(LocalPlayer():GetWeapons()) do
- if z:GetPrintName() == "Wand" or z:GetPrintName() == "Mind Wand" or z:GetPrintName() == "Magma Wand" or z:GetPrintName() == "The Elder Wand" then
- z:SetNextPrimaryFire(CurTime()-1)
- end
- end
- end)
- net.Receive("sendRightClickMenu", function()
- local spellsTable = {}
- for k,v in ipairs(hp_mstick.GetMagic()) do
- table.insert(spellsTable, v.name)
- end
- local wandweapon = LocalPlayer():GetActiveWeapon()
- if not playermenu then
- wandweapon.Favourite = {}
- local spells = hp_mstick.GetMagic()
- for k, v in pairs(spells) do
- if file.Exists("harry_potter/" .. v.name .. ".txt", "DATA") then
- table.insert(wandweapon.Favourite, v.name)
- end
- end
- playermenu = vgui.Create("DFrame")
- playermenu:SetPos(ScrW()*0.75 , ScrH()*0.45)
- playermenu:SetSize(300, 390)
- playermenu:SetTitle(" ")
- playermenu:ShowCloseButton(false)
- local alph = 0
- playermenu:MakePopup()
- //playermenu:SetDraggable(false)
- playermenu.Paint = function()
- if playermenu and IsValid(playermenu) then
- if alph < 200 then alph = alph + 3 end
- local w = playermenu:GetWide()
- local t = playermenu:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(0, 0, 0, alph))
- end
- end
- local btn = vgui.Create("DButton", playermenu)
- btn:SetPos(255, 10)
- btn:SetSize(40, 20)
- btn:SetText("X")
- btn:SetFont("MagicStickFont2")
- btn:SetColor(Color(255, 255, 255))
- btn.DoClick = function()
- if playermenu and IsValid(playermenu) then playermenu:Close() playermenu = nil else chat_error_hp("Window is not valid!") end
- end
- btn.Paint = function()
- local w = btn:GetWide()
- local t = btn:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(255, 100, 100, alph * 0.7))
- end
- local mg = vgui.Create("DListView", playermenu)
- mg:SetPos(12.5, 35)
- mg:SetSize(275, 330)
- mg:AddColumn("Spell name")
- mg:AddColumn("Level")
- mg.Paint = function()
- local w = mg:GetWide()
- local t = mg:GetTall()
- draw.RoundedBox(0, 0, 0, w, t, Color(200, 250, 255, alph * 0.5))
- end
- //lab
- --local num = 0
- -- for k, v in pairs(hp_mstick.GetMagic()) dow
- -- if not v.nodefault then num = num + 1 end
- -- end
- local lab = vgui.Create("DLabel", playermenu)
- lab:SetPos(125, 365)
- lab:SetText("SPELLS")
- lab:SetFont("Trebuchet24")
- lab:SizeToContents()
- for k, v in pairs(hp_mstick.GetMagic()) do
- mg:AddLine(v.name, v.lvl)
- end
- mg:SortByColumn(2)
- mg.OnClickLine = function(parent, line, isselected)
- playermenu:Close()
- playermenu = nil
- if not wandweapon.Weapon or not wandweapon then return end
- net.Start("setMagicTypeHP")
- net.WriteEntity(wandweapon)
- net.WriteString(line:GetValue(1))
- net.SendToServer()
- end
- //lab
- if not wandweapon.Weapon or not wandweapon then return end
- if not wandweapon.Weapon or not wandweapon then return end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement