#I need help with my script
1 messages · Page 1 of 1 (latest)
This is my server script
Heres also my cilent script
local UIS = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
humanoid.MaxHealth = 125
humanoid.Health = 125
local M1 = humanoid:LoadAnimation(script.Animations.M1)
local M2 = humanoid:LoadAnimation(script.Animations.M2)
local M3 = humanoid:LoadAnimation(script.Animations.M3)
local M4 = humanoid:LoadAnimation(script.Animations.M4) -- New one
local combo = 1
local cooldown = false
local lastcooldown = false
UIS.InputEnded:Connect(function(I, E)
if E then return end
if I.UserInputType == Enum.UserInputType.MouseButton1 then
if cooldown or lastcooldown then return end
task.spawn(function()
cooldown = true
script.Swing:Play()
task.wait(0.35)
cooldown = false
end)
if combo == 4 then -- NEW 4th attack
game.ReplicatedStorage.MainEvent:FireServer()
M4:Play()
task.spawn(function()
lastcooldown = true
task.wait(1.4) -- Slightly longer cooldown for finishing move
lastcooldown = false
end)
task.spawn(function()
task.wait(0.1)
combo = 1 -- Reset combo
end)
elseif combo == 3 then
game.ReplicatedStorage.MainEvent:FireServer()
M3:Play()
combo = combo + 1
elseif combo == 2 then
game.ReplicatedStorage.MainEvent:FireServer()
M2:Play()
combo = combo + 1
elseif combo == 1 then
game.ReplicatedStorage.MainEvent:FireServer()
M1:Play()
combo = combo + 1
end
end
end)
PLEASE SAVE ME
oh my god
It was alot
** You are now Level 2! **