City Life Script | COMPLETE ALL TASKS – FOR POLICE

Created by OvM

Features:

  • COMPLETE ALL TASKS
    • SAVE ANY HOSTAGES
    • STOP ANY CHASES
    • ATTEMPT TO KILL ANY THUGS
  •   
  • DEV NOTES:
  • Make sure you are already on the POLICE team on execution.
  • There’s for sure a better way of doing this, in fact I’m not %100 sure both remotes need to be fired but I didn’t do much testing.
local plr = game.Players.LocalPlayer
local plrCh = plr.Character

local data1 = {
   [1] = plrCh,
   [2] = nil,
   [3] = 1,
   [4] = nil,
   [5] = true
}

local data2 = {
   [1] = nil,
   [2] = 1
}

function getMuzzle()

   for i ,v in pairs (game.Workspace:GetDescendants()) do
     
       if (v.Name == "Gun" and v:IsA("Tool")) then
         
           for i ,v in pairs (v:GetDescendants()) do
             
               if (v.Name == "muzzle") then
                   
                   print("Using player : " .. v.Parent.Parent.Parent.Name .. "'s gun muzzle.")
                   return v
                   
               end
             
           end
         
       end
     
   end

end

function stopChases()
 
  spawn(function()
   
       for carChaseIndex, carChase in pairs (game.Workspace.jobInstances.police.carChaseNodes:GetChildren()) do
       
           for i , v in pairs (carChase:GetChildren()) do
               if (v:IsA("Model")) then
       
                   print("Stopping Car : " .. v.Name)
                   game:GetService("ReplicatedStorage").remoteInterface.jobs.action:InvokeServer(v.Parent)
                 
               end
               
           end
       
       end
       
   end)
   
end

function saveHostages()
 
  for instIndex, inst in pairs (game:GetDescendants()) do

      if (inst.Name == "hostageNode" and inst:IsA("Part")) then
   
          for i , v in pairs (inst:GetChildren()) do
             
             if (v:IsA("Model")) then
               
               spawn(function()
                   
                   print("Saving Hostage " .. v.Name)
                   game:GetService("ReplicatedStorage").remoteInterface.jobs.action:InvokeServer(inst)
               
               end)  
                 
             end
             
          end
   
      end
       
   end
   
end

function killThugs()

   for objIndex, obj in pairs (game.Workspace:GetDescendants()) do

       if (obj.Name == "thugNode" and obj:IsA("Part")) then
           
           for i ,v in pairs (obj:GetChildren()) do
               
               if (v.Name == "thug") then
                 
                   data1[4] = v.Head.Position
                   data2[1] = obj
                 
                   local attempts = 0
                 
                   repeat
                       
                       spawn(function()
                       
                           game:GetService("ReplicatedStorage").remoteInterface.tools.bulletShot:FireServer(unpack(data1))
                           game:GetService("ReplicatedStorage").remoteInterface.jobs.action:InvokeServer(unpack(data2))
                           
                       end)
                       
                       
                       print("Attacked " .. v.Name .. " x" .. attempts)
                       attempts = attempts + 1
                       
                   until attempts == 25
                   
               end
               
           end
           
       end
       
   end
   
end

saveHostages()
stopChases()
killThugs()

ENJOY!

Warning: DO NOT DOWNLOAD anything from this page, you’re only here to copy the script!

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

More Scripts!

TOP 10 TRENDING SCRIPTS