Found the problem. One more "end" was needed at the last line(68), due to an "if" statement placed at 45, but was never closed. Try this code:
ImportScript("\\Library\\LibTable.lua")
ImportScript("\\Library\\LibPed.lua")
local l_0_0 = false
MissionSetup = function()
local l_1_0 = 270
local l_1_1 = -110
local l_1_2 = 6.4000000953674
PlayerSetHealth(5000)
AreaTransitionXYZ(0, l_1_0, l_1_1, l_1_2)
SoundPlayStream("MS_DishonorableFight.rsm", 0.69999998807907)
TextPrintString("Darby Full Boss Style", 4, 1)
Wait("5000")
TextPrintString("By Ky", 4, 1)
end
F_MissionSetup = function()
LoadAnimationGroup("BOSS_Darby")
LoadAnimationGroup("P_Striker_A")
LoadAnimationGroup("P_Striker_B")
LoadActionTree("P_Striker_A")
LoadActionTree("P_Striker_B")
LoadActionTree("BOSS_Darby")
PlayerSetControl(1)
DisablePunishmentSystem(false)
ClockSet(8, 30)
ClockSetTickRate(0.0060000000521541)
LaunchScript("SObjTest.lua")
end
MissionCleanup = function()
end
main = function()
F_MissionSetup()
gMissionRunning = true
while gMissionRunning do
if IsButtonPressed(15,0) then
PedSetActionTree(gplayer, "/Global/P_Striker_A", "Act/Anim/P_Striker_A.act")
elseif IsButtonPressed(3,0) then
PedSetActionTree(gPlayer, "/Global/P_Striker_B", "Act/Anim/P_Striker_B.act")
elseif IsButtonPressed(10,0) and IsButtonPressed(8,0) then
PedSetActionTree(gplayer, "/Global/BOSS_Darby", "Act/Anim/BOSS_Darby.act")
elseif IsButtonPressed(1,0) then
PedSetActionNode(gPlayer, "/Global/BOSS_Darby/Offense/Short/Grapples/HeavyAttacks/Catch_Throw", "Act/Anim/BOSS_Darby.act")
elseif IsButtonPressed(0,0) then
PedSetActionNode(gPlayer, "/Global/BOSS_Darby/Offense/Short/Strikes/HeavyAttacks", "Act/Anim/BOSS_Darby.act")
elseif IsButtonPressed(12,0) then
PedSetActionNode(gPlayer, "/Global/P_Striker_A/Offense/Short/Strikes/LightAttacks", "Act/Anim/P_Striker_A.act")
elseif IsButtonPressed(6,0) and IsButtonPressed(7,0) then
PedSetActionNode(gplayer, "/Global/Actions/Offense/RunningAttacks/RunningAttacksDirect", "Act/Anim/GlobalActions.act")
elseif IsButtonPressed(2,0) then
PedSetActionTree(gplayer, "/Global/Player", "Act/Anim/Player.act")
end
UpdateTextQueue()
Wait(0)
end
end