0% found this document useful (0 votes)
16 views24 pages

Kick Handler Backup

The document outlines a Lua module for a game that manages various actions related to a ball, such as shooting, flicking, and tackling. It includes functions for creating effects, checking conditions, and managing player stamina and ball possession. The module also integrates sound and visual effects to enhance gameplay experience.

Uploaded by

atharrashid2008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views24 pages

Kick Handler Backup

The document outlines a Lua module for a game that manages various actions related to a ball, such as shooting, flicking, and tackling. It includes functions for creating effects, checking conditions, and managing player stamina and ball possession. The module also integrates sound and visual effects to enhance gameplay experience.

Uploaded by

atharrashid2008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 24

local Events = game.

ReplicatedStorage:WaitForChild("BallKickEvents")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Debris = game:GetService("Debris")
local EffectsManager = require(game.ReplicatedStorage.Effects.Effects)
local SoundManager = require(game.ReplicatedStorage.Effects.SoundManager)
local TypewriteManager = require(game.ReplicatedStorage.TypeWriterLib)
local TweenService = game:GetService("TweenService")

local module = {}

local function makeimpactpoint(cframe, timefor)


local impactpoint = Instance.new("Part", workspace)
impactpoint.Transparency = 1
impactpoint.CanCollide = false
impactpoint.CanTouch = false
impactpoint.CanQuery = false
impactpoint.Massless = true
impactpoint.Anchored = true
impactpoint.CFrame = cframe
game.Debris:AddItem(impactpoint, timefor)
return impactpoint
end

local function create(cName, parent, lifetime)


local new = Instance.new("Folder")
new.Name = cName
new.Parent = parent
if lifetime then
Debris:AddItem(new, lifetime)
end
return new
end

local function CheckConditions(Character: Model, StamReq, stamina)


if Character:FindFirstChild("Stunned") or Character:FindFirstChild("Stagger")
and stamina < StamReq then
return true
end
return false
end

function module.ShootBall(Character, mousepos, power, cframe, stamina)


if Character:FindFirstChild("HasBall") then
local ball = workspace.TestBall
create("Unrecievable", ball, 0.6)
local dampingFactor = 0.99
if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end
create("SlowDown", Character, 0.1)
create("CantShoot", Character, 0.3)
SoundManager.PlaySound(game.ReplicatedStorage.Effects.Kick,
Character.HumanoidRootPart)
ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(0, -1, 0)
EffectsManager.Kick(Character)
local force = mousepos * power * 1.1
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force + Vector3.new(0, 10, 0)
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.3)

create("CantRecieve", Character, 0.3)


end
end

function module.Flick(Character, look, power, cframe, stamina)


if CheckConditions(Character, 10, stamina) == false and not
Character:FindFirstChild("CantShoot") then
create("CantRecieve", Character, 0.6)
create("CantHeader", Character, 1)
create("CantJump", Character, 1)
create("CantFlick", Character, 2)
create("CantRegen", Character, 1)
local dampingFactor = 0.99
if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end
SoundManager.PlaySound(game.ReplicatedStorage.Effects.Kick,
Character.HumanoidRootPart)
local ball = workspace.TestBall
ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(2, 1, -0)
EffectsManager.Kick(Character)
local force = look * power
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force + Vector3.new(0, 40, 0)
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.2)
end
end

function module.HeaderBall(Character, mousepos, power, cframe, stamina)


if CheckConditions(Character, 10, stamina) == false and not
Character:FindFirstChild("CantHeader") then
create("CantRegen", Character, 1)
create("CantRecieve", Character, 0.5)
create("CantHeader", Character, 1)
if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end
SoundManager.PlaySound(game.ReplicatedStorage.Effects.Kick,
Character.Head)
local ball = workspace.TestBall
ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(0, 4, -4)
EffectsManager.Header(Character)
local force = mousepos * power
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.2)
end
end

function module.RecieveBall(Character, ball)


create("CantRecieve", Character, 0.5)

local motor6d = Instance.new("Motor6D", Character.HumanoidRootPart)


motor6d.Part0 = Character.HumanoidRootPart
motor6d.Part1 = ball
motor6d.Name = "BallPossession"
motor6d.C0 = CFrame.new(0, -2.4, -2)
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
local Highlight = Instance.new("Highlight", Character)
Highlight.Adornee = Character
Highlight.FillTransparency = 1
Highlight.DepthMode = Enum.HighlightDepthMode.Occluded
Highlight.OutlineTransparency = 0
Highlight.OutlineColor = Color3.new(1, 1, 1)
Highlight.Name = "OwnHL"

ball.CanCollide = false
ball.Taken.Value = true

local value = Instance.new("BoolValue", Character)


value.Name = "HasBall"
value.Value = true
end

function module.Dribble(Character, stamina)


if CheckConditions(Character, 10, stamina) == false and not
Character:FindFirstChild("CantDribble") then
create("CantRegen", Character, 1)
create("Dribbling", Character, 0.6)
create("CantDribble", Character, 2)
end
end
function module.Tackle(Character, lookpos, cframe, stamina)
if CheckConditions(Character, 15, stamina) == false then
create("Tackling", Character, 0.6)
create("CantRegen", Character, 1)
create("CantTackle", Character, 2)
create("CantMove", Character, 1)
EffectsManager.Slide(Character)
local direction = lookpos
local v = Instance.new("BodyVelocity", Character.HumanoidRootPart)
v.MaxForce = Vector3.new(999999, 999999, 999999)
v.Velocity = lookpos * 90
game.Debris:AddItem(v, 1)
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out)
local goal = { Velocity = Vector3.new(0, 0, 0) }
local tween = game.TweenService:Create(v, tweenInfo, goal)
tween:Play()

local AO = Instance.new("AlignOrientation", Character.HumanoidRootPart)


AO.Attachment0 = Character.HumanoidRootPart.RootAttachment
AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
AO.MaxTorque = math.huge
AO.CFrame = cframe
AO.Responsiveness = 200
game.Debris:AddItem(AO, 1)
end
end

function module.Take(Character, enCharacter)


if not enCharacter:FindFirstChild("Dribbling") and CheckConditions(Character)
== false then
local ball = workspace:WaitForChild("TestBall")
if enCharacter:FindFirstChild("HasBall") then
enCharacter.HasBall:Destroy()
end
if enCharacter.HumanoidRootPart:FindFirstChild("BallPossession") then
enCharacter.HumanoidRootPart.BallPossession:Destroy()
end
if enCharacter:FindFirstChild("OwnHL") then
enCharacter.OwnHL:Destroy()
end

local motor6d = Instance.new("Motor6D", Character.HumanoidRootPart)


motor6d.Part0 = Character.HumanoidRootPart
motor6d.Part1 = ball
motor6d.Name = "BallPossession"
motor6d.C0 = CFrame.new(0, -2.4, -2)
SoundManager.PlaySound(game.ReplicatedStorage.Effects.Kick,
Character.HumanoidRootPart)
local value = Instance.new("BoolValue", Character)
value.Name = "HasBall"
value.Value = true
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
EffectsManager.Kick(Character)

local Highlight = Instance.new("Highlight", enCharacter)


Highlight.Adornee = enCharacter
Highlight.OutlineTransparency = 1
Highlight.DepthMode = Enum.HighlightDepthMode.Occluded
Highlight.FillTransparency = 0.65
Highlight.FillColor = Color3.new(1, 0, 0)
game.Debris:AddItem(Highlight, 2)

enCharacter.IsRagdoll.Value = true
enCharacter.Humanoid.PlatformStand = true

create("CantRecieve", Character, 0.5)


create("Stunned", enCharacter, 2)

task.wait(2)

enCharacter.IsRagdoll.Value = false
enCharacter.Humanoid.PlatformStand = false
elseif enCharacter:FindFirstChild("Dribbling") and CheckConditions(Character)
== false then
local Highlight = Instance.new("Highlight", Character)
Highlight.Adornee = Character
Highlight.OutlineTransparency = 1
Highlight.DepthMode = Enum.HighlightDepthMode.Occluded
Highlight.FillTransparency = 0.65
Highlight.FillColor = Color3.new(1, 0, 0)
game.Debris:AddItem(Highlight, 2)
SoundManager.PlaySound(game.ReplicatedStorage.Effects.AnkleBreak,
enCharacter.HumanoidRootPart)
Character.IsRagdoll.Value = true
Character.Humanoid.PlatformStand = true

create("Stunned", Character, 2)

task.wait(2)

Character.IsRagdoll.Value = false
Character.Humanoid.PlatformStand = false
end
end

function EffectsManager.RainbowShadow(character)
local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then return end

local colors = {
Color3.fromRGB(255, 0, 0),
Color3.fromRGB(255, 127, 0),
Color3.fromRGB(255, 255, 0),
Color3.fromRGB(0, 255, 0),
Color3.fromRGB(0, 0, 255),
Color3.fromRGB(75, 0, 130),
Color3.fromRGB(148, 0, 211),
}

for i = 1, 5 do
task.delay(i * 0.03, function()
local clone = character:Clone()
for _, item in ipairs(clone:GetDescendants()) do
if item:IsA("Decal") or item:IsA("Accessory") or
item:IsA("Humanoid") or item:IsA("Animator") or item:IsA("Motor6D") then
item:Destroy()
elseif item:IsA("BasePart") then
item.Anchored = true
item.CanCollide = false
item.Transparency = 0.3 + (i * 0.1)
item.Color = colors[(i % #colors) + 1]
end
end

local rootClone = clone:FindFirstChild("HumanoidRootPart")


if rootClone then
clone:SetPrimaryPartCFrame(humanoidRootPart.CFrame)
end

for _, part in ipairs(clone:GetDescendants()) do


if part:IsA("BasePart") then
local tween = TweenService:Create(part,
TweenInfo.new(0.4), { Transparency = 1 })
tween:Play()
end
end

game.Debris:AddItem(clone, 0.5)
end)
end
end

function module.Move(move, Character, mousepos, cframe, stamina)


if move == "Direct Shot" then
local ball = workspace.TestBall
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.I
sagi.FirstMove["Direct Shot"])
anim:Play()

SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations["Isagi"].FirstMove.B
allEffects.Sound, ball)

create("Stunned", Character, 1)
create("Direct Shot", Character, 10)
create("Unrecievable", ball, 2)
create("CantRecieve", Character, 0.3)

task.wait(1)

if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end

ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(0, -1, 0)
local force = mousepos * 150 + Vector3.new(0, 30, 0)
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.3)

elseif move == "Dash" then


local ball = workspace.TestBall
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.I
sagi.SecondMove["Dash"])
anim:Play()

create("Stunned", Character, 1)
create("Ball Dash", Character, 8)
create("Unrecievable", ball, 2)
create("CantRecieve", Character, 0.3)

local bodyVelocity = Instance.new("BodyVelocity")


bodyVelocity.MaxForce = Vector3.new(1, 0, 1) * 50000
bodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector *
150
bodyVelocity.P = 1150
bodyVelocity.Parent = Character.HumanoidRootPart
game.Debris:AddItem(bodyVelocity, .3)

elseif move == "Meta Run" then


local ball = workspace:FindFirstChild("TestBall")
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.R
in.SecondMove["Meta Run"])
anim:Play()

SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations.Rin.SecondMove.BallE
ffects.Sound, Character.HumanoidRootPart)

create("Stunned", Character, 1)
create("Meta Run", Character, 8)
create("Unrecievable", ball, 2)
create("CantRecieve", Character, 0.3)

local bodyVelocity = Instance.new("BodyVelocity")


bodyVelocity.MaxForce = Vector3.new(1, 0, 1) * 50000
bodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector *
150
bodyVelocity.P = 1150
bodyVelocity.Parent = Character.HumanoidRootPart
game.Debris:AddItem(bodyVelocity, .3)
elseif move == "Gyro Shot" then
local ball = workspace.TestBall
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.Y
ukimiya.FirstMove["Gyro Shot"])
anim:Play()
create("Gyro Shot", Character, 10)
create("Unrecievable", ball, 0.7)
create("Stunned", Character, 1)

task.wait(1.2)

local dampingFactor = 0.99


if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end

local impactpoint = Instance.new("Part", workspace)


impactpoint.Transparency = 1
impactpoint.CanCollide = false
impactpoint.CanTouch = false
impactpoint.CanQuery = false
impactpoint.Massless = true
impactpoint.Anchored = true
impactpoint.CFrame = cframe * CFrame.new(0, 0, -1)

ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(-4, -1, -2)
local force = mousepos * 100 + Vector3.new(0, 10, 0)
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball
spawn(function()
local curveDirection = -1
local curveStrength = 12
local switchTime = 5
local switchOccurred = false
local rise = true
local fall = false

for i = 1, 10 do
bodyVelocity.Velocity = bodyVelocity.Velocity +
ball.CFrame.RightVector * (curveDirection * curveStrength)
if rise == true then
bodyVelocity.Velocity = bodyVelocity.Velocity +
Vector3.new(0, 6, 0)
else
bodyVelocity.Velocity = bodyVelocity.Velocity -
Vector3.new(0, 2, 0)
end
if i == switchTime and not switchOccurred then
curveDirection = 1
switchOccurred = true
curveStrength = 17
rise = false
fall = true
print("swtch")
end
wait(0.05)
end
end)
game.Debris:AddItem(bodyVelocity, 0.7)
local cutin =
game.ReplicatedStorage.PlayerAnimations.Volta.FirstMove.BallEffects.Shoot:Clone()
cutin.Parent = workspace
cutin.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(5, 0, -
16)
task.spawn(function()
TypewriteManager:TypeWrite(cutin.BillboardGui.TextLabel, "SHOOT",
0.3)
end)
game.Debris:AddItem(cutin, 5)
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out, 0, false, 0)
local Goals = { Size = UDim2.new(14, 0, 14, 0) }
local tween =
game:GetService("TweenService"):Create(cutin.BillboardGui, Info, Goals)
tween:Play()
task.wait(0.6)
local Info = TweenInfo.new(0.5, Enum.EasingStyle.Cubic,
Enum.EasingDirection.Out, 0, false, 0)
local Goals = { TextTransparency = 1, TextStrokeTransparency = 1 }
local tween =
game:GetService("TweenService"):Create(cutin.BillboardGui.TextLabel, Info, Goals)
tween:Play()

elseif move == "Curve Shot" then


local ball = workspace:FindFirstChild("TestBall")
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.R
in.FirstMove["Curve Shot"])
anim:Play()

SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations["Rin"].FirstMove.Bal
lEffects.Sound, ball)

create("Curve Shot", Character, 10)


create("Unrecievable", ball, 0.7)
create("Stunned", Character, 1)

task.wait(.5)

local dampingFactor = 0.99


if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end
local impactpoint = Instance.new("Part", workspace)
impactpoint.Transparency = 1
impactpoint.CanCollide = false
impactpoint.CanTouch = false
impactpoint.CanQuery = false
impactpoint.Massless = true
impactpoint.Anchored = true
impactpoint.CFrame = cframe * CFrame.new(0, 0, -1)

ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
local force = mousepos * 90 + Vector3.new(0, 15, 0)
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball

spawn(function()
local curveIntensity = 5
local curveDuration = 0.3
local frames = 20
local frameInterval = curveDuration / frames
local initialRiseDuration = 0.2
local riseFrames = initialRiseDuration / frameInterval
local riseStrength = 1
local curveDirection = -1

task.wait(.25)
for i = 1, frames do
local progress = i / frames
local currentCurveStrength = curveIntensity * (1 - progress
^ 2)
bodyVelocity.Velocity = bodyVelocity.Velocity +
ball.CFrame.RightVector * (curveDirection * currentCurveStrength)
if i <= riseFrames then
bodyVelocity.Velocity = bodyVelocity.Velocity +
Vector3.new(0, riseStrength * (1 - progress), 0)
else
local fallProgress = (i - riseFrames) / (frames -
riseFrames)
bodyVelocity.Velocity = bodyVelocity.Velocity -
Vector3.new(0, riseStrength * 0.5 * fallProgress, 0)
end
task.wait(frameInterval)
end
end)
game.Debris:AddItem(bodyVelocity, 0.6)

elseif move == "Deep Analysis" then


create("Deep Analysis", Character, 30)
local impactpoint = Instance.new("Part", workspace)
impactpoint.Transparency = 1
impactpoint.CanCollide = false
impactpoint.CanTouch = false
impactpoint.CanQuery = false
impactpoint.Massless = true
impactpoint.Anchored = true
impactpoint.CFrame = cframe * CFrame.new(0, -2.5, 0)
SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations.Analytical.SecondMov
e.AuraInduced, Character.Torso)
local fx3 =
game.ReplicatedStorage.PlayerAnimations.Analytical.SecondMove.Effects.ParticleEmitt
er:Clone()
fx3.Parent = impactpoint
local fx4 =
game.ReplicatedStorage.PlayerAnimations.Analytical.SecondMove.Effects.RESIDUE:Clone
()
fx4.Parent = impactpoint
local fx5 =
game.ReplicatedStorage.PlayerAnimations.Analytical.SecondMove.Effects.Impact:Clone(
)
fx5.Parent = impactpoint

task.delay(0.01, function()
fx3:Emit(fx4:GetAttribute("EmitCount"))
fx4:Emit(fx4:GetAttribute("EmitCount"))
fx5:Emit(fx5:GetAttribute("EmitCount"))
end)

game.Debris:AddItem(fx3, 5)
game.Debris:AddItem(fx4, 5)
game.Debris:AddItem(fx5, 5)
game.Debris:AddItem(impactpoint, 5)

local buff = create("SprintSpeedBuff", Character, 10)


local buffamount = Instance.new("NumberValue", buff)
buffamount.Name = "Amount"
buffamount.Value =
game.ReplicatedStorage.PlayerAnimations.Analytical.SecondMove.SpeedBuff.Value

for i, v in pairs(Character:GetChildren()) do
if v:IsA("BasePart") and v.Transparency == 0 then
local fx4 =
game.ReplicatedStorage.PlayerAnimations.Analytical.SecondMove.Effects.Aura:Clone()
fx4.Parent = v
task.delay(10, function()
fx4.Enabled = false
end)
game.Debris:AddItem(fx4, 15)
end
end
elseif move == "Cut In" then
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.Y
ukimiya.SecondMove["Cut In"])
anim:Play()

create("Cut In", Character, 20)


create("CantMove", Character, 2.4)
create("Dribbling", Character, 2.4)
create("CantShoot", Character, 2.4)

local AO = Instance.new("AlignOrientation", Character.HumanoidRootPart)


AO.Attachment0 = Character.HumanoidRootPart.RootAttachment
AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
AO.MaxTorque = math.huge
AO.CFrame = cframe
AO.Responsiveness = 200
game.Debris:AddItem(AO, 1)

local v = Instance.new("BodyVelocity", Character.HumanoidRootPart)


v.MaxForce = Vector3.new(999999, 999999, 999999)
v.Velocity = cframe.LookVector * 60
game.Debris:AddItem(v, 0.4)

task.wait(0.6)

local v2 = Instance.new("BodyVelocity", Character.HumanoidRootPart)


v2.MaxForce = Vector3.new(999999, 999999, 999999)
v2.Velocity = cframe.RightVector * 120
game.Debris:AddItem(v2, 0.4)

task.wait(0.5)

elseif move == "Kaiser Impact" then


local ball = workspace.TestBall
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.K
aiser.FirstMove["Kaiser Impact"])
anim:Play()

SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations["Kaiser"].FirstMove.
BallEffects.Sound, ball)

create("Stunned", Character, 1)
create("Kaiser Impact", Character, 25)
create("Unrecievable", ball, 2)
create("CantRecieve", Character, 0.3)

task.wait(0.60)

if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end

ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(0, -2, 0)

local force = mousepos * 152 + Vector3.new(0, 37, 0)


local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.5)

elseif move == "Eagle Eye" then


local ball = game.Workspace:FindFirstChild("TestBall")
local airThreshold = 209

if not ball then


warn("Eagle Eye failed: Ball not found!")
return
end

if ball.Position.Y <= airThreshold then


warn("Eagle Eye failed: The ball must be in the air!")
return
end

local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.A
iku.FirstMove["Eagle Eye"])

create("Eagle Eye", Character, 2)


create("CantHeader", Character, 2)

local distance = (ball.Position -


Character.PrimaryPart.Position).Magnitude

if distance <= 68 then


anim:Play()
Character:SetPrimaryPartCFrame(CFrame.new(ball.Position))
local snakeEffect = ReplicatedStorage.MoveEffect.Snake:Clone()
snakeEffect.Parent = Character
snakeEffect.Anchored = false

local weld = Instance.new("Weld")


weld.Part0 = Character.PrimaryPart
weld.Part1 = snakeEffect
weld.C0 = CFrame.new(0, 0, 0)
weld.Parent = snakeEffect

snakeEffect.CFrame = Character.PrimaryPart.CFrame

local humanoid = Character:FindFirstChildOfClass("Humanoid")


local rootPart = Character.PrimaryPart

if humanoid and rootPart then


humanoid.PlatformStand = true
local bodyPos = Instance.new("BodyPosition")
bodyPos.Position = rootPart.Position
bodyPos.MaxForce = Vector3.new(1e5, 1e5, 1e5)
bodyPos.P = 1e4
bodyPos.Parent = rootPart

task.delay(0, function()
if ball and rootPart then
ball.Position = rootPart.Position +
Vector3.new(0, 2, 0)
end
end)
task.delay(3, function()
if bodyPos and bodyPos.Parent then
bodyPos:Destroy()
end
if humanoid then
humanoid.PlatformStand = false
anim:Stop()
end
if snakeEffect and snakeEffect.Parent then
snakeEffect:Destroy()
end
end)
end
end

elseif move == "Heel Flick" then


local ball = workspace.TestBall
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.S
ae.SecondMove["Heel Flick"])
local dashAnim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.I
sagi.SecondMove["Dash"])
anim:Play()

local effect = ReplicatedStorage.MoveEffect.Sae1:Clone()


effect.Parent = game.Workspace
effect.CFrame = Character.PrimaryPart.CFrame

SoundManager.PlaySound(game.ReplicatedStorage.Effects.Kick,
Character.HumanoidRootPart)

create("Stunned", Character, 0.7)


create("Heel Flick", Character, 10)
create("Unrecievable", ball, 1)
create("CantRecieve", Character, 0.3)
create("CantShoot", Character, 1.2)
create("Stunned", Character, 1.5)

task.wait(0.7)

if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end

ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0, -1.5, -
2)

EffectsManager.Kick(Character)
local force = Character.HumanoidRootPart.CFrame.LookVector * 70 +
Vector3.new(0, 30, 0)
local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.3)

task.wait(0.2)
dashAnim:Play()
local dashVelocity = Instance.new("BodyVelocity")
dashVelocity.MaxForce = Vector3.new(1e5, 0, 1e5)
dashVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector *
170
dashVelocity.P = 1250
dashVelocity.Parent = Character.HumanoidRootPart
game.Debris:AddItem(dashVelocity, 0.25)
effect:Destroy()
elseif move == "Magic Turn" then
local hrp = Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local dashRange = 50
local dashSpeed = 100
local turnRadius = 10
local totalTime = dashRange / dashSpeed

local humanoid = Character:FindFirstChildOfClass("Humanoid")


if not humanoid then return end
local animator = humanoid:FindFirstChildOfClass("Animator")
if not animator then return end

local anim =
animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.Sae.FirstMove["Magic
Turn"])
anim:Play()

if anim.Length > 0.1 then


anim:AdjustSpeed(anim.Length / totalTime)
else
anim:AdjustSpeed(1)
end

local TweenService = game:GetService("TweenService")

local trailColors = {
Color3.fromRGB(0, 255, 0),
Color3.fromRGB(255, 255, 0),
Color3.fromRGB(255, 0, 255),
Color3.fromRGB(0, 255, 255),
}

local function createTrailShadowClone(sourceModel, color,


sizeMultiplier)
local clones = {}
for _, part in pairs(sourceModel:GetChildren()) do
if part:IsA("BasePart") then
local lname = part.Name:lower()
local isHead = lname == "head"
if (part ~= sourceModel.PrimaryPart or isHead) and
not lname:find("hitbox") and not lname:find("tool") then
local clone = part:Clone()
clone.Anchored = true
clone.CanCollide = false
clone.Color = color
clone.Transparency = 1
if clone:IsA("MeshPart") then
clone.TextureID = ""
end
for _, obj in pairs(clone:GetDescendants()) do
if not obj:IsA("SpecialMesh") then
obj:Destroy()
end
end
clone.Size = clone.Size * (sizeMultiplier or 1)
clone.CFrame = part.CFrame
clone.Parent = workspace
table.insert(clones, clone)
end
end
end

for _, acc in pairs(sourceModel:GetChildren()) do


if acc:IsA("Accessory") then
local handle = acc:FindFirstChild("Handle")
if handle then
local cloneHandle = handle:Clone()
cloneHandle.Anchored = true
cloneHandle.CanCollide = false
cloneHandle.Color = color
cloneHandle.Transparency = 1
if cloneHandle:IsA("MeshPart") then
cloneHandle.TextureID = ""
end
for _, obj in
pairs(cloneHandle:GetDescendants()) do
if not obj:IsA("SpecialMesh") then
obj:Destroy()
end
end
cloneHandle.Size = cloneHandle.Size *
(sizeMultiplier or 1)
cloneHandle.CFrame = handle.CFrame
cloneHandle.Parent = workspace
table.insert(clones, cloneHandle)
end
elseif acc:IsA("Decal") or acc:IsA("Texture") then
local decalClone = acc:Clone()
decalClone.Parent = workspace
end
end

for _, clone in pairs(clones) do


task.spawn(function()
local fadeIn = TweenService:Create(clone,
TweenInfo.new(0.1), { Transparency = 0.75 })
fadeIn:Play()
task.wait(0.1)
local fadeOut = TweenService:Create(clone,
TweenInfo.new(0.4), { Transparency = 1 })
fadeOut:Play()
task.wait(0.4)
clone:Destroy()
end)
end
end

local function startTrailDuring(duration, sizeMultiplier)


task.spawn(function()
local step = 0.05
local colorIndex = 1
while duration > 0 do
createTrailShadowClone(Character,
trailColors[colorIndex], sizeMultiplier)
colorIndex = (colorIndex % #trailColors) + 1
task.wait(step)
duration -= step
end
end)
end

local forward = hrp.CFrame.LookVector


local right = hrp.CFrame.RightVector
local startPos = hrp.Position
local halfDash = dashRange / 2
local kiriPos = startPos + forward * halfDash - right * turnRadius
local kananPos = startPos + forward * dashRange + right * turnRadius

local sizeMultiplier = 1.1

local tweenInfoKiri = TweenInfo.new(totalTime / 2,


Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local tweenKiri = TweenService:Create(hrp, tweenInfoKiri, {
CFrame = CFrame.new(kiriPos, kiriPos + forward)
})
startTrailDuring(tweenInfoKiri.Time, sizeMultiplier)
tweenKiri:Play()
task.wait(tweenInfoKiri.Time)

local tweenInfoKanan = TweenInfo.new(totalTime / 2,


Enum.EasingStyle.Sine, Enum.EasingDirection.In)
local tweenKanan = TweenService:Create(hrp, tweenInfoKanan, {
CFrame = CFrame.new(kananPos, kananPos + forward)
})
startTrailDuring(tweenInfoKanan.Time, sizeMultiplier)
tweenKanan:Play()
task.wait(tweenInfoKanan.Time)

hrp.CFrame = CFrame.lookAt(hrp.Position, hrp.Position + forward)

anim:Stop()

elseif move == "Mid Range Shot" then


local ball = workspace.TestBall
local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.K
unigami.FirstMove["Mid Range Shot"])
anim:Play()

SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations["Kunigami"].FirstMov
e.BallEffects.Sound, ball)

create("Stunned", Character, 1)
create("Mid Range Shot", Character, 25)
create("Unrecievable", ball, 2)
create("CantRecieve", Character, 0.3)

task.wait(0.60)

if Character:FindFirstChild("HasBall") then
Character.HasBall:Destroy()
end
if Character.HumanoidRootPart:FindFirstChild("BallPossession") then
Character.HumanoidRootPart.BallPossession:Destroy()
end
if Character:FindFirstChild("OwnHL") then
Character.OwnHL:Destroy()
end

ball.CanCollide = true
ball.Taken.Value = false
ball:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Character))
ball.CFrame = cframe * CFrame.new(0, -2, 0)

local force = mousepos * 152 + Vector3.new(0, 37, 0)


local bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = force
bodyVelocity.Parent = ball
game.Debris:AddItem(bodyVelocity, 0.5)

elseif move == "Steal" then


local hrp = Character:FindFirstChild("HumanoidRootPart")
if not hrp then return end

local humanoid = Character:FindFirstChildOfClass("Humanoid")


if not humanoid then return end

local animator = humanoid:FindFirstChildOfClass("Animator")


if not animator then return end

local fadeOutDuration = 1

local animPath =
game.ReplicatedStorage.PlayerAnimations.Bachira.FirstMove:FindFirstChild("Steal")
if not animPath then return end
local anim = animator:LoadAnimation(animPath)
anim:Play()

create("Tackling", Character, 0.6)


create("CantRegen", Character, 1)
create("CantTackle", Character, 2)
create("CantMove", Character, 1)
EffectsManager.Slide(Character)

local direction = hrp.CFrame.LookVector


local v = Instance.new("BodyVelocity", hrp)
v.MaxForce = Vector3.new(999999, 999999, 999999)
v.Velocity = direction * 90
game.Debris:AddItem(v, 1)
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quad,
Enum.EasingDirection.Out)
local goal = {Velocity = Vector3.new(0, 0, 0)}
local tween = game.TweenService:Create(v, tweenInfo, goal)
tween:Play()

local AO = Instance.new("AlignOrientation", hrp)


AO.Attachment0 = hrp:FindFirstChild("RootAttachment")
AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
AO.MaxTorque = math.huge
AO.CFrame = hrp.CFrame
AO.Responsiveness = 200
game.Debris:AddItem(AO, 1)

local clone = Character:Clone()


clone.Parent = workspace
game.Debris:AddItem(clone, fadeOutDuration)

for _, part in pairs(clone:GetDescendants()) do


if part.Name == "Hitbox" or part.Name == "HeaderHitbox" or
part.Name == "TackleHitbox" or part:IsA("Humanoid") or part:IsA("Script") then
part:Destroy()
end
end

local TweenService = game:GetService("TweenService")


for _, part in pairs(clone:GetDescendants()) do
if part:IsA("BasePart") or part:IsA("Decal") then
local fadeTweenInfo = TweenInfo.new(fadeOutDuration,
Enum.EasingStyle.Linear)
local fadeGoal = {Transparency = 1}
local fadeTween = TweenService:Create(part, fadeTweenInfo,
fadeGoal)
fadeTween:Play()
end
end

task.wait(1)
anim:Stop()

elseif move == "Nutmeg" then

--local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.B
achira.SecondMove["Nutmeg"])
--anim:Play()

create("Nutmeg", Character, 98765421)


create("CantMove", Character, 0.4)
create("CantShoot", Character, 0.6)
local root = Character:FindFirstChild("HumanoidRootPart")
if not root then return end

local ball = workspace:FindFirstChild("TestBall")

local effectsFolder = ReplicatedStorage:FindFirstChild("BallEffects")


and ReplicatedStorage.BallEffects:FindFirstChild("Nutmeg")
if not effectsFolder or not ball then return end

-- Play align for smooth direction locking


local AO = Instance.new("AlignOrientation")
AO.Attachment0 = root:FindFirstChild("RootAttachment")
AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
AO.MaxTorque = math.huge
AO.CFrame = root.CFrame
AO.Responsiveness = 200
AO.Parent = root
game.Debris:AddItem(AO, 0.8)

-- Do forward dash
local dashSpeed = 85
local dashTime = 0.3
local forward = root.CFrame.LookVector
root.AssemblyLinearVelocity = forward * dashSpeed

-- Spawn visual effects


for _, effectTemplate in ipairs(effectsFolder:GetChildren()) do
if effectTemplate:IsA("MeshPart") or effectTemplate:IsA("Part")
then

-- Clone and add attachments


for _, attachment in ipairs(effectTemplate:GetChildren())
do
if attachment:IsA("Attachment") and not
ball:FindFirstChild(attachment.Name) then
local attClone = attachment:Clone()
attClone.Parent = ball
end
end

-- Clone trail/particles
for _, item in ipairs(effectTemplate:GetChildren()) do
if item:IsA("Trail") or item:IsA("ParticleEmitter")
then
local clone = item:Clone()

if clone:IsA("Trail") then
local att0 =
ball:FindFirstChild(clone.Attachment0.Name)
local att1 =
ball:FindFirstChild(clone.Attachment1.Name)
if att0 and att1 then
clone.Attachment0 = att0
clone.Attachment1 = att1
end
end
clone.Parent = ball
clone.Enabled = true

if clone:IsA("ParticleEmitter") and
clone:GetAttribute("EmitCount") then

clone:Emit(clone:GetAttribute("EmitCount"))
end

task.delay(0.4, function()
local fadeTime = 2.5
local steps = 10
for i = 1, steps do
local alpha = i / steps
local transparency =
NumberSequence.new{
NumberSequenceKeypoint.new(0,
alpha),
NumberSequenceKeypoint.new(1,
alpha)
}
if clone and
clone:IsDescendantOf(workspace) then
clone.Transparency =
transparency
end
task.wait(fadeTime / steps)
end
if clone and
clone:IsDescendantOf(workspace) then
clone.Enabled = false
clone:Destroy()
end
end)
end
end
end
end

-- Detect nutmeg hitbox (behind enemy legs)


local nutmegHitbox = Instance.new("Part")
nutmegHitbox.Size = Vector3.new(3, 5, 2)
nutmegHitbox.Transparency = 1
nutmegHitbox.Anchored = true
nutmegHitbox.CanCollide = false
nutmegHitbox.CFrame = root.CFrame * CFrame.new(0, 0, -2)
nutmegHitbox.Parent = workspace
game.Debris:AddItem(nutmegHitbox, 0.3)

for _, player in ipairs(game.Players:GetPlayers()) do


if player.Character and player.Character ~= Character then
local hrp =
player.Character:FindFirstChild("HumanoidRootPart")
if hrp and (hrp.Position - nutmegHitbox.Position).Magnitude
< 3 then
create("Stunned", player.Character, 1.2)
end
end
end
task.delay(dashTime, function()
root.AssemblyLinearVelocity = Vector3.zero
end)

elseif move == "Emperor Dribble" then


local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.K
aiser.SecondMove["Emperor Dribble"])
anim:Play()

SoundManager.PlaySound(game.ReplicatedStorage.PlayerAnimations["Kaiser"].SecondMove
.BallEffects.Sound, ball)

create("Emperor Dribbling", Character, 5)


create("CantMove", Character, 1)
create("Dribbling", Character, 1 )
create("CantShoot", Character, 2.4)

local AO = Instance.new("AlignOrientation", Character.HumanoidRootPart)


AO.Attachment0 = Character.HumanoidRootPart.RootAttachment
AO.Mode = Enum.OrientationAlignmentMode.OneAttachment
AO.MaxTorque = math.huge
AO.CFrame = cframe
AO.Responsiveness = 200
game.Debris:AddItem(AO, 1)

local function applyVelocity(dir, speed, duration)


local bv = Instance.new("BodyVelocity")
bv.MaxForce = Vector3.new(999999, 0, 999999)
bv.Velocity = dir.Unit * speed
bv.Parent = Character.HumanoidRootPart
game.Debris:AddItem(bv, duration)
end

local root = Character.HumanoidRootPart


local directions = {
(cframe.LookVector + cframe.RightVector).Unit, -- Right

(cframe.LookVector + cframe.RightVector).Unit, -- Right


(cframe.LookVector - cframe.RightVector).Unit -- Left
}
-- === 4 Zig-Zag Dashes ===
for i, dir in ipairs(directions) do
applyVelocity(dir, 70, 0.25)
task.wait(0.25)
end

-- === STUN Nearby Opponents ===


local team = Character:GetAttribute("Team") or "Home"
for _, playerModel in pairs(workspace:GetChildren()) do
if playerModel:IsA("Model") and
playerModel:FindFirstChild("HumanoidRootPart") and playerModel ~= Character then
local otherHRP = playerModel.HumanoidRootPart
local distance = (otherHRP.Position -
root.Position).Magnitude
if distance <= 5 then
local otherTeam = playerModel:GetAttribute("Team")
if otherTeam and otherTeam ~= team then
create("CantMove", playerModel, 1.5)
print("🌀 Opponent stunned:", playerModel.Name)
end
end
end
end

elseif move == "Body Block" then


local ball = workspace:FindFirstChild("TestBall")
if not ball then return end

-- Play the Body Block animation


local anim =
Character.Humanoid.Animator:LoadAnimation(game.ReplicatedStorage.PlayerAnimations.K
unigami.SecondMove["Body Block"])
anim:Play()

create("Body Block", Character, 10)

-- Create the hitbox part


local hitbox = Instance.new("Part")
hitbox.Name = "BodyBlockHitbox"
hitbox.Size = Vector3.new(7, 9, 7)
hitbox.Anchored = false
hitbox.CanCollide = true
hitbox.Transparency = 0.5
hitbox.BrickColor = BrickColor.new("Bright red")
hitbox.Massless = true
hitbox.CFrame = Character.HumanoidRootPart.CFrame
hitbox.Parent = workspace

-- Weld the hitbox to the HumanoidRootPart so it follows the player


local weld = Instance.new("WeldConstraint")
weld.Part0 = Character.HumanoidRootPart
weld.Part1 = hitbox
weld.Parent = hitbox

-- Collision Group: Only collide with players


local PhysicsService = game:GetService("PhysicsService")

-- Create group for the BodyBlock hitbox


pcall(function()
PhysicsService:CreateCollisionGroup("BodyBlockHitboxGroup")
end)

-- Assign the hitbox to its group


PhysicsService:SetPartCollisionGroup(hitbox, "BodyBlockHitboxGroup")

-- Ensure the hitbox doesn't collide with default objects (like the
ball)
PhysicsService:CollisionGroupSetCollidable("BodyBlockHitboxGroup",
"Default", false)
-- Enable collision with characters (assuming they use "Players" group)
pcall(function()
PhysicsService:CreateCollisionGroup("Players")
end)
PhysicsService:CollisionGroupSetCollidable("BodyBlockHitboxGroup",
"Players", true)

-- Optional: assign all player character parts to the "Players" group


for _, player in pairs(game.Players:GetPlayers()) do
if player.Character and
player.Character:FindFirstChild("HumanoidRootPart") then
for _, part in pairs(player.Character:GetDescendants()) do
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part,
"Players")
end
end
end
end

-- Auto remove the hitbox after 7 seconds


task.delay(7, function()
if hitbox and hitbox.Parent then
hitbox:Destroy()
end
end)
end
end

return module

You might also like