sure!
LocalScript
uis.InputBegan:Connect(function(Input,GameProcessed)
if GameProcessed then return end
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
if Global then
return
else
if not table.find(Cooldowns,Input.UserInputType) then
M1time = tick()
local passedTime = M1time - previousM1time
if passedTime < 1.85*AS then
GUIMessenger:FireServer(player,Enum.UserInputType.MouseButton1,1.85*AS,1,2)
coroutine.resume(coroutine.create(function()
table.insert(Cooldowns, Input.UserInputType)
task.wait(1.85*AS)
local Value = table.find(Cooldowns,Input.UserInputType)
table.remove(Cooldowns, Value)
end))
coroutine.resume(coroutine.create(function()
Global = true
task.wait(1.1)
Global = false
end))
local combo2 = Humanoid:LoadAnimation(AnimationsFolder.m1["2"])
combo2:Play()
local Connection
Connection = combo2.KeyframeReached:Connect(function(kfname)
Attack:FireServer(Input.UserInputType,2,Mouse.UnitRay.Direction)
Connection:Disconnect()
end)
previousM1time = M1time
M1time = 0
else
coroutine.resume(coroutine.create(function()
table.insert(Cooldowns, Input.UserInputType)
task.wait(1.65*AS)
local Value = table.find(Cooldowns,Input.UserInputType)
table.remove(Cooldowns, Value)
end))
coroutine.resume(coroutine.create(function()
Global = true
task.wait(1)
Global = false
end))
GUIMessenger:FireServer(player,Enum.UserInputType.MouseButton1,1.65*AS,1,1)
local combo1 = Humanoid:LoadAnimation(AnimationsFolder.m1["1"])
combo1:Play()
local Connection
Connection = combo1.KeyframeReached:Connect(function(kfname)
if kfname == "StartAttack" then
for i = 1,4 do
Attack:FireServer(Input.UserInputType,1,Mouse.UnitRay.Direction)
task.wait(.1)
end
Connection:Disconnect()
end
end)
end
end
end
end
end)
local function Create(Position,Position2,Param1,Param2)
local newSpin = rs.SpinnyThing:Clone()
debris:AddItem(newSpin,3)
newSpin.Parent = workspace
newSpin.Material = Enum.Material.Neon
newSpin.Transparency = 0.1
newSpin.Size += Vector3.new(5,5,5)
newSpin.Mesh.Scale = newSpin.Size
newSpin.CFrame = CFrame.new(Position,Position + Position2)*CFrame.Angles(math.rad(90+(Param1)),0,math.rad(Param2))
return newSpin
end
FX.OnClientEvent:Connect(function(Input,Param1,Param2,Param3,Param4)
if Input == Enum.UserInputType.MouseButton1 then
if Param4 == 1 then
local newSpin = Create(Param2,Param3,0,0)
local v = fxmod.Velocity(newSpin,Param1,3)
task.spawn(function()
task.wait(0.2)
while newSpin and runservice.RenderStepped:Wait() do
local cf = CFrame.new(Param1) * CFrame.Angles(0,math.rad(90),0)
v.Velocity = (Param1 + cf.lookVector)*100
wait(0.1)
local cf = CFrame.new(Param1) * CFrame.Angles(0,math.rad(-90),0)
v.Velocity = (Param1 + cf.lookVector)*100
wait(0.1)
end
end)
end
end
end)
ServerScript
local function Create(Position,Position2,Param1,Param2)
local newSpin = rs.SpinnyThing:Clone()
debris:AddItem(newSpin,3)
newSpin.Parent = workspace
newSpin.Material = Enum.Material.Neon
newSpin.Transparency = 0.1
newSpin.Size += Vector3.new(5,5,5)
newSpin.Mesh.Scale = newSpin.Size
newSpin.CFrame = CFrame.new(Position,Position + Position2)*CFrame.Angles(math.rad(90+(Param1)),0,math.rad(Param2))
return newSpin
end
Attack.OnServerEvent:Connect(function(Player,Input,Optional1,UnitRay)
local Character = Player.Character
local HRP = Character.HumanoidRootPart
local RightArm = Character.RightLowerArm
local Humanoid = Character:WaitForChild("Humanoid")
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {Character}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
if Optional1 == 1 then
local Direction = UnitRay*100
local Position = RightArm.CFrame.Position
local Position2 = HRP.CFrame.LookVector
local newSpin = Create(Position,Position2,0,0)
local newHitbox = rch.new(newSpin)
newHitbox.Visualizer = false
newHitbox.RaycastParams = raycastParams
newHitbox:HitStart()
local c
c = newHitbox.OnHit:Connect(function(hit,hum)
if hum then
if hum.Parent ~= Character then
newHitbox:HitStop()
fxmod.TakeDamage(Character,hum.Parent,10,75)
task.wait(.075)
newHitbox:HitStart()
end
end
c:Disconnect()
end)
fxmod.Velocity(newSpin,Direction,3)
FX:FireAllClients(Input,Direction,Position,Position2,1)
end
end)
I’m new to this and I don’t know what to use, heres the output in my screen (it seems very laggy and the hitbox falls back, same with the spinning part. (im using raycast hitbox v4))
https://gyazo.com/f19b60bb2c09564756690947ce22606c.mp4