-- Credits(from discord usernames)
-- Mahowaga the original person that made this script
-- Error101_s creator of the toggle button for mobile
-- SERVICES
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = [Link]
-- DODGE SETTINGS
local instinctkey = [Link].F
local instinctdetectdistance = 10
local instinctoffset = 12
local instincttime = 0.08
local instinctcooldown = 0.4
local leftdodge = "rbxassetid://29517689"
local rightdodge = "rbxassetid://29517689"
local instinctSounds = {
"rbxassetid://115523592797254",
"rbxassetid://106887649554725",
"rbxassetid://129561737395908",
"rbxassetid://75787837073401",
}
-- DODGE STATE
local dodgeEnabled = false
local canDodge = true
local character
local humanoid
local hrp
local leftTrack
local rightTrack
local dodgeSounds = {}
local currentSoundIndex = 1
-- CHARACTER SETUP
local function setupChar(char)
character = char
humanoid = char:WaitForChild("Humanoid")
hrp = char:WaitForChild("HumanoidRootPart")
canDodge = true
local leftAnim = [Link]("Animation")
[Link] = leftdodge
local rightAnim = [Link]("Animation")
[Link] = rightdodge
leftTrack = humanoid:LoadAnimation(leftAnim)
rightTrack = humanoid:LoadAnimation(rightAnim)
for _, s in ipairs(dodgeSounds) do
s:Destroy()
end
dodgeSounds = {}
currentSoundIndex = 1
for _, soundId in ipairs(instinctSounds) do
local sound = [Link]("Sound")
[Link] = soundId
[Link] = 1
[Link] = hrp
[Link](dodgeSounds, sound)
end
end
if [Link] then
setupChar([Link])
end
[Link]:Connect(setupChar)
-- F KEY TOGGLE
[Link]:Connect(function(input, gp)
if gp then return end
if [Link] == instinctkey then
dodgeEnabled = not dodgeEnabled
warn("Dodge:", dodgeEnabled and "ON" or "OFF")
end
end)
-- PARTICLE CREATION FUNCTION
local function createinstinctParticle(parent, props)
local emitter = [Link]("ParticleEmitter")
for property, value in pairs(props) do
emitter[property] = value
end
[Link] = parent
return emitter
end
-- DODGE VFX
local function emitDodgeVFX()
if not character then return end
local torso = character:FindFirstChild("UpperTorso") or
character:FindFirstChild("Torso")
local vfxAttachment = [Link]("Attachment")
[Link] = torso
[Link] = [Link](0, 0, 0)
[Link] = [Link](0, [Link](90), 0)
[Link] = [Link]:ToObjectSpace([Link]([Link]))
local emitter2 = createinstinctParticle(vfxAttachment, {
Texture = "rbxassetid://12385813444",
Color = [Link]([Link](0, 187, 255)),
Lifetime = [Link](0.2, 0.4),
Rate = 0,
Rotation = [Link](0, 360),
RotSpeed = [Link](0),
EmissionDirection = [Link],
Speed = [Link](0.00124006),
Size = [Link]({
[Link](0, 0),
[Link](0.1, 1.51474),
[Link](0.2, 2.27743),
[Link](0.3, 2.64229),
[Link](0.4, 2.82439),
[Link](0.5, 2.91763),
[Link](0.6, 2.96482),
[Link](0.7, 2.98735),
[Link](0.8, 2.99675),
[Link](0.9, 2.99964),
[Link](1, 3),
[Link](1, 3)
}),
LightEmission = 0,
Orientation = [Link],
SpreadAngle = [Link](360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 10,
ZOffset = 0,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.512055, 0.7375),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter2:Emit(1)
local emitter3 = createinstinctParticle(vfxAttachment, {
Texture = "rbxassetid://13712007548",
Color = [Link]([Link](164, 220, 255)),
Lifetime = [Link](0.2, 0.4),
Rate = 0,
Rotation = [Link](0, 360),
RotSpeed = [Link](0),
EmissionDirection = [Link],
Speed = [Link](0.00124006),
Size = [Link]({
[Link](0, 0),
[Link](0.1, 1.51474),
[Link](0.2, 2.27743),
[Link](0.3, 2.64229),
[Link](0.4, 2.82439),
[Link](0.5, 2.91763),
[Link](0.6, 2.96482),
[Link](0.7, 2.98735),
[Link](0.8, 2.99675),
[Link](0.9, 2.99964),
[Link](1, 3),
[Link](1, 3)
}),
LightEmission = 0,
Orientation = [Link],
SpreadAngle = [Link](360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 10,
ZOffset = 0,
Squash = [Link]({
[Link](0, 0.5),
[Link](1, 0.5)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.504018, 0.4),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter3:Emit(1)
local emitter4 = createinstinctParticle(vfxAttachment, {
Texture = "rbxassetid://8494150181",
Color = [Link]([Link](96, 216, 253)),
Lifetime = [Link](0.2),
Rate = 0,
Rotation = [Link](30),
RotSpeed = [Link](400),
EmissionDirection = [Link],
Speed = [Link](0.00135),
Size = [Link]({
[Link](0, 0),
[Link](0.1, 2.01965),
[Link](0.2, 3.03657),
[Link](0.3, 3.52305),
[Link](0.4, 3.76585),
[Link](0.5, 3.89017),
[Link](0.6, 3.9531),
[Link](0.7, 3.98314),
[Link](0.8, 3.99567),
[Link](0.9, 3.99952),
[Link](1, 4),
[Link](1, 4)
}),
LightEmission = 0,
Orientation = [Link],
SpreadAngle = [Link](0, 0),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 4,
ZOffset = 0,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.464983, 0.41875),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter4:Emit(1)
local emitter5 = createinstinctParticle(vfxAttachment, {
Texture = "rbxassetid://16822259518",
Color = [Link]([Link](164, 238, 255)),
Lifetime = [Link](0.2, 0.4),
Rate = 0,
Rotation = [Link](0, 400),
RotSpeed = [Link](-100, 100),
EmissionDirection = [Link],
Speed = [Link](0.1),
Size = [Link]({
[Link](0, 0),
[Link](0.1, 1.51474),
[Link](0.2, 2.27743),
[Link](0.3, 2.64229),
[Link](0.4, 2.82439),
[Link](0.5, 2.91763),
[Link](0.6, 2.96482),
[Link](0.7, 2.98735),
[Link](0.8, 2.99675),
[Link](0.9, 2.99964),
[Link](1, 3),
[Link](1, 3)
}),
LightEmission = 0,
Orientation = [Link],
SpreadAngle = [Link](360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 5,
ZOffset = 0,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 0),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter5:Emit(1)
local emitter6 = createinstinctParticle(vfxAttachment, {
Texture = "[Link]
Color = [Link]([Link](146, 230, 255)),
Lifetime = [Link](0.15, 0.2),
Rate = 0,
Rotation = [Link](-360, 360),
RotSpeed = [Link](0),
EmissionDirection = [Link],
Speed = [Link](0.001),
Size = [Link]({
[Link](0, 4.65798),
[Link](0.585366, 0),
[Link](1, 0)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](0, 0),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 5,
ZOffset = 1,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
FlipbookLayout = [Link].Grid2x2,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter6:Emit(1)
local emitter8 = createinstinctParticle(vfxAttachment, {
Texture = "rbxassetid://8700410994",
Color = [Link]([Link](176, 217, 255)),
Lifetime = [Link](0.2, 0.4),
Rate = 0,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-30, 30),
EmissionDirection = [Link],
Speed = [Link](0.01),
Size = [Link]({
[Link](0, 0),
[Link](0.225, 4),
[Link](1, 0)
}),
LightEmission = 0,
Orientation = [Link],
SpreadAngle = [Link](-360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 5,
ZOffset = -1,
Squash = [Link]({
[Link](0, -2),
[Link](1, 3)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.5, 0.3125),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter8:Emit(1)
local emitter9 = createinstinctParticle(vfxAttachment, {
Texture = "[Link]
Color = [Link]([Link](151, 245, 255)),
Lifetime = [Link](0.5),
Rate = 0,
Rotation = [Link](0, 360),
RotSpeed = [Link](0),
EmissionDirection = [Link],
Speed = [Link](20, 45),
Size = [Link]({
[Link](0, 0),
[Link](0.189702, 0.260587),
[Link](1, 0)
}),
LightEmission = 3,
Orientation = [Link],
SpreadAngle = [Link](360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 5,
ZOffset = 0,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = false
})
emitter9:Emit(1)
[Link](2, function()
if vfxAttachment then vfxAttachment:Destroy() end
end)
end
-- FACE DIRECTION FORCE
local function forceFaceDirection(directionVector, duration)
if not humanoid or not hrp then return end
[Link] = false
local lookDir = [Link](directionVector.X, 0, directionVector.Z).Unit
if [Link] == 0 then return end
[Link] = [Link]([Link], [Link] + lookDir)
[Link](duration, function()
if humanoid then
[Link] = true
end
end)
end
-- DODGE MECHANICS
local lastDodgeDirection = 1
local function dodge()
if not canDodge or not humanoid or [Link] <= 0 then return end
canDodge = false
emitDodgeVFX()
local direction = -lastDodgeDirection
lastDodgeDirection = direction
local offset = [Link] * instinctoffset * direction
local targetCFrame = [Link] + offset
local track = direction == -1 and leftTrack or rightTrack
if track then
track:Play()
end
local sound = dodgeSounds[currentSoundIndex]
if sound then
sound:Play()
currentSoundIndex += 1
if currentSoundIndex > #dodgeSounds then
currentSoundIndex = 1
end
end
local dodgeTween = TweenService:Create(
hrp,
[Link](instincttime, [Link],
[Link]),
{ CFrame = targetCFrame }
)
dodgeTween:Play()
[Link](instincttime, function()
if humanoid and hrp then
local dodgeVector = [Link] * direction
forceFaceDirection(-dodgeVector, 0.3)
if track and [Link] then
track:Stop(0)
end
end
end)
[Link](instinctcooldown, function()
canDodge = true
end)
end
-- PROJECTILE DETECTION
local partPreviousPositions = {}
[Link]:Connect(function(deltaTime)
if not dodgeEnabled or not character or not hrp then return end
local region = [Link](
[Link] - [Link](instinctdetectdistance, instinctdetectdistance,
instinctdetectdistance),
[Link] + [Link](instinctdetectdistance, instinctdetectdistance,
instinctdetectdistance)
)
local parts = workspace:FindPartsInRegion3(region, character, [Link])
for _, part in ipairs(parts) do
local prevPos = partPreviousPositions[part]
local velocity = 0
if prevPos then
local distance = ([Link] - prevPos).Magnitude
velocity = distance / deltaTime
end
partPreviousPositions[part] = [Link]
if velocity >= 9 then
dodge()
break
end
end
end)
-- CHARACTER AURA VFX SYSTEM
local activeEmitters = {}
local function createinstinctParticle2(parent, props)
local emitter = [Link]("ParticleEmitter")
for property, value in pairs(props) do
emitter[property] = value
end
[Link] = parent
return emitter
end
local function emitVFX(character)
if not character then return end
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
activeEmitters[part] = activeEmitters[part] or {}
local emitter1 = createinstinctParticle2(part, {
Texture = "[Link]
Color = [Link]([Link](48, 93, 255)),
Lifetime = [Link](1),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-50, 50),
EmissionDirection = [Link],
Speed = [Link](0.5),
Size = [Link]({
[Link](0, 0),
[Link](0.0951374, 0.0555551),
[Link](1, 0)
}),
LightEmission = 0.25,
Orientation = [Link],
SpreadAngle = [Link](-360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 15,
ZOffset = -1.5,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.499471, 0.010929),
[Link](1, 1)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
emitter1:Emit(1)
local emitter2 = createinstinctParticle2( part, {
Texture = "rbxassetid://12362600879",
Color = [Link]({
[Link](0, [Link](222, 166, 255)),
[Link](1, [Link](111, 142, 255))
}),
Lifetime = [Link](1),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-500, 500),
EmissionDirection = [Link],
Speed = [Link](0.5),
Size = [Link]({
[Link](0, 0),
[Link](0.096, 0.75),
[Link](1, 0)
}),
LightEmission = 0.25,
Orientation = [Link],
SpreadAngle = [Link](-360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 1,
ZOffset = -1.5,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.097479, 0.748634),
[Link](0.598319, 0.912568),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
emitter2: Emit(1)
local emitter3 = createinstinctParticle2( part, {
Texture = "rbxassetid://10205180639",
Color = [Link]([Link](173, 101, 255)),
Lifetime = [Link](1),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-50, 50),
EmissionDirection = [Link],
Speed = [Link](0.75),
Size = [Link]({
[Link](0, 0),
[Link](0.0930233, 0.388889),
[Link](1, 0)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](-360, 360),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 1,
ZOffset = -1,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.500529, 0),
[Link](1, 1)
}),
FlipbookLayout = [Link],
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
emitter3: Emit(1)
local emitter4 = createinstinctParticle2( part, {
Texture = "rbxassetid://17783339551",
Color = [Link]([Link](135, 105, 255)),
Lifetime = [Link](4),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-15, 15),
EmissionDirection = [Link],
Speed = [Link](0.001),
Size = [Link]({
[Link](0, 2),
[Link](0.1, 1.67885),
[Link](0.2, 1.37565),
[Link](0.3, 1.09247),
[Link](0.4, 0.83188),
[Link](0.5, 0.597074),
[Link](0.6, 0.392151),
[Link](0.7, 0.22248),
[Link](0.8, 0.0952009),
[Link](0.9, 0.0194166),
[Link](1, 0),
[Link](1, 0)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](180, 180),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 0.009999999776482582,
ZOffset = 0.800000011920929,
Squash = [Link]({
[Link](0, 0.2),
[Link](1, 0.2)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.1, 0.202798),
[Link](0.2, 0.211875),
[Link](0.3, 0.227544),
[Link](0.4, 0.250668),
[Link](0.5, 0.282744),
[Link](0.6, 0.326222),
[Link](0.7, 0.385343),
[Link](0.8, 0.468469),
[Link](0.9, 0.597283),
[Link](1, 0.99974),
[Link](1, 1)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
emitter4: Emit(1)
local emitter5 = createinstinctParticle2( part, {
Texture = "rbxassetid://16867563190",
Color = [Link]([Link](135, 105, 255)),
Lifetime = [Link](5, 6),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-15, 15),
EmissionDirection = [Link],
Speed = [Link](0.001),
Size = [Link]({
[Link](0, 0.5),
[Link](0.1, 0.580287),
[Link](0.2, 0.656088),
[Link](0.3, 0.726882),
[Link](0.4, 0.79203),
[Link](0.5, 0.850732),
[Link](0.6, 0.901962),
[Link](0.7, 0.94438),
[Link](0.8, 0.9762),
[Link](0.9, 0.995146),
[Link](1, 1)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](180, 180),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 0.009999999776482582,
ZOffset = 0.800000011920929,
Squash = [Link]({
[Link](0, 0.2),
[Link](1, 0.2)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.126321, 0.4375),
[Link](0.2, 0.211875),
[Link](0.3, 0.227544),
[Link](0.4, 0.250668),
[Link](0.5, 0.282744),
[Link](0.6, 0.326222),
[Link](0.7, 0.385343),
[Link](0.8, 0.468469),
[Link](0.9, 0.597283),
[Link](1, 0.99974),
[Link](1, 1)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
emitter5: Emit(1)
local emitter6 = createinstinctParticle2( part, {
Texture = "rbxassetid://16843373901",
Color = [Link]([Link](107, 154, 255)),
Lifetime = [Link](2.5, 3),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](0),
EmissionDirection = [Link],
Speed = [Link](0.001),
Size = [Link]({
[Link](0, 0),
[Link](0.1, 0.160575),
[Link](0.2, 0.312176),
[Link](0.3, 0.453764),
[Link](0.4, 0.58406),
[Link](0.5, 0.701463),
[Link](0.6, 0.803924),
[Link](0.7, 0.88876),
[Link](0.8, 0.9524),
[Link](0.9, 0.990292),
[Link](1, 1)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](25, 25),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 0.10000000149011612,
ZOffset = -1.2000000476837158,
Squash = [Link]({
[Link](0, 0),
[Link](1, 0)
}),
Transparency = [Link]({
[Link](0, 0),
[Link](0.1, 0.00349718),
[Link](0.2, 0.0148441),
[Link](0.3, 0.03443),
[Link](0.4, 0.0633354),
[Link](0.5, 0.10343),
[Link](0.6, 0.157778),
[Link](0.7, 0.231678),
[Link](0.8, 0.335586),
[Link](0.9, 0.496603),
[Link](1, 0.999674),
[Link](1, 1)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
emitter6: Emit(1)
local emitter7 = createinstinctParticle2( part, {
Texture = "rbxassetid://16846725471",
Color = [Link]([Link](44, 118, 255)),
Lifetime = [Link](1.5, 2.5),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-15, 15),
EmissionDirection = [Link],
Speed = [Link](0.001),
Size = [Link]({
[Link](0, 1),
[Link](0.1, 1.1124),
[Link](0.2, 1.21852),
[Link](0.3, 1.31763),
[Link](0.4, 1.40884),
[Link](0.5, 1.49102),
[Link](0.6, 1.56275),
[Link](0.7, 1.62213),
[Link](0.8, 1.66668),
[Link](0.9, 1.6932),
[Link](1, 1.7),
[Link](1, 1.7)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](25, 25),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 0.10000000149011612,
ZOffset = -1,
Squash = [Link]({
[Link](0, 0.1),
[Link](1, 0.1)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.103066, 0.75625),
[Link](0.2, 0.0148441),
[Link](0.3, 0.03443),
[Link](0.4, 0.0633354),
[Link](0.5, 0.10343),
[Link](0.6, 0.157778),
[Link](0.7, 0.231678),
[Link](0.8, 0.335586),
[Link](0.9, 0.496603),
[Link](1, 0.999674),
[Link](1, 1)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
local emitter8 = createinstinctParticle2(part, {
Texture = "rbxassetid://16846725471",
Color = [Link]([Link](137, 34, 255)),
Lifetime = [Link](1.5, 2.5),
Rate = 10,
Rotation = [Link](-360, 360),
RotSpeed = [Link](-15, 15),
EmissionDirection = [Link],
Speed = [Link](0.001),
Size = [Link]({
[Link](0, 1),
[Link](0.1, 1.1124),
[Link](0.2, 1.21852),
[Link](0.3, 1.31763),
[Link](0.4, 1.40884),
[Link](0.5, 1.49102),
[Link](0.6, 1.56275),
[Link](0.7, 1.62213),
[Link](0.8, 1.66668),
[Link](0.9, 1.6932),
[Link](1, 1.7),
[Link](1, 1.7)
}),
LightEmission = 1,
Orientation = [Link],
SpreadAngle = [Link](25, 25),
Shape = [Link],
ShapeInOut = [Link],
Brightness = 0.10000000149011612,
ZOffset = -1,
Squash = [Link]({
[Link](0, 0.1),
[Link](1, 0.1)
}),
Transparency = [Link]({
[Link](0, 1),
[Link](0.103066, 0.75625),
[Link](0.2, 0.0148441),
[Link](0.3, 0.03443),
[Link](0.4, 0.0633354),
[Link](0.5, 0.10343),
[Link](0.6, 0.157778),
[Link](0.7, 0.231678),
[Link](0.8, 0.335586),
[Link](0.9, 0.496603),
[Link](1, 0.999674),
[Link](1, 1)
}),
FlipbookLayout = [Link].Grid4x4,
FlipbookMode = [Link],
VelocityInheritance = 0,
LockedToPart = true,
Enabled = true
})
local emittersToAdd = {emitter1, emitter2, emitter3, emitter4,
emitter5, emitter6, emitter7, emitter8}
for _, e in ipairs(emittersToAdd) do
[Link](activeEmitters[part], e)
end
end
end
end
local function cleanupVFX()
for part, emitters in pairs(activeEmitters) do
for _, emitter in pairs(emitters) do
if emitter and [Link] then
emitter:Destroy()
end
end
end
activeEmitters = {}
end
local function onCharacterAdded(character)
cleanupVFX()
emitVFX(character)
end
[Link]:Connect(function(character)
character:WaitForChild("HumanoidRootPart")
cleanupVFX()
emitVFX(character)
end)
if [Link] then
[Link]:WaitForChild("HumanoidRootPart")
onCharacterAdded([Link])
end
-- UI TOGGLE BUTTON
local isAnimating = false
local pulseConnection
-- UI ROOT
local screenGui = [Link]("ScreenGui")
[Link] = "AnimatedToggleButtonUI"
[Link] = false
[Link] = player:WaitForChild("PlayerGui")
-- BUTTON CONTAINER
local buttonContainer = [Link]("Frame")
[Link] = [Link](0, 80, 0, 80)
[Link] = [Link](1, -100, 1, -180)
[Link] = [Link](0.5, 0.5)
[Link] = 1
[Link] = screenGui
-- OUTER GLOW
local outerGlow = [Link]("Frame")
[Link] = [Link](1, 20, 1, 20)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
outerGlow.BackgroundColor3 = [Link](255, 50, 50)
[Link] = 0.7
[Link] = buttonContainer
[Link]("UICorner", outerGlow).CornerRadius = [Link](1, 0)
-- PULSE RING
local pulseRing = [Link]("Frame")
[Link] = [Link](1, 0, 1, 0)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
[Link] = 1
[Link] = buttonContainer
local pulseStroke = [Link]("UIStroke")
[Link] = [Link](255, 50, 50)
[Link] = 3
[Link] = 0.5
[Link] = pulseRing
[Link]("UICorner", pulseRing).CornerRadius = [Link](1, 0)
-- MAIN BUTTON
local mainButton = [Link]("ImageButton")
[Link] = [Link](1, 0, 1, 0)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
mainButton.BackgroundColor3 = [Link](30, 30, 35)
[Link] = false
[Link] = buttonContainer
[Link]("UICorner", mainButton).CornerRadius = [Link](1, 0)
local buttonStroke = [Link]("UIStroke")
[Link] = [Link](255, 50, 50)
[Link] = 3
[Link] = mainButton
-- ICON (EYE)
local iconFrame = [Link]("Frame")
[Link] = [Link](0.6, 0, 0.6, 0)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
[Link] = 1
[Link] = mainButton
local eyeOuter = [Link]("Frame")
[Link] = [Link](1, 0, 0.5, 0)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
eyeOuter.BackgroundColor3 = [Link](255, 50, 50)
[Link] = iconFrame
[Link]("UICorner", eyeOuter).CornerRadius = [Link](1, 0)
local eyeInner = [Link]("Frame")
[Link] = [Link](0.4, 0, 0.8, 0)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
eyeInner.BackgroundColor3 = [Link](30, 30, 35)
[Link] = eyeOuter
[Link]("UICorner", eyeInner).CornerRadius = [Link](1, 0)
local eyePupil = [Link]("Frame")
[Link] = [Link](0.5, 0, 0.6, 0)
[Link] = [Link](0.5, 0, 0.5, 0)
[Link] = [Link](0.5, 0.5)
eyePupil.BackgroundColor3 = [Link](255, 50, 50)
[Link] = eyeInner
[Link]("UICorner", eyePupil).CornerRadius = [Link](1, 0)
-- STATUS TEXT
local statusText = [Link]("TextLabel")
[Link] = [Link](2, 0, 0, 20)
[Link] = [Link](0.5, 0, 1, 15)
[Link] = [Link](0.5, 0)
[Link] = 1
[Link] = dodgeEnabled and "ON" or "OFF"
[Link] = [Link]
[Link] = 14
statusText.TextColor3 = dodgeEnabled and [Link](0, 200, 255) or
[Link](255, 50, 50)
[Link] = buttonContainer
-- PULSE ANIMATION
local function startPulse()
if pulseConnection then return end
local t = 0
pulseConnection = [Link]:Connect(function(dt)
if not dodgeEnabled then return end
t += dt
local s = 1 + [Link](t * 3) * 0.1
[Link] = [Link](s, 0, s, 0)
[Link] = 0.5 + [Link](t * 3) * 0.3
end)
end
local function stopPulse()
if pulseConnection then
pulseConnection:Disconnect()
pulseConnection = nil
end
[Link] = [Link](1, 0, 1, 0)
[Link] = 0.5
end
-- TOGGLE ANIMATION
local function animateButtonToggle(state)
if isAnimating then return end
isAnimating = true
local color = state and [Link](0, 200, 255) or [Link](255, 50,
50)
TweenService:Create(mainButton, [Link](0.1), {
Size = [Link](0.85, 0, 0.85, 0)
}):Play()
[Link](0.1)
TweenService:Create(mainButton, [Link](0.25, [Link]), {
Size = [Link](1, 0, 1, 0)
}):Play()
TweenService:Create(buttonStroke, [Link](0.15), {Color = color}):Play()
TweenService:Create(outerGlow, [Link](0.15), {BackgroundColor3 =
color}):Play()
TweenService:Create(pulseStroke, [Link](0.15), {Color = color}):Play()
TweenService:Create(eyeOuter, [Link](0.15), {BackgroundColor3 =
color}):Play()
TweenService:Create(eyePupil, [Link](0.15), {BackgroundColor3 =
color}):Play()
TweenService:Create(statusText, [Link](0.15), {TextColor3 =
color}):Play()
[Link] = state and "ON" or "OFF"
if state then
startPulse()
else
stopPulse()
end
[Link](0.25)
isAnimating = false
end
-- Initialize button state
animateButtonToggle(dodgeEnabled)
-- HOVER EFFECT
[Link]:Connect(function()
TweenService:Create(buttonContainer, [Link](0.2), {
Size = [Link](0, 88, 0, 88)
}):Play()
end)
[Link]:Connect(function()
TweenService:Create(buttonContainer, [Link](0.2), {
Size = [Link](0, 80, 0, 80)
}):Play()
end)
-- CLICK - This controls the ultra instinct dodging
mainButton.MouseButton1Click:Connect(function()
dodgeEnabled = not dodgeEnabled
animateButtonToggle(dodgeEnabled)
warn("Dodge (via Button):", dodgeEnabled and "ON" or "OFF")
end)
-- Update button when F key is pressed
[Link]:Connect(function(input, gp)
if gp then return end
if [Link] == instinctkey then
[Link]()
animateButtonToggle(dodgeEnabled)
end
end)