Keep in mind im not inserting a sound in workspace i want to do it through a script.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
enabled = false
local animation = Instance.new("Animation",script)
animation.AnimationId = "http://www.roblox.com/asset/?id=01311925674t"
local animation2 = Instance.new("Animation",script)
animation2.AnimationId = "http://www.roblox.com/asset/?id=903173770"
mouse.KeyDown:connect(function(key)
if key == "z" and enabled == false then --turns on
enabled = true
local UI = player.Character.Humanoid:LoadAnimation(animation)
UI:Play()
wait(3)--However long your animation is basically
local SSJParticle = game.ReplicatedStorage.Particles.UI:Clone()
SSJParticle.Parent = player.Character.HumanoidRootPart
local SSJHair = game.ReplicatedStorage.Hairs.UI:Clone()
SSJHair.Parent = player.Character
SSJHair.CFrame = player.Character.HumanoidRootPart.CFrame
local Weld = Instance.new("Weld")
Weld.Name = "UI"
Weld.Parent = player.Character.Head
Weld.Part0 = player.Character.Head
Weld.Part1 = SSJHair
Weld.C0 = CFrame.new(0, .9, 0.11) * CFrame.Angles(0,math.pi,0)
player.Character.Humanoid.MaxHealth = 50000
player.Character.Humanoid.Health = 50000
player.Character.Humanoid.WalkSpeed = 80
else if key == "z" and enabled then-- turns off.
local SSJ2 = player.Character.Humanoid:LoadAnimation(animation2)
SSJ2:Play()
player.Character.Humanoid.WalkSpeed = 16
player.Character.Humanoid.MaxHealth = 200
player.Character.Humanoid.Health = 200
wait(1)
enabled = false
end
end
end)

2 comments
"Players.Exarlus.PlayerGui.Ultra Instinct:15: '=' expected near 'enabled'"
I apologize about that. Try it now.