Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local NpcManager = require(game.ServerScriptService.NPC.NpcManager)
- local NpcController = require(game.ServerScriptService.NPC.NpcController)
- local Gui = script.Parent.Value
- local runs = game:GetService("RunService")
- local hb = runs.Heartbeat
- hb:Connect(function()
- if(NpcManager.ActiveCombatNpcs[Gui] ~= nil) then
- local npc = NpcManager.ActiveCombatNpcs[Gui].NpcClassData
- NpcController.ProcessHits(npc)
- end
- end)
- while true do
- hb:wait()
- if(NpcManager.ActiveCombatNpcs[Gui] ~= nil) then
- local npc = NpcManager.ActiveCombatNpcs[Gui].NpcClassData
- NpcController.ProcessFollowPaths(npc)
- NpcController.ProcessMovement(npc)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement