Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SpawnPositions = {
- Vector(-7119.1640625, -6348.7211914063, 80.03125),
- Vector(-6292.03125, -1380.9643554688, 117.14373779297),
- Vector(-7000.3100585938, -4367.7055664063, 88.03125),
- Vector(-4642.6411132813, 278.30902099609, 79.999992370605),
- Vector(-2134.0939941406, -1018.3106689453, 81.080451965332),
- Vector(-5349.5654296875, 6170.0478515625, 74),
- Vector(-1754.6280517578, -172.73217773438, 79.999992370605),
- Vector(-600.80798339844, -1303.3385009766, 79.999992370605),
- Vector(-4421.0766601563, 7652.27734375, 104.03125),
- Vector(-928.90954589844, -6345.5341796875, 76.03125),
- Vector(-8150.2314453125, 8429.3935546875, 84.367309570313),
- Vector(4232.7934570313, -3762.4162597656, 88.03125),
- Vector(-9668.5771484375, 9814.7939453125, 455.80670166016),
- Vector(6011.9702148438, -3719.21484375, 77.27766418457),
- Vector(7236.1186523438, -457.85479736328, 74),
- Vector(-11813.212890625, 8384.45703125, 77.037887573242),
- Vector(8165.1953125, 539.62377929688, 94.186370849609),
- Vector(8839.982421875, 4346.3823242188, 84.822738647461),
- Vector(12401.4453125, 5369.8857421875, 91.081367492676),
- Vector(12441.696289063, 11447.1953125, 83.40283203125),
- Vector(-11841.4765625, 9333.9658203125, 80.03125),
- Vector(-11781.907226563, 9489.736328125, 112.03125),
- Vector(-9144.6494140625, 10865.56640625, 200.36459350586),
- Vector(10324.059570313, 14313.368164063, 82.03125),
- Vector(-9156.3974609375, 14179.127929688, 198.51773071289),
- Vector(10300.307617188, 14370.84765625, 210.03125),
- Vector(10304.14453125, 14135.412109375, 210.03125),
- Vector(10286.129882813, 13829.533203125, 210.03125),
- Vector(-6073.6870117188, 15011.413085938, 250.03125),
- Vector(5928.5991210938, 13736.853515625, 74),
- Vector(5865.0639648438, 14063.270507813, 212.03125),
- Vector(5910.6323242188, 14082.7734375, 78.031242370605),
- Vector(-4325.0336914063, 14189.047851563, 202.03125),
- Vector(6112.5092773438, 14016.18359375, 212.03125),
- Vector(613.97985839844, 12565.87109375, 74),
- Vector(2733.6296386719, 14201.435546875, 74),
- Vector(-4545.6020507813, 12046.213867188, 202.03125),
- Vector(-5951.48046875, 12574.504882813, 250.03125),
- Vector(-5825.2436523438, 12739.918945313, 250.03125),
- Vector(-4418.3159179688, 7807.6845703125, 104.03125),
- Vector(-4675.1938476563, -4617.267578125, 216.03125),
- Vector(-4269.009765625, -4242.041015625, 216.03125),
- Vector(-6029.2553710938, -178.55905151367, 80.000015258789),
- Vector(-3556.3134765625, -4992.8125, 216.03125),
- Vector(-5567.7978515625, -4794.109375, 88.03125),
- Vector(-3613.7690429688, -5342.8188476563, 214.03125),
- Vector(-4246.0576171875, -5004.8002929688, 216.03125),
- Vector(-3422.8911132813, -5704.212890625, 214.03125),
- Vector(-3634.0153808594, -6241.318359375, 214.03125),
- Vector(-7168.2563476563, -6187.3051757813, 88.03125),
- Vector(-3619.2141113281, -6663.8090820313, 214.03125),
- Vector(-5384.0727539063, -6670.75, 88.03125),
- Vector(-3571.7653808594, -8076.8530273438, 214.03125),
- Vector(-6821.9599609375, -7807.4985351563, 88.03125),
- Vector(-6850.1689453125, -7518.4248046875, 89.03125),
- Vector(-6759.6782226563, -7528.3115234375, 89.03125),
- Vector(-5019.4887695313, -8998.8291015625, 86.03125),
- Vector(-6464.4775390625, -7917.6606445313, 88.03125),
- Vector(-4710.9936523438, -9295.177734375, 80.03125),
- Vector(-8495.4345703125, -11930.861328125, 80.03125),
- Vector(-4110.5327148438, -9276.3759765625, 1524.3332519531),
- Vector(-7792.2119140625, -7108.8129882813, 88.03125),
- Vector(-5413.9873046875, -9269.7294921875, 1622.03125),
- Vector(-5280.337890625, -9292.541015625, 1494.03125),
- Vector(-5291.0048828125, -9619.2890625, 1494.03125),
- Vector(29.95739364624, 2142.4130859375, 80.03125),
- Vector(953.60333251953, 4084.05078125, 80.03125),
- Vector(876.09405517578, 3775.44921875, 80.03125),
- Vector(-9291.0888671875, -9739.677734375, 88.03125),
- Vector(1275.1569824219, 6416.9106445313, 84.03125),
- Vector(1363.4035644531, 6395.0727539063, 84.03125),
- Vector(-7459.1674804688, -7862.1333007813, 80.03125),
- Vector(728.21612548828, 7338.4946289063, 120.03125),
- Vector(-6650.4750976563, -8732.865234375, 88.03125),
- Vector(2555.0114746094, 7781.7333984375, 84.03125),
- Vector(3570.1267089844, 7773.240234375, 84.03125),
- Vector(-5733.1362304688, -6536.59765625, 88.03125),
- Vector(3875.7734375, 5858.6518554688, 148.03125),
- Vector(-7304.2138671875, -4639.548828125, 88.031257629395),
- Vector(4074.05078125, 5953.103515625, 148.03125),
- Vector(2348.3291015625, 5722.9853515625, 116.03125),
- Vector(-5159.4233398438, -7090.013671875, 216.03125),
- Vector(2987.6604003906, 5724.115234375, 116.03125),
- Vector(3075.6162109375, 5522.8002929688, 116.03125),
- Vector(-4968.3208007813, -7227.828125, 216.03125),
- Vector(-4924.1606445313, -7606.6333007813, 216.03125),
- Vector(-5303.8979492188, -7567.4106445313, 216.03125),
- Vector(-5307.6005859375, -7252.2524414063, 216.03125),
- Vector(3277.0251464844, 4526.484375, 80.03125),
- Vector(-5327.3203125, -7325.1953125, 352.03125),
- Vector(-5339.6245117188, -7725.837890625, 352.03125),
- Vector(3001.2175292969, 3684.3862304688, 80.03125),
- Vector(3888.5427246094, 3221.9033203125, 80.03125),
- Vector(-4978.9423828125, -7662.2583007813, 352.03125),
- Vector(-4975.5737304688, -7251.16015625, 352.03125),
- Vector(1669.3060302734, 3969.8244628906, 88.217582702637),
- Vector(-5005.619140625, -7276.515625, 488.03125),
- Vector(-5031.6870117188, -7773.02734375, 488.03125),
- Vector(-5369.10546875, -7826.5727539063, 488.03125),
- Vector(-5318.7685546875, -7311.3178710938, 488.03125),
- Vector(-5181.6591796875, -7394.369140625, 488.03125),
- Vector(-1577.3673095703, -6143.9555664063, 77.03125),
- Vector(-5609.7119140625, -6978.9189453125, 488.03125),
- Vector(-5579.1538085938, -6991.859375, 352.03125),
- Vector(2908.2958984375, -4631.6977539063, 74.583923339844),
- Vector(-3913.6137695313, -7056.1147460938, 214.03125),
- Vector(-7598.3461914063, -9425.5234375, 88.031242370605),
- Vector(3108.666015625, -7691.0678710938, 77.165725708008),
- Vector(3086.0859375, -8257.767578125, 77.165740966797),
- Vector(-6680.8178710938, -9281.5185546875, 100.00001525879),
- Vector(3518.5634765625, -6997.8271484375, 305.16625976563),
- Vector(5405.3920898438, -8182.0551757813, 80.03125),
- Vector(-5905.7006835938, -3991.3728027344, 80.03125),
- Vector(5703.2661132813, -7815.0151367188, 80.031257629395),
- Vector(5250.3125, -7807.15234375, 80.03125),
- Vector(-3075.8107910156, -1263.9421386719, 170.62059020996),
- Vector(433.35815429688, 262.2421875, 88.816833496094),
- Vector(6211.12890625, -8099.9409179688, 88.03125),
- Vector(589.91088867188, 4325.6928710938, 80.03125),
- Vector(375.61730957031, 4513.4702148438, 84.031265258789),
- Vector(2402.9035644531, -8778.96484375, 87.162353515625),
- Vector(546.31549072266, 5511.7553710938, 84.03125),
- Vector(379.56915283203, 7631.3876953125, 84.03125),
- Vector(3840.8227539063, 8242.1416015625, 84.03125),
- Vector(4940.4204101563, 5895.265625, 84.03125),
- Vector(4977.3154296875, 7118.2172851563, 84.03125),
- Vector(4380.8403320313, 6786.5903320313, 80.755020141602),
- Vector(4298.7094726563, 5824.455078125, 84.03125),
- Vector(-2558.1281738281, 185.06126403809, 88.031257629395),
- Vector(4103.9951171875, 3850.6628417969, 80.03125),
- Vector(-2166.5285644531, 142.24319458008, 88.031257629395),
- Vector(2121.9770507813, 3516.7883300781, 84.03125),
- Vector(-2117.2990722656, 393.67510986328, 88.03125),
- Vector(1666.0732421875, 3507.248046875, 84.03125),
- Vector(-214.19093322754, 2977.6123046875, 84.03125),
- Vector(-4022.5471191406, -150.89016723633, 82.000015258789),
- Vector(-3758.3159179688, 341.52700805664, 82),
- Vector(-4537.9975585938, -10329.157226563, 87.03125),
- Vector(-3073.6938476563, -14.005676269531, 88.03125),
- Vector(-5250.6108398438, -10387.766601563, 87.03125),
- Vector(-3568.3923339844, -93.113105773926, 88.03125),
- Vector(-6685.548828125, -10222.09375, 88.03125),
- Vector(-5753.990234375, 402.25430297852, 80.000015258789),
- Vector(-6592.994140625, -10737.853515625, 88.03125),
- Vector(-7326.177734375, -10187.08203125, 88.03125),
- Vector(-5417.5693359375, 5119.3159179688, 81.69856262207),
- Vector(-4559.697265625, 7962.3984375, 74),
- Vector(-9281.7578125, -9255.0849609375, 152.03125),
- Vector(-9271.6767578125, -9489.7041015625, 152.03125),
- Vector(-5027.3266601563, 9706.833984375, 112.4880065918),
- Vector(-9299.318359375, -8846.3935546875, 152.03125),
- Vector(-9308.0986328125, -8642.0478515625, 152.03125),
- Vector(-10401.631835938, 8353.1826171875, 89.633743286133),
- Vector(-11376.407226563, 8381.509765625, 83.969886779785),
- Vector(-9102.6650390625, -8103.3198242188, 98.036338806152),
- Vector(-11788.01953125, 9704.501953125, 112.03125),
- Vector(-11653.172851563, 9945.634765625, 80.03125),
- Vector(-8615.947265625, 9836.8896484375, 454.54168701172),
- Vector(-5863.482421875, 12247.969726563, 201),
- Vector(-5875.4497070313, 13204.48046875, 250.03125),
- Vector(-6027.1557617188, 14420.774414063, 250.03125),
- Vector(-4363.046875, 13935.350585938, 202.03125),
- Vector(-3507.2934570313, 13568.641601563, 201),
- Vector(-3828.2302246094, 13885.09375, 202.03125),
- Vector(5729.9946289063, -4065.8442382813, 88.03125),
- Vector(-2237.8615722656, 12293.138671875, 107.64169311523),
- Vector(5689.220703125, -4292.1201171875, 220.03125),
- Vector(191.88995361328, 13723.3984375, 73.999984741211),
- Vector(-616.65679931641, 14136.817382813, 74),
- Vector(-319.41943359375, 13493.344726563, 73.999969482422),
- Vector(4916.294921875, -4112.3720703125, 220.03125),
- Vector(1536.7331542969, 12046.53125, 74.461441040039),
- Vector(5235.1098632813, 14073.827148438, 74.000007629395),
- Vector(4968.6997070313, -4001.5534667969, 88.03125),
- Vector(5766.9990234375, 14629.668945313, 75.03125),
- Vector(5722.6782226563, 14544.071289063, 75.03125),
- Vector(10077.407226563, 14261.688476563, 266.1689453125),
- Vector(10261.620117188, 14112.163085938, 393.02694702148),
- Vector(11854.520507813, 315.04397583008, 88.031257629395),
- Vector(11818.995117188, 286.68551635742, 88.031257629395),
- Vector(10320.177734375, 13906.9296875, 82.03125),
- Vector(10052.327148438, 14335.7890625, 82.031257629395),
- Vector(9651.234375, 13832.950195313, 80.03125),
- Vector(12082.946289063, 2058.4936523438, 184.9303894043),
- Vector(11661.442382813, 13031.939453125, 89.659469604492),
- Vector(11030.106445313, 11867.3984375, 74.000015258789),
- Vector(12116.821289063, 2047.1468505859, 184.03518676758),
- Vector(11567.625976563, 4581.3100585938, 99.255355834961),
- Vector(10078.58203125, 14570.84375, 82.03125),
- Vector(5467.1430664063, 12072.875, 74.364120483398),
- Vector(2678.1179199219, 13050.493164063, 71.447128295898),
- Vector(5127.06640625, 13131.418945313, 74.000030517578),
- Vector(-7577.0576171875, 13565.879882813, 26.332221984863),
- Vector(-4363.18359375, 5614.7080078125, 74.585113525391),
- Vector(-5363.0893554688, -1108.5731201172, 80),
- Vector(-6496.1723632813, -6150.9409179688, 80.03125),
- Vector(-6377.0874023438, -11218.0859375, 88.031242370605),
- Vector(-8095.9272460938, -10844.174804688, 88.03125),
- Vector(-8242.9287109375, -11183.374023438, 88.031242370605),
- Vector(-7901.8803710938, -11144.069335938, 88.03125),
- Vector(-8138.0590820313, -11439.325195313, 88.03125),
- Vector(-9143.388671875, -10191.626953125, 88.03125),
- Vector(-4410.8198242188, -4719.2407226563, 216.03125),
- Vector(-4280.0478515625, -4465.1630859375, 216.03125),
- Vector(5582.544921875, -7476.521484375, 80.03125),
- Vector(5809.3681640625, -7486.4858398438, 80.03125),
- };
- function GivePaydayCash ( Player )
- for k, v in pairs(player.GetAll()) do
- if (v:Team() == TEAM_CITIZEN) then
- local TO_EARN = 100;
- local TO_EARN_TEXT = ' for participating in the zombie event.';
- if (v:IsVIP()) then
- TO_EARN = TO_EARN * 1.25;
- end
- local taxTaken = math.floor(TO_EARN * GAMEMODE.GetTaxRate_Income())
- GAMEMODE.GiveCityMoney(taxTaken)
- TO_EARN = TO_EARN - taxTaken
- TO_EARN_TEXT = TO_EARN_TEXT .. " (" .. GAMEMODE.GetTaxRate_Income_Text() .. " Income Tax)"
- v:GiveBank(TO_EARN, true)
- umsg.Start("perp_payday", v); umsg.Short(TO_EARN); umsg.String(TO_EARN_TEXT); umsg.End();
- end
- end
- end
- timer.Create("ZombieCashSystem", 60, 0, GivePaydayCash);
- timer.Destroy("PayDaySystem");
- function GAMEMODE.PlayerSpawn_Event ( Player )
- local ClientZombieCheck = true;
- Player.IsZombie = true;
- Player:Notify("You are a zombie! Kill other humans to make them join you!");
- Player:Notify("Use /hive to chat with your allies.");
- Player:SetTeam(TEAM_CITIZEN);
- Player:RestoreNormalSpeed();
- umsg.Start("ClientZombieCheck", Player) umsg.Bool(ClientZombieCheck); umsg.End();
- end
- function GAMEMODE.PlayerSetModel_Event ( Player )
- if Player.IsZombie then
- Player:SetModel(Model("models/player/zombie_classic.mdl"));
- Player:SetHealth(400);
- Player:SetArmor(100);
- Player:Give("roleplay_fists");
- if (Player:IsSuperAdmin()) then
- Player:Give("god_stick");
- end
- Player:SetJumpPower(300);
- return true;
- end
- return false;
- end
- function Randomzombie ( )
- local People = player.GetAll()
- local chosen = People[math.random(#People)]
- chosen:SetModel(Model("models/player/zombie_classic.mdl"));
- chosen:SetHealth(400);
- chosen:SetArmor(100);
- chosen.IsZombie = true;
- chosen:Notify("You are a zombie! Seek brains!");
- chosen:RestoreNormalSpeed();
- local zombiechosen = chosen:GetRPName()
- for k, v in pairs(player.GetAll()) do
- if v != Player then
- v:Notify('' .. zombiechosen .. ' Has Become The Main Zombie!');
- end
- end
- end
- timer.Simple(60, Randomzombie);
- GAMEMODE.FistDamage = 99;
- for k, v in pairs(ents.FindByClass("npc_vendor")) do
- v:Remove()
- end;
- for k, v in pairs(ents.FindByClass("npc_bubble")) do
- v:Remove()
- end;
- for k, v in pairs(ents.FindByClass("prop_vehicle_jeep")) do
- v:Remove()
- end;
- function GAMEMODE:PlayerShouldTakeDamage ( Player, Attacker )
- if !Attacker:IsPlayer() then return true; end
- if Player.IsZombie and Attacker.IsZombie then return false; end
- if !Player.IsZombie and !Attacker.IsZombie then return false; end
- return true;
- end
- local PlayerMetaTable = FindMetaTable('Player');
- function PlayerMetaTable:RestoreNormalSpeed ( )
- GAMEMODE:SetPlayerSpeed(self, 300, 400)
- end
- local GrowlSounds = {};
- for i = 1, 6 do
- table.insert(GrowlSounds, "npc/zombie/zombie_pain" .. i .. ".wav");
- end
- for i = 1, 3 do
- table.insert(GrowlSounds, "npc/zombie/zombie_die" .. i .. ".wav");
- end
- for i = 1, 3 do
- table.insert(GrowlSounds, "npc/zombie/zombie_alert" .. i .. ".wav");
- end
- function CheckZombieGuns ( )
- local AnyNonZombies = false;
- for k, v in pairs(player.GetAll()) do
- if IsValid(v) and v.IsZombie then
- --v:SetModel(Model("models/player/zombie_classic.mdl"));
- --v:SetHealth(400);
- -- v:SetArmor(100);
- if IsValid(v:GetActiveWeapon()) and v:GetActiveWeapon():GetClass() != "weapon_fists" then
- v:GetActiveWeapon():Remove();
- v:SelectWeapon("roleplay_fists");
- end
- if !v.NextGrowlSound or CurTime() >= v.NextGrowlSound then
- v.NextGrowlSound = CurTime() + 20;
- v:EmitSound(Sound(table.Random(GrowlSounds)), 120, 100);
- end
- else
- AnyNonZombies = true;
- end
- end
- for k, v in pairs(player.GetAll()) do
- if IsValid(v) and !v.IsZombie then
- if IsValid(v:GetActiveWeapon()) and v:GetActiveWeapon():GetClass() == "weapon_keys" then
- v:GetActiveWeapon():Remove();
- v:SelectWeapon("weapon_fists");
- end
- end
- end
- if !AnyNonZombies then
- hook.Remove('Think', 'CheckZombieGuns');
- timer.Simple(30, function ( ) RunConsoleCommand("changelevel", game.GetMap()) end)
- timer.Simple(25, function ( ) for k, v in pairs(player.GetAll()) do v:Save() end end);
- for k, v in pairs(player.GetAll()) do
- v:Notify("All humans have been converted! Event over. Restarting map.");
- end
- end
- end
- hook.Add('Think', 'CheckZombieGuns', CheckZombieGuns);
- GAMEMODE.LockOverride = true;
- GAMEMODE.CrippleOverride = true;
- GAMEMODE.RespawnOverride = true;
- // Set Up Night Time
- GAMEMODE.CurrentTime = DUSK_END;
- for k, v in pairs(ents.GetAll()) do
- if v:IsDoor() then
- v:Fire('unlock', '', 0);
- end
- end
- local DropTables = {
- {"item_ammo_smg1_large"},
- {"item_healthkit"},
- {"item_battery", "item_battery"},
- {"item_ammo_pistol_large"},
- {"item_ammo_pistol", "weapon_zomb_deagle"},
- {"item_ammo_pistol", "weapon_zomb_deagle"},
- {"weapon_zomb_deagle"},
- {"item_ammo_smg1", "item_ammo_smg1", "item_ammo_smg1"},
- {"weapon_zomb_ak47"},
- {"item_ammo_smg1", "weapon_zomb_ak47"},
- {"item_ammo_pistol", "item_ammo_pistol"},
- {"item_box_buckshot", "item_box_buckshot", "item_box_buckshot"},
- {"item_box_buckshot", "weapon_zomb_shotgun"},
- {"item_box_buckshot", "weapon_zomb_shotgun"},
- {"weapon_zomb_shotgun"},
- };
- local LastUsedTables = {};
- function SpawnShit ( )
- while true do
- local Rand = table.Random(SpawnPositions);
- if !LastUsedTables[Rand] or LastUsedTables[Rand] < CurTime() then
- LastUsedTables[Rand] = CurTime() + 300;
- for i = 1, 4 do
- local DropTable = table.Random(DropTables);
- for k, v in pairs(DropTable) do
- local NewShit = ents.Create(v);
- NewShit:SetPos(Rand + Vector(0, 0, (k - 2) * 10));
- NewShit:Spawn();
- end
- end
- break;
- end
- end
- end
- timer.Create('SpawnShit', 20, 0, SpawnShit);
- for i = 1, 50 do
- SpawnShit();
- end
- GAMEMODE.SpawnWeaponOverride = false;
- for k, v in pairs(player.GetAll()) do
- v:Notify("Zombie gamescripts have been loaded. Once killed, you will become a zombie.");
- v:Notify("Kill all humans to end the round! Look in hidden areas, you may not propblock or propclimb!");
- end
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement