Frontlines DEMO Script | KNIFE ALL – OPEN SOURCE

Created by jmp

Features:

  • KNIFE ALL
local env_ = getrenv()._G
local min = function(a)
   table.sort(a)
   return a[1]
end
local find = function(t, v, k)
   for p, l in next, t do
       if (p == k and v == nil or v ~= nil and (p == k or v == l)) then
           return p
       end
   end
   return false
end
local spawn = function()
   for i,v in pairs(game:GetService("Players")[game.Players.LocalPlayer.Name].PlayerGui["frontlines_gui"]:GetDescendants()) do
       if v:IsA("TextLabel") and v.Text == "SPAWN" then
           for i,signal in next, getconnections(v.Parent.MouseButton1Click) do
               signal:Fire()
           end
       end
   end
end
local nearest_player = function()
   local t = {}
   local t1 = {}
   for _, player in next, game.Players:GetPlayers() do
       if(not player) then continue end
       if(player == game.Players.LocalPlayer) then continue end
       if(not next(env_.globals.gbl_sol_state.r15_models)) then continue end
       if(not find(env_.globals.cli_names, player.Name)) then continue end
       if(not env_.globals.gbl_sol_state.r15_models[find(env_.globals.cli_names, player.Name)]) then continue end
       
       local _id = find(env_.globals.cli_names, player.Name)
       local _cli_team = env_.globals.cli_teams[_id]

       if(_cli_team == env_.globals.cli_teams[find(env_.globals.cli_names, game.Players.LocalPlayer.Name)]) then continue end
       if(not (env_.globals.gbl_sol_healths[_id] > 0)) then continue end

       local char = env_.globals.gbl_sol_state.r15_models[_id]
       table.insert(t, (char.HumanoidRootPart.Position - env_.globals.gbl_sol_state.r15_models[find(env_.globals.cli_names, game.Players.LocalPlayer.Name)].HumanoidRootPart.Position).Magnitude)
       table.insert(t1, player.Name)
   end
   if not next(t) then return end
   local _id = find(env_.globals.cli_names, t1[table.find(t, min(t))])
   return env_.globals.gbl_sol_state.r15_models[_id], t1[table.find(t, min(t))]
end
local task_ = require(game.ReplicatedStorage.framework_shared.task_scheduler)
local add_task = task_.add_task
task_.add_task = newcclosure(function(p, p1, p3, p4)
   if find(task_.TASK_ENUM, p1) == "STEP_FPV_SOL_RECOIL_ANIM" then
       env_.globals.ctrl_ts.press_melee = time()
       local step = p4
       p4 = function(...)
           env_.globals.ctrl_ts.press_trigger = time()
           env_.globals.ctrl_states.hold_trigger = true
           return step(...)
       end
   end
   return add_task(p, p1, p3, p4)
end)
local newindex
newindex = hookmetamethod(game, "__newindex", function(t, k, v)
   if not next(env_.globals.gbl_sol_state.r15_models) then spawn() end
   if not checkcaller() and t == workspace.CurrentCamera and k == "CFrame" and env_.globals.fpv_sol_instances.eye and env_.globals.gbl_sol_healths[find(env_.globals.cli_names, game.Players.LocalPlayer.Name)] > 0 then
       local player = nearest_player()
       if player then
           env_.globals.fpv_sol_instances.root.CFrame = player.UpperTorso.CFrame
           env_.globals.fpv_sol_instances.eye.CFrame = CFrame.new(env_.globals.fpv_sol_instances.eye.CFrame.p, player.UpperTorso.Position)
       end
   end
   return newindex(t, k, v)
end)

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