Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- Pscale = 1.625
- local CHARACTER = script.Parent
- local CLONE = CHARACTER:Clone()
- local TORSO = CHARACTER.HumanoidRootPart
- local HED = CHARACTER.Head
- local HUMANOID = CHARACTER.Humanoid
- local CLASSIFICATION = CHARACTER.Classification.Value
- local ANIMS = script.Anims
- local ARMS = HUMANOID:LoadAnimation(ANIMS.ArmAnim)
- local ATTACKA = HUMANOID:LoadAnimation(ANIMS.Attack)
- local Minion=CHARACTER:WaitForChild("Furry"):Clone()
- CHARACTER.Furry:Destroy()
- local DEAD = false
- local Attack = false
- local TweenService = game:GetService("TweenService")
- RootPart = CHARACTER["HumanoidRootPart"]
- Torso = CHARACTER["Torso"]
- Head = CHARACTER["Head"]
- RightArm = CHARACTER["Right Arm"]
- LeftArm = CHARACTER["Left Arm"]
- RightLeg = CHARACTER["Right Leg"]
- LeftLeg = CHARACTER["Left Leg"]
- RootJoint = RootPart["RootJoint"]
- Neck = Torso["Neck"]
- RS =Torso["Right Shoulder"]
- LS =Torso["Left Shoulder"]
- RH =Torso["Right Hip"]
- LH =Torso["Left Hip"]
- local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- local NeckCF = CF(0, 1*Pscale, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- RS.C1 = CF(0, 0.5*Pscale, 0)
- LS.C1 = CF(0, 0.5*Pscale, 0)
- RH.C1 = CF(0, 1*Pscale, 0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- LH.C1 = CF(0, 1*Pscale, 0) *CFrame.Angles(math.rad(0),math.rad(0),math.rad(0))
- AnimP = 0
- AnimSpeed=0
- Anim = "Walk"
- local Tuant = Head:WaitForChild("Tuant")
- local Effects = IT("Folder",CHARACTER)
- Debris = game:GetService("Debris")
- music = CHARACTER.Sound
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = 1/60
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function PositiveAngle(NUMBER)
- if NUMBER >= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function NegativeAngle(NUMBER)
- if NUMBER <= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- --//=================================\\
- --|| FUNCTIONS
- --\\=================================//
- function CF2(X1,Y1,Z1)
- local output = CFrame.new(X1*Pscale,Y1*Pscale,Z1*Pscale)
- return output
- end
- function SetTween(SPart,CFr,MoveStyle2,outorin2,AnimTime)
- local MoveStyle = Enum.EasingStyle[MoveStyle2]
- local outorin = Enum.EasingDirection[outorin2]
- local tweeningInformation = TweenInfo.new(
- AnimTime,
- MoveStyle,
- outorin,
- 0,
- false,
- 0
- )
- local MoveCF = CFr
- local tweenanim = TweenService:Create(SPart,tweeningInformation,MoveCF)
- tweenanim:Play()
- end
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(5),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(2))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(-2))},"Quad","InOut",AnimSpeed)
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(LH,{C0=CF2(-.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
- end
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = IT("Sound")
- NEWSOUND.Parent = PARENT
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- NEWSOUND:play()
- if DOESLOOP == true then
- NEWSOUND.Looped = true
- else
- repeat wait(1) until NEWSOUND.Playing == false
- NEWSOUND:remove()
- end
- end))
- return NEWSOUND
- end
- function WACKYEFFECT(Table)
- local TYPE = (Table.EffectType or "Sphere")
- local SIZE = (Table.Size or VT(1,1,1))
- local ENDSIZE = (Table.Size2 or VT(0,0,0))
- local TRANSPARENCY = (Table.Transparency or 0)
- local ENDTRANSPARENCY = (Table.Transparency2 or 1)
- local CFRAME = (Table.CFrame or Torso.CFrame)
- local MOVEDIRECTION = (Table.MoveToPos or nil)
- local ROTATION1 = (Table.RotationX or 0)
- local ROTATION2 = (Table.RotationY or 0)
- local ROTATION3 = (Table.RotationZ or 0)
- local MATERIAL = (Table.Material or "Neon")
- local COLOR = (Table.Color or C3(1,1,1))
- local TIME = (Table.Time or 45)
- local SOUNDID = (Table.SoundID or nil)
- local SOUNDPITCH = (Table.SoundPitch or nil)
- local SOUNDVOLUME = (Table.SoundVolume or nil)
- local USEBOOMERANGMATH = (Table.UseBoomerangMath or false)
- local BOOMERANG = (Table.Boomerang or 0)
- local SIZEBOOMERANG = (Table.SizeBoomerang or 0)
- coroutine.resume(coroutine.create(function()
- local PLAYSSOUND = false
- local SOUND = nil
- local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
- if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
- PLAYSSOUND = true
- SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
- end
- EFFECT.Color = COLOR
- local MSH = nil
- if TYPE == "Sphere" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
- elseif TYPE == "Block" or TYPE == "Box" then
- MSH = IT("BlockMesh",EFFECT)
- MSH.Scale = SIZE
- elseif TYPE == "Wave" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
- elseif TYPE == "Ring" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
- elseif TYPE == "Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Round Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Swirl" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "168892432", "", SIZE, VT(0,0,0))
- elseif TYPE == "Skull" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
- elseif TYPE == "Crystal" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
- end
- if MSH ~= nil then
- local BOOMR1 = 1+BOOMERANG/50
- local BOOMR2 = 1+SIZEBOOMERANG/50
- local MOVESPEED = nil
- if MOVEDIRECTION ~= nil then
- if USEBOOMERANGMATH == true then
- MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)*BOOMR1
- else
- MOVESPEED = ((CFRAME.p - MOVEDIRECTION).Magnitude/TIME)
- end
- end
- local GROWTH = nil
- if USEBOOMERANGMATH == true then
- GROWTH = (SIZE - ENDSIZE)*(BOOMR2+1)
- else
- GROWTH = (SIZE - ENDSIZE)
- end
- local TRANS = TRANSPARENCY - ENDTRANSPARENCY
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = CFRAME
- end
- if USEBOOMERANGMATH == true then
- for LOOP = 1, TIME+1 do
- Swait()
- MSH.Scale = MSH.Scale - (VT((GROWTH.X)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Y)*((1 - (LOOP/TIME)*BOOMR2)),(GROWTH.Z)*((1 - (LOOP/TIME)*BOOMR2)))*BOOMR2)/TIME
- if TYPE == "Wave" then
- MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
- end
- EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
- end
- if MOVEDIRECTION ~= nil then
- local ORI = EFFECT.Orientation
- EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-(MOVESPEED)*((1 - (LOOP/TIME)*BOOMR1)))
- EFFECT.Orientation = ORI
- end
- end
- else
- for LOOP = 1, TIME+1 do
- Swait()
- MSH.Scale = MSH.Scale - GROWTH/TIME
- if TYPE == "Wave" then
- MSH.Offset = VT(0,0,-MSH.Scale.Z/8)
- end
- EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
- end
- if MOVEDIRECTION ~= nil then
- local ORI = EFFECT.Orientation
- EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
- EFFECT.Orientation = ORI
- end
- end
- end
- EFFECT.Transparency = 1
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
- EFFECT:remove()
- end
- else
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until EFFECT:FindFirstChildOfClass("Sound") == nil
- EFFECT:remove()
- end
- end
- end))
- end
- wait()
- function Clerp(a, b, t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- function GatherAllInstances(Parent,ig)
- local Instances = {}
- local Ignore=nil
- if ig ~= nil then
- Ignore = ig
- end
- local function GatherInstances(Parent,Ignore)
- for i, v in pairs(Parent:GetChildren()) do
- if v ~= Ignore then
- GatherInstances(v,Ignore)
- table.insert(Instances, v) end
- end
- end
- GatherInstances(Parent,Ignore)
- return Instances
- end
- function infect(Char)
- Char.Archivable=true
- local Cloneed=Char:Clone()
- local RealPar = Char.Parent
- --Char.Parent = nil
- Char:BreakJoints()
- for _,v3 in pairs(Char:GetChildren()) do
- coroutine.resume(coroutine.create(function()
- if v3:IsA("Humanoid") then
- else
- v3:Destroy()
- end
- end))
- end
- CHARACTER.Classification:Clone().Parent=Cloneed
- Char =Cloneed
- Char.Parent = RealPar
- local hum = Char:FindFirstChildOfClass("Humanoid")
- hum.PlatformStand = true
- local rval = math.random(1,4)
- local TORSO2 = Char:FindFirstChild("Torso") or Char:FindFirstChild("UpperTorso")
- if rval == 1 then
- local SOUND = CreateSound(1835338424, TORSO2, 2.5, 1, false)
- elseif rval == 2 then
- local SOUND = CreateSound(130801781, TORSO2, 2.5, 1, false)
- elseif rval == 3 then
- local SOUND = CreateSound(402192395, TORSO2, 2.5, 1, false)
- elseif rval == 4 then
- local SOUND = CreateSound(727068345, TORSO2, 2.5, 1, false)
- end
- coroutine.resume(coroutine.create(function()
- wait(4)
- if hum.Health >0.001 then
- local Zombie = Minion:Clone()
- local infect2 = Minion:Clone()
- infect2.Parent = Zombie
- Zombie.AI.Disabled = false
- TORSO2 = Char:FindFirstChild("Torso") or Char:FindFirstChild("UpperTorso")
- for i, v3 in pairs(GatherAllInstances(Char)) do
- if v3:isA("Accessory") then
- v3.Parent = Zombie
- end
- if v3:isA("Hat") then
- v3.Parent = Zombie
- end
- if v3:isA("CharacterMesh") then
- v3.Parent = Zombie
- end
- if v3:isA("Decal") and v3.Parent.Name == "Head" then
- v3.Parent = Zombie.Head
- end
- end
- Zombie.Parent = Char.Parent
- Zombie.Torso.CFrame = TORSO2.CFrame
- Char:Destroy()
- else
- Char:Destroy()
- end
- end))
- end
- function ApplyDamage(Humanoid,Damage)
- Damage = Damage * 1
- local SOUND = CreateSound(610359515, RightArm, 1.0, 1.5, false)
- if game.Players:FindFirstChild(Humanoid.Parent.Name) then
- local PLR = game.Players:FindFirstChild(Humanoid.Parent.Name)
- local GUI = script.BloodGui:Clone()
- GUI.Parent = PLR.PlayerGui
- GUI.Scrip.Disabled = false
- end
- if Humanoid.Health - Damage < 0.000001 then
- --Tuant:Play()
- local Zombie = Humanoid.Parent
- Humanoid.PlatformStand = true
- infect(Zombie)
- end
- if Humanoid.Health ~= 0 then
- Humanoid.Health = Humanoid.Health - Damage
- end
- end
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- --//=================================\\
- --|| ATRIFICIAL INTELLIGENCE
- --\\=================================//
- function Attack1()
- local POS = TORSO.CFrame * CF(0,0,-12*Pscale)
- local HIT = false
- Attack = true
- AnimSpeed=.15
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(170),math.rad(0),math.rad(20))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(50),math.rad(0),math.rad(-20))},"Quad","InOut",AnimSpeed) --]]
- for i = 1, 5 do
- Swait()
- TORSO.CFrame = TORSO.CFrame * CF(0,0,(5-i)/10)
- end
- --ATTACKA:Play()
- --ATTACKA:AdjustSpeed(2.5)
- wait(0.1)
- AnimSpeed =.3
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(10),math.rad(0),math.rad(20))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(30),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.25,.5,-.1)*ANGLES(math.rad(60),math.rad(0),math.rad(-25))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.35,.6,-.0)*ANGLES(math.rad(-20),math.rad(0),math.rad(-25))},"Quad","InOut",AnimSpeed) --]]
- local SOUND = CreateSound(305734380, RightArm, 1.5, 1.0, false)
- for i = 1, 12 do
- if DEAD == true then
- break
- end
- RightArm.Flame:Emit(10)
- RightArm.Sparks:Emit(5)
- TORSO.CFrame = Clerp(TORSO.CFrame,POS,0.1)
- for index, CHILD in pairs(workspace:GetDescendants()) do
- local Pass = false
- if CHILD:FindFirstChild("Classification") and CHILD:FindFirstChild("Classification").Value == CLASSIFICATION then
- Pass=true
- end
- if CHILD.ClassName == "Model" and CHILD ~= CHARACTER and Pass == false then
- local HUM = CHILD:FindFirstChildOfClass("Humanoid")
- if HUM then
- local TORSO2 = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
- if TORSO2 then
- if (TORSO2.Position - TORSO.CFrame*CF(0,0,-1).p).Magnitude <= 3*Pscale then
- local DMG = MRANDOM(35,45)
- ApplyDamage(HUM,DMG)
- HIT = true
- end
- end
- end
- end
- end
- if HIT == true then
- break
- end
- Swait()
- end
- wait(.5)
- Attack = false
- end
- function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
- for index, CHILD in pairs(workspace:GetDescendants()) do
- if CHILD.ClassName == "Model" and CHILD ~= CHARACTER then
- local HUM = CHILD:FindFirstChildOfClass("Humanoid")
- local Pass=false
- if CHILD:FindFirstChild("Classification") and CHILD:FindFirstChild("Classification").Value == CLASSIFICATION then
- Pass=true
- end
- if HUM and Pass == false then
- local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
- if TORSO then
- if (TORSO.Position - POSITION).Magnitude <= RANGE then
- if INSTAKILL == true then
- CHILD:BreakJoints()
- else
- local DMG = MRANDOM(MINDMG,MAXDMG)
- ApplyDamage(HUM,DMG)
- end
- if FLING > 0 then
- for _, c in pairs(CHILD:GetChildren()) do
- if c:IsA("BasePart") then
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
- bv.Parent = c
- Debris:AddItem(bv,0.05)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- function Attack2()
- Attack = true
- local POS = TORSO.CFrame * CF(0,0,-6)
- local HIT = false
- for i = 1, 5 do
- Swait()
- TORSO.CFrame = TORSO.CFrame * CF(0,0,(5-i)/10)
- end
- AnimSpeed =.3
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(10),math.rad(0),math.rad(-20))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(30),math.rad(0),math.rad(20))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.25,.5,-.1)*ANGLES(math.rad(60),math.rad(0),math.rad(-25))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.35,.6,-.0)*ANGLES(math.rad(-20),math.rad(0),math.rad(-25))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- local RPP = RootPart.Position
- local lookv= RootPart.CFrame.lookVector
- coroutine.resume(coroutine.create(function()
- for i = 1,10,1 do
- local attackP = RPP+lookv*i*6
- local attackCF = CF(attackP,attackP+lookv*1)
- WACKYEFFECT({Time = 30,EffectType = "Sphere", Size = VT(2,0,10), Size2 = VT(2,60,10), Transparency = .5, Transparency2 = 1, CFrame = attackCF*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,.5), SoundID = 1452071798, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 1.25})
- WACKYEFFECT({Time = 20,EffectType = "Wave", Size = VT(0,0,10), Size2 = VT(2,60,10), Transparency = 0.8, Transparency2 = 1, CFrame = attackCF*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 1, RotationY = 0, RotationZ = math.random(-10,10)/10, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- ApplyAoE(attackP,6,3,5,12,false)
- Swait(5)
- end
- end))
- AnimSpeed =.3
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(-10),math.rad(0),math.rad(20))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(-30),math.rad(0),math.rad(-20))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,-.1)*ANGLES(math.rad(160),math.rad(0),math.rad(-0))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.35,.6,-.0)*ANGLES(math.rad(-0),math.rad(0),math.rad(-25))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- Attack = false
- end
- function Attack3()
- Attack = true
- local POS = TORSO.CFrame * CF(0,0,-6)
- local HIT = false
- for i = 1, 5 do
- Swait()
- TORSO.CFrame = TORSO.CFrame * CF(0,0,(5-i)/10)
- end
- AnimSpeed =.3
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(10),math.rad(0),math.rad(-0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(30),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,-.0)*ANGLES(math.rad(-20),math.rad(0),math.rad(-0))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,-.0)*ANGLES(math.rad(-20),math.rad(0),math.rad(-0))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- local RPP = RootPart.Position
- local lookv= RootPart.CFrame.lookVector
- local attackP = RPP+lookv*6
- local attackCF = CF(attackP,attackP+lookv*1)
- WACKYEFFECT({Time = 30,EffectType = "Sphere", Size = VT(5,0,5), Size2 = VT(200,1,200), Transparency = .5, Transparency2 = 1, CFrame = attackCF*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,.5), SoundID = 1452071798, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 2})
- WACKYEFFECT({Time = 30,EffectType = "Wave", Size = VT(20,0,20), Size2 = VT(200,10,200), Transparency = 0.8, Transparency2 = 1, CFrame = attackCF*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 0, RotationY = 10, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- coroutine.resume(coroutine.create(function()
- for i = 0,20 do Swait()
- coroutine.resume(coroutine.create(function()
- local BlastPos = attackCF*CF(math.random(-50,50),0,math.random(-50,50))
- WACKYEFFECT({Time = 20,EffectType = "Sphere", Size = VT(10,1,10), Size2 = VT(0,1,0), Transparency = .5, Transparency2 = 1, CFrame = BlastPos*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = 588738949, SoundPitch = 1, SoundVolume = 2})
- wait(1)
- WACKYEFFECT({Time = 40,EffectType = "Sphere", Size = VT(5,0,5), Size2 = VT(10,60,10), Transparency = .5, Transparency2 = 1, CFrame = BlastPos*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,0,.5), SoundID = 610359590, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 1.5})
- WACKYEFFECT({Time = 30,EffectType = "Wave", Size = VT(20,0,20), Size2 = VT(10,10,10), Transparency = 0.8, Transparency2 = 1, CFrame = BlastPos*CF(0,-2.5*Pscale,0), MoveToPos = nil, RotationX = 0, RotationY = 2, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- ApplyAoE(BlastPos.p,10,13,15,32,false)
- end))
- end
- end))
- AnimSpeed =1
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(-10),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(-30),math.rad(0),math.rad(-0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.25,.5,-.1)*ANGLES(math.rad(150),math.rad(0),math.rad(-25))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.25,.5,-.1)*ANGLES(math.rad(150),math.rad(0),math.rad(25))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- AnimSpeed =.25
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(-0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,-.0)*ANGLES(math.rad(90),math.rad(0),math.rad(90))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,-.0)*ANGLES(math.rad(90),math.rad(0),math.rad(-90))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- Attack = false
- wait(AnimSpeed)
- end
- function intro()
- Attack = true
- coroutine.resume(coroutine.create(function()
- local SCRIPTS = {}
- for index, CHILD in pairs(game.Players:GetChildren()) do
- local SCRIPT = script.Cutscene:Clone()
- SCRIPT.Parent = CHILD.PlayerGui
- SCRIPT.Disabled = false
- script.AttachPart:Clone().Parent = SCRIPT
- script.TestFor:Clone().Parent = SCRIPT
- script.Dist:Clone().Parent = SCRIPT
- table.insert(SCRIPTS,SCRIPT)
- end
- for E = 1, #SCRIPTS do
- SCRIPTS[E].Dist.Value = 13.5
- end
- wait(1)
- for i = 15,25,0.1 do
- for E = 1, #SCRIPTS do
- SCRIPTS[E].Dist.Value = i
- end
- Swait()
- end
- wait(.1)
- CHARACTER.FixValue.Value = true
- for E = 1, #SCRIPTS do
- Debris:AddItem(SCRIPTS[E],12)
- end
- wait(.1)
- CHARACTER.FixValue.Value = false
- end))
- AnimSpeed=1.5/2
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(40),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(90),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed) --]]
- local SOUND = CreateSound(907329532, Torso, 1.5, 1.2, false)
- wait(AnimSpeed)
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(20),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(90),math.rad(0),math.rad(90))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(50),math.rad(0),math.rad(20))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed) --]]
- wait(AnimSpeed)
- music:Play()
- Attack = false
- end
- --//=================================\\
- --|| WRAP
- --\\=================================//
- wait(.5)
- intro()
- function BEGINAI()
- if CHARACTER.Zombie.Value == true then
- ARMS:Play()
- end
- HUMANOID.Died:Connect(function()
- DEAD = true
- for index, CHILD in pairs(CHARACTER:GetDescendants()) do
- if CHILD:IsA("BasePart") then
- CHILD.Anchored = true
- coroutine.resume(coroutine.create(function()
- wait(math.random(100,150)/1000)
- WACKYEFFECT({Time = 65,EffectType = "Box", Size = CHILD.Size*1.1, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CHILD.CFrame, MoveToPos = CHILD.CFrame.p+VT(math.random(-5,5),math.random(-5,5),math.random(-5,5)), RotationX = math.random(-50,50)/100, RotationY = math.random(-50,50)/100, RotationZ = math.random(-50,50)/100, Material = "Neon", Color = C3(1,.5,0), SoundID = nil, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 2})
- WACKYEFFECT({Time = 65,EffectType = "Box", Size = CHILD.Size*1.1, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CHILD.CFrame, MoveToPos = CHILD.CFrame.p+VT(math.random(-5,5),math.random(-5,5),math.random(-5,5)), RotationX = math.random(-50,50)/100, RotationY = math.random(-50,50)/100, RotationZ = math.random(-50,50)/100, Material = "Neon", Color = C3(1,.5,0), SoundID = nil, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 2})
- WACKYEFFECT({Time = 65,EffectType = "Box", Size = CHILD.Size*1.1, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CHILD.CFrame, MoveToPos = CHILD.CFrame.p+VT(math.random(-5,5),math.random(-5,5),math.random(-5,5)), RotationX = math.random(-50,50)/100, RotationY = math.random(-50,50)/100, RotationZ = math.random(-50,50)/100, Material = "Neon", Color = C3(1,.5,0), SoundID = nil, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 2})
- WACKYEFFECT({Time = 65,EffectType = "Box", Size = CHILD.Size*1.1, Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CHILD.CFrame, MoveToPos = CHILD.CFrame.p+VT(math.random(-5,5),math.random(-5,5),math.random(-5,5)), RotationX = math.random(-50,50)/100, RotationY = math.random(-50,50)/100, RotationZ = math.random(-50,50)/100, Material = "Neon", Color = C3(1,.5,0), SoundID = nil, SoundPitch = MRANDOM(18,22)/10, SoundVolume = 2})
- CHILD:Destroy()
- end))
- end
- end
- print("Dead")
- coroutine.resume(coroutine.create(function()
- if music.Parent == CHARACTER then
- while music.Volume > 0.001 do
- music.Volume = music.Volume -0.1
- wait()
- end
- music:Stop()
- end
- end))
- local SOUND = CreateSound(260434750, workspace, 1.5, 1, false)
- Debris:AddItem(CHARACTER,15)
- end)
- while true do
- if DEAD == true then
- break
- end
- local TARGETVARIANTS = {}
- local TARGET = nil
- for index, CHILD in pairs(workspace:GetChildren()) do
- local HUMAN = CHILD:FindFirstChildOfClass("Humanoid")
- if HUMAN then
- if HUMAN.Health > 0 then
- if HUMAN.Torso then
- local PASS = true
- if CHILD:FindFirstChild("Classification") then
- if CHILD:FindFirstChild("Classification").Value == CLASSIFICATION then
- PASS = false
- end
- end
- if PASS == true then
- local DISTANCE = (HUMAN.Torso.Position - HED.Position).Magnitude
- table.insert(TARGETVARIANTS,{CHILD,DISTANCE})
- end
- end
- end
- end
- end
- local DIST = 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999
- for E = 1, #TARGETVARIANTS do
- local PLAYER = TARGETVARIANTS[E]
- local CHARACTER = PLAYER[1]
- local DISTANCE = PLAYER[2]
- if DISTANCE < DIST then
- DIST = DISTANCE
- TARGET = CHARACTER
- end
- end
- if TARGET and TARGET:FindFirstChildOfClass("Humanoid") then
- local HUM = TARGET:FindFirstChildOfClass("Humanoid")
- local ROOT = HUM.Torso
- if ROOT then
- if DIST < 8*Pscale then
- HUMANOID:MoveTo(TORSO.Position)
- local POS = VT(ROOT.Position.X,TORSO.Position.Y,ROOT.Position.Z)
- TORSO.CFrame = Clerp(TORSO.CFrame,CF(TORSO.Position,POS),0.3)
- local Cattack = MRANDOM(1,4)
- if MRANDOM(1,5) == 1 then
- if Cattack == 1 then
- Attack1()
- elseif Cattack == 2 then
- Attack2()
- elseif Cattack == 3 then
- Attack3()
- elseif Cattack == 4 then
- -- Attack4()
- elseif Cattack == 5 then
- end
- end
- else
- HUMANOID:MoveTo(ROOT.Position)
- end
- end
- end
- wait()
- end
- end
- coroutine.resume(coroutine.create(function()
- BEGINAI() end))
- while DEAD == false do
- AnimP = AnimP +1
- if AnimP > 4 then
- AnimP=1
- end
- hitfloor = Raycast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4*Pscale, CHARACTER)
- local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local velderp = RootPart.Velocity.y
- inairvel=torvel
- if inairvel > 30 then
- inairvel=30
- end
- inairvel=inairvel/50
- if RootPart.Velocity.y > 1 and hitfloor == nil then
- Anim = "Jump"
- elseif RootPart.Velocity.y < -1 and hitfloor == nil then
- Anim = "Fall"
- elseif HUMANOID.Sit == true then
- Anim = "Sit"
- elseif torvel < 1 and hitfloor ~= nil then
- Anim = "Idle"
- elseif torvel > 2 and hitfloor ~= nil then
- Anim = "Walk"
- else
- Anim = ""
- end
- if Attack == false then
- AnimSpeed=.5
- if Anim == "Idle" then
- AnimSpeed=.4
- if AnimP == 1 then
- elseif AnimP == 2 then
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(5),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(2))},"Quad","InOut",AnimSpeed*2)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(-2))},"Quad","InOut",AnimSpeed*2)
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- SetTween(LH,{C0=CF2(-.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- elseif AnimP == 3 then
- elseif AnimP == 4 then
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(2),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(2),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- SetTween(LH,{C0=CF2(-.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed*2)
- end
- end
- if Anim == "Walk" then
- if AnimP == 1 then
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(5),math.rad(0),math.rad(10))},"Linear","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(-5),math.rad(0),math.rad(-10))},"Linear","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(70),math.rad(0),math.rad(5))},"Linear","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(30),math.rad(0),math.rad(5))},"Linear","InOut",AnimSpeed)
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,0)*ANGLES(math.rad(30),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(LH,{C0=CF2(-.5,-1,-.3)*ANGLES(math.rad(-50),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- elseif AnimP == 2 then
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(60),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,0)*ANGLES(math.rad(-30),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(LH,{C0=CF2(-.5,-.5,-.2)*ANGLES(math.rad(-20),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- elseif AnimP == 3 then
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(5),math.rad(0),math.rad(-10))},"Linear","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(-5),math.rad(0),math.rad(10))},"Linear","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(70),math.rad(0),math.rad(-5))},"Linear","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(-30),math.rad(0),math.rad(-5))},"Linear","InOut",AnimSpeed)
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,-.3)*ANGLES(math.rad(-50),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(LH,{C0=CF2(-.5,-1,0)*ANGLES(math.rad(30),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- elseif AnimP == 4 then
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(Neck,{C0=NeckCF*CF2(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF2(1.5,.5,0)*ANGLES(math.rad(60),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(LS,{C0=CF2(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- --Legs
- SetTween(RH,{C0=CF2(.5,-.5,-.2)*ANGLES(math.rad(-20),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- SetTween(LH,{C0=CF2(-.5,-1,0)*ANGLES(math.rad(-30),math.rad(0),math.rad(0))},"Linear","InOut",AnimSpeed)
- end
- end
- else
- --[[
- ----------------------------------------------------------------------------------------------------------------
- SetTween(RootJoint,{C0= RootCF*CF(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=NeckCF*CF(0,0,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- --Arms
- SetTween(RS,{C0=CF(1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(LS,{C0=CF(-1.5,.5,0)*ANGLES(math.rad(0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed) --]]
- --Legs
- SetTween(RH,{C0=CF2(.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- SetTween(LH,{C0=CF2(-.5,-1,0)*ANGLES(math.rad(-0),math.rad(0),math.rad(0))},"Quad","InOut",AnimSpeed)
- end
- wait(AnimSpeed)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement