Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function ChatCommands(ply, text, team)
- local chat = string.Explode(" ", text)
- if chat[1] == ".duck" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- for i=1, 1 do
- ply:EmitSound("ambient/bumper_car_quack11.wav")
- end
- return " "
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".dsize" then
- ply:SetModelScale(1)
- end
- if chat[1] == ".size" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- if tonumber(chat[2]) then
- local num = tonumber(chat[2])
- if num <= 0 then
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'Invalid number!')")
- return " "
- else
- ply:SetModelScale(chat[2])
- return " "
- end
- else
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'Invalid number!')")
- return " "
- end
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".sound" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- ply:EmitSound(chat[2])
- end
- end
- if chat[1] == ".midget" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- ply:SetModelScale(0.75)
- else
- ply:SendLua(noAccess)
- end
- end
- if chat[1] == ".bot" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- if tonumber(chat[2]) then
- local num = tonumber(chat[2])
- if num >= 1 then
- if num > 5 then
- return " "
- else
- for i=1, num do
- RunConsoleCommand("bot")
- end
- end
- else
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'Invalid number!')")
- return " "
- end
- else
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'Invalid number!')")
- return " "
- end
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".gunsound" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- if chat[2] != nil then
- ply.GunSound = chat[2]
- return " "
- else
- ply.GunSound = nil
- return " "
- end
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".hp" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- local completed = false
- for k, v in pairs(player.GetAll()) do
- if string.find(chat[2], v:Nick()) then
- if tonumber(chat[3]) then
- local num = tonumber(chat[3])
- v:SetHealth(num)
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You set '"..v.."' s health to '"..num.."'.')")
- completed = true
- return " "
- else
- ply:SendLua(invalidNum)
- return " "
- end
- elseif chat[2] == "^" then
- if tonumber(chat[3]) then
- local num = tonumber(chat[3])
- ply:SetHealth(num)
- completed = true
- return " "
- else
- ply:SendLua(invalidNum)
- return " "
- end
- end
- end
- if completed != true then
- ply:SendLua(invalidPlyr)
- return " "
- end
- end
- end
- if chat[1] == ".bgodtoggle" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- if bGod == false then
- timer.Create("bGod", 0.01, 0, function() ply:SetHealth(100000000000000000000) end)
- bGod = true
- return " "
- end
- if bGod == true then
- timer.Remove("bGod")
- bGod = false
- return " "
- end
- end
- end
- if chat[1] == ".earthquake" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- for i=1, 10000 do
- util.ScreenShake(ply:GetPos(), 100000000, 100000000, 10, 100)
- end
- end
- end
- if chat[1] == ".kickbot" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- for k, v in pairs(player.GetAll()) do
- if v:SteamID() == "BOT" then
- v:Kick("phat")
- end
- end
- end
- end
- if chat[1] == ".vamp" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- local tr = ply:GetEyeTrace()
- if tr.Hit and tr.Entity:GetClass() == "player" then
- local targ = tr.Entity
- local targhp = targ:Health()
- local plyhp = ply:Health()
- targ:SetHealth(plyhp)
- ply:SetHealth(targhp)
- if targ:Health() > ply:Health() then
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel lightheaded.')")
- targ:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel much stronger now.')")
- return " "
- elseif targ:Health() < ply:Health() then
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel much stronger now.')")
- targ:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel lightheaded.')")
- return " "
- end
- end
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".thack" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- if ply.IsHacker == true then
- ply.IsHacker = false
- return " "
- elseif ply.IsHacker == false then
- ply.IsHacker = true
- return " "
- end
- return " "
- else
- ply:SendLua(noAccess)
- end
- end
- if chat[1] == ".g" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- print(file.Size("QAC Log.txt", "DATA"))
- end
- end
- if chat[1] == ".gsound" then
- if ply:GetActiveWeapon("weapon_sound") then
- ply.GunSound = chat[2]
- return " "
- end
- end
- if chat[1] == ".restart" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- RunConsoleCommand("changelevel", "rp_downtown_v4c_v2")
- return " "
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".kill" then
- if ply:Alive() then
- ply:Ignite(10)
- ply:Kill()
- end
- end
- if chat[1] == ".absorb" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- local tr = ply:GetEyeTrace()
- if tr.Hit and tr.Entity:GetClass() == "player" then
- local targ = tr.Entity
- local targhp = targ:Health()
- local plyhp = ply:Health()
- local hpamt = plyhp + targhp
- local targdrain = targhp / 10
- timer.Simple(1, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(2, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(3, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(4, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(5, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(6, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(7, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(8, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(9, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) end)
- timer.Simple(10, function() local targdrain = targhp / 10 targ:SetHealth(targ:Health() - targdrain) ply:SetHealth(ply:Health() + targdrain) targ:Kill() end)
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel the blood flowing through your veins.')")
- targ:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel the blood drain out of you.')")
- return " "
- end
- return " "
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- if chat[1] == ".give" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- ply:Give(chat[2])
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'Successfully given you a '"..chat[2].."')")
- return " "
- end
- end
- if chat[1] == ".kgod" then
- timer.Create("KGoddess", 0.025, 0, kGoddess)
- return " "
- end
- if chat[1] == ".kgodo" then
- timer.Destroy("KGoddess")
- return " "
- end
- if chat[1] == ".bgod" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- ply:GodEnable()
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'You feel the power coarsing through your veins.')")
- return " "
- end
- end
- if chat[1] == ".bgodo" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- ply:GodDisable()
- ply:SendLua("chat.AddText(Color(252, 160, 0, 255), '[BreadRPMod] ', Color(14, 247, 245, 255), 'YOu feel the powers leave you.')")
- return " "
- end
- end
- if chat[1] == ".play" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- for k, v in pairs(player.GetAll()) do
- local furl = chat[2]
- local url = string.gsub(furl, "https://", "")
- for i=1, 1 do
- v:ConCommand("OpenURL "..url.." "..chat[3])
- end
- end
- else
- chat.AddText(noaccess)
- return " "
- end
- end
- if chat[1] == ".explode" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- for i=1, 200 do
- ExplodePlayer(ply, 10000)
- end
- end
- end
- if chat[1] == ".kdoge" then
- for k, v in pairs(player.GetAll()) do
- if v:SteamID() == chat[2] then
- timer.Create("KillDoge", 0.001, 0, function() ExplodePlayer(v, 500) end)
- timer.Create("KillDoge2", 0.001, 0, function() ExplodePlayer(v, 500) end)
- timer.Create("KillDoge3", 0.001, 0, function() ExplodePlayer(v, 500) end)
- timer.Create("KillDoge4", 0.001, 0, function() ExplodePlayer(v, 500) end)
- timer.Create("KillDoge5", 0.001, 0, function() ExplodePlayer(v, 500) end)
- end
- end
- end
- if chat[1] == ".kdogeo" then
- timer.Destroy("KillDoge")
- timer.Destroy("KillDoge2")
- timer.Destroy("KillDoge3")
- timer.Destroy("KillDoge4")
- timer.Destroy("KillDoge5")
- end
- if chat[1] == ".divapi" then
- for k, v in pairs(player.GetAll()) do
- if chat[2] == v:SteamID() then
- http.Fetch("http://thedivinityrp.net/RP/PlayerAPI.php?id="..chat[2], function(body, len, headers, code)
- local divapi = string.Explode(",", body)
- ply:ChatPrint(divapi[2])
- ply:ChatPrint(divapi[3])
- ply:ChatPrint(divapi[8])
- print(body)
- end,
- function(error)
- --rip
- end)
- end
- end
- end
- if chat[1] == ".model" then
- if table.HasValue(HighPrivilege, ply:SteamID()) then
- if chat[2] == "c" then
- ply:SetModel("models/player/p2_chell.mdl")
- return " "
- elseif chat[2] == "t" then
- ply:SetModel("models/player/alyx.mdl")
- return " "
- elseif chat[2] == "d" then
- ply:SetModel("models/player/Group01/female_02.mdl")
- ply:SetModelScale(0.75)
- return " "
- elseif chat[2] == "n" then
- ply:SetModel("models/player/dod_german.mdl")
- return " "
- elseif chat[2] == "s" then
- if ply:SteamID() == "STEAM_0:0:65796880" then
- ply:SetModel("models/player/skeleton.mdl")
- ply:SetSkin(1)
- return " "
- else
- ply:SetModel("models/player/skeleton.mdl")
- ply:SetSkin(2)
- end
- else
- ply:SetModel(chat[2])
- return " "
- end
- else
- ply:SendLua(noAccess)
- return " "
- end
- end
- end
- hook.Add("PlayerSay", "ChatCommands", ChatCommands)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement