Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = game.Players.LocalPlayer
- local char = p.Character
- local mouse = p:GetMouse()
- local larm = char["Left Arm"]
- local rarm = char["Right Arm"]
- local lleg = char["Left Leg"]
- local rleg = char["Right Leg"]
- local hed = char.Head
- local Torso = char.Torso
- local hum = char.Humanoid
- local cam = game.Workspace.CurrentCamera
- local root = char.HumanoidRootPart
- local deb = false
- local shot = 0
- local potential = false
- local debris=game:service"Debris"
- local l = game:GetService("Lighting")
- local rs = game:GetService("RunService").RenderStepped
- ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
- math.randomseed(os.time())
- for i,v in pairs(char:children()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- char["Body Colors"].HeadColor = BrickColor.new("White")
- char["Body Colors"].LeftArmColor = BrickColor.new("White")
- char["Body Colors"].RightArmColor = BrickColor.new("White")
- char["Body Colors"].TorsoColor = BrickColor.new("White")
- char["Body Colors"].RightLegColor = BrickColor.new("White")
- char["Body Colors"].LeftLegColor = BrickColor.new("White")
- Player=game:GetService("Players").LocalPlayer
- Character=Player.Character
- PlayerGui=Player.PlayerGui
- Backpack=Player.Backpack
- Torso=Character.Torso
- Head=Character.Head
- Humanoid=Character.Humanoid
- Mouse=Player:GetMouse()
- RootPart = Character.HumanoidRootPart
- RootJoint = RootPart.RootJoint
- LeftArm=Character["Left Arm"]
- LeftLeg=Character["Left Leg"]
- RightArm=Character["Right Arm"]
- RightLeg=Character["Right Leg"]
- LS=Torso["Left Shoulder"]
- LH=Torso["Left Hip"]
- RS=Torso["Right Shoulder"]
- RH=Torso["Right Hip"]
- Neck=Torso.Neck
- it=Instance.new
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- local decreaseatk=0
- local decreasedef=0
- local decreasemvmt=0
- local Anim="Idle"
- local Effects={}
- local armorparts={}
- local armorwelds={}
- local weaponparts={}
- local weaponwelds={}
- local necko=euler(0,0,0)*cf(0,1,0)
- local attack=false
- local jump=false
- local start=false
- local move=10
- local hitfloor,posfloor=nil,nil
- local run=Instance.new("NumberValue")
- run.Name="DecreaseMvmt"
- run.Value=-1.2
- local bName="Sthomas"
- local MainColor=BrickColor.new("Really black")
- local SubColor=BrickColor.new("Really black")
- --[[if script:findFirstChild("SiegmundHealth")~=nil then
- for _,c in pairs(game.Players:children()) do
- d=script.SiegmundHealth:Clone()
- d.Parent=c.PlayerGui
- end
- end]]
- function NoOutline(Part)
- Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
- end
- Character.Animate:Remove()
- Character.Humanoid.Animator:Remove()
- local Create = LoadLibrary("RbxUtility").Create
- ArtificialHB = Create("BindableEvent", script){
- Parent = script,
- Name = "Heartbeat",
- }
- script:WaitForChild("Heartbeat")
- frame = 1 / 30
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- --[[frame,t,lastframe = 1/30,0,tick()
- allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
- tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
- swait = function(dt)
- if dt == nil then
- dt = frame
- elseif dt < frame then
- dt = frame
- elseif dt > frame then
- --round this out into frames
- dt = math.floor(dt/frame)
- end
- local timetomeet = tick() + dt
- end]] --maybe later
- --30hz Pacemaker
- script:WaitForChild("Heartbeat")
- frame = 1/30
- tf = 0
- allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
- tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
- lastframe = tick()
- script.Heartbeat:Fire() --ayy lmao
- game:GetService("RunService").Heartbeat:connect(function(s,p) --herp derp
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe=tick()
- else
- --print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame*(math.floor(t/frame))))
- for i=1, math.floor(tf/frame) do
- script.Heartbeat:Fire()
- end
- lastframe=tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf/frame)
- end
- end
- end)
- 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 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 = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.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 part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
- local fp=it("Part")
- fp.formFactor=formfactor
- fp.Parent=parent
- fp.Reflectance=reflectance
- fp.Transparency=transparency
- fp.CanCollide=false
- fp.Locked=true
- fp.BrickColor=brickcolor
- fp.Name=name
- fp.Size=size
- NoOutline(fp)
- fp.Material="SmoothPlastic"
- fp:BreakJoints()
- return fp
- end
- function mesh(Mesh,part,meshtype,meshid,offset,scale)
- local mesh=it(Mesh)
- mesh.Parent=part
- if Mesh=="SpecialMesh" then
- mesh.MeshType=meshtype
- if meshid~="nil" then
- mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
- end
- end
- mesh.Offset=offset
- mesh.Scale=scale
- return mesh
- end
- function weld(parent,part0,part1,c0)
- local weld=it("Motor")
- weld.Parent=parent
- weld.Part0=part0
- weld.Part1=part1
- weld.C0=c0
- return weld
- end
- function gui(GuiType,parent,text,backtrans,backcol,pos,size,image)
- local gui=it(GuiType)
- gui.Parent=parent
- gui.BackgroundTransparency=backtrans
- gui.BackgroundColor3=backcol
- gui.SizeConstraint="RelativeXY"
- gui.Position=pos
- gui.Size=size
- if GuiType=="TextLabel" then
- gui.Text=text
- gui.TextXAlignment="Center"
- gui.TextYAlignment="Center"
- gui.Font="SourceSans"
- gui.FontSize="Size14"
- gui.TextWrapped=false
- gui.TextStrokeTransparency=0
- gui.TextColor=BrickColor.new("White")
- elseif GuiType=="ImageLabel" then
- gui.Image="rbxassetid://"..image
- gui.ImageColor3=backcol
- end
- return gui
- end
- local Characte=Instance.new("Model")
- Characte.Parent=Character
- Characte.Name=bName
- --local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
- local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
- --local LeftArm=part(0,Character,0,0,MainColor,"Left Arm",vt(1,2,1))
- local LeftArmc=part(0,Character,0,0,SubColor,"Left Arm Copy",vt(1,2,1))
- --local RightArm=part(0,Character,0,0,MainColor,"Right Arm",vt(1,2,1))
- local RightArmc=part(0,Character,0,0,SubColor,"Right Arm Copy",vt(1,2,1))
- --local LeftLeg=part(0,Character,0,0,MainColor,"Left Leg",vt(1,2,1))
- local LeftLegc=part(0,Character,0,0,SubColor,"Left Leg Copy",vt(1,2,1))
- --local RightLeg=part(0,Character,0,0,MainColor,"Right Leg",vt(1,2,1))
- local RightLegc=part(0,Character,0,0,SubColor,"Right Leg Copy",vt(1,2,1))
- --local Head=part(0,Character,0,0,BrickColor.new("Pastel brown"),"Head",vt(2,1,1))
- --[[local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
- local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
- local LeftArm=part(0,Character,0,0,SubColor,"Left Arm",vt(1,2,1))
- local LeftArmc=part(0,Character,0,0,MainColor,"Left Arm Copy",vt(1,2,1))
- local RightArm=part(0,Character,0,0,SubColor,"Right Arm",vt(1,2,1))
- local RightArmc=part(0,Character,0,0,MainColor,"Right Arm Copy",vt(1,2,1))
- local LeftLeg=part(0,Character,0,0,SubColor,"Left Leg",vt(1,2,1))
- local LeftLegc=part(0,Character,0,0,MainColor,"Left Leg Copy",vt(1,2,1))
- local RightLeg=part(0,Character,0,0,SubColor,"Right Leg",vt(1,2,1))
- local RightLegc=part(0,Character,0,0,MainColor,"Right Leg Copy",vt(1,2,1))]]
- --local RootPart=part(0,Character,0,1,MainColor,"HumanoidRootPart",vt(2,2,1))
- local Cape=part(0,Character,0,0,BrickColor.new("White"),"Hat",vt())
- Head.CanCollide=true
- Torso.CanCollide=true
- LeftArm.CanCollide=true
- RightArm.CanCollide=true
- LeftLeg.CanCollide=true
- RightLeg.CanCollide=true
- RootPart.CanCollide=false
- Head.face:Remove()
- face=Instance.new("Decal",Head)
- face.Face="Front"
- --face.Texture="http://www.roblox.com/asset/?id="
- face.Texture="http://www.roblox.com/asset/?id="
- local HMesh=mesh("SpecialMesh",Head,"Head","nil",vt(0,0,0),vt(1.25,1.25,1.25))
- local TMsh=mesh("SpecialMesh",Torso,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(1.8,1,.8))
- local LAMsh=mesh("SpecialMesh",LeftArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
- local RAMsh=mesh("SpecialMesh",RightArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
- local LLMsh=mesh("SpecialMesh",LeftLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
- local RLMsh=mesh("SpecialMesh",RightLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
- local TcMsh=mesh("SpecialMesh",Torsoc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-2,-1,-1))
- local LAcMsh=mesh("SpecialMesh",LeftArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
- local RAcMsh=mesh("SpecialMesh",RightArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
- local LLcMsh=mesh("SpecialMesh",LeftLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
- local RLcMsh=mesh("SpecialMesh",RightLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
- TMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- TcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- local Cmsh=mesh("SpecialMesh",Cape,"FileMesh","http://www.roblox.com/asset/?id=250281794",vt(0,0,0),vt(1,1,1))
- --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
- Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]]
- local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,1,0))
- Neck.C1=cf(0,-.5,0)
- local RW=weld(Torso,Torso,RightArm,cf(1.5,.5,0))
- RW.C1=cf(0,.5,0)
- local RWc=weld(Torso,RightArm,RightArmc,cf(0,0,0))
- local LW=weld(Torso,Torso,LeftArm,cf(-1.5,.5,0))
- LW.C1=cf(0,.5,0)
- local LWc=weld(Torso,LeftArm,LeftArmc,cf(0,0,0))
- local RH=weld(Torso,Torso,RightLeg,cf(.5,-1,0))
- RH.C1=cf(0,1,0)
- local RHc=weld(Torso,RightLeg,RightLegc,cf(0,0,0))
- local LH=weld(Torso,Torso,LeftLeg,cf(-.5,-1,0))
- LH.C1=cf(0,1,0)
- local LHc=weld(Torso,LeftLeg,LeftLegc,cf(0,0,0))
- local RootJoint=weld(Torso,Torso,RootPart,cf(0,0,0))
- local RootJointc=weld(Torso,Torso,Torsoc,cf(0,0,0))
- --local Cwld=weld(Torso,Cape,Head,euler(0,0,0)*cf(0,2,-.3))
- local Cwld=weld(Torso,Cape,Torso,euler(0,0,0)*cf(0,.5,-.3))
- --Torso.CFrame=cf(math.random(-5000,5000)/100,math.random(-5000,5000)/100,math.random(-5000,5000)/100)
- --Torso.CFrame=cf(0,0,0)
- --Torso.CFrame=workspace.Map.BossSpawn.CFrame*cf(0,5,0)
- local hitbox=part(3,nil,0,1,BrickColor.new("White"),"Hitbox",vt(1,1,1))
- --hitbox.Anchored=true
- local hitbox2=part(3,nil,0,1,BrickColor.new("White"),"Hitbox",vt(1,1,1))
- hitbox2.Anchored=true
- local hitboxCF=cf(0,0,0)
- --[[local Humanoid=Instance.new("Humanoid")
- Humanoid.Parent=Character
- TehHealth=700
- --TehHealth=2000
- Humanoid.MaxHealth=TehHealth
- Humanoid.Health=TehHealth
- coroutine.resume(coroutine.create(function()
- for i=1,20 do
- wait()
- Humanoid.Health=Humanoid.MaxHealth
- end
- Humanoid:TakeDamage(1)
- end))]]
- local Stats=Instance.new("BoolValue")
- Stats.Name="Stats"
- Stats.Parent=Character
- local Atk=Instance.new("NumberValue")
- Atk.Name="Damage"
- Atk.Parent=Stats
- Atk.Value=1
- local Def=Instance.new("NumberValue")
- Def.Name="Defense"
- Def.Parent=Stats
- Def.Value=1
- local Mvmt=Instance.new("NumberValue")
- Mvmt.Name="Movement"
- Mvmt.Parent=Stats
- Mvmt.Value=1
- local Block=Instance.new("BoolValue")
- Block.Name="Block"
- Block.Parent=Stats
- Block.Value=false
- local Stun=Instance.new("NumberValue")
- Stun.Name="Stun"
- Stun.Parent=Stats
- Stun.Value=0
- local StunT=Instance.new("NumberValue")
- StunT.Name="StunThreshold"
- StunT.Parent=Stats
- StunT.Value=100
- local Rooted=Instance.new("BoolValue")
- Rooted.Name="Rooted"
- Rooted.Parent=Stats
- Rooted.Value=false
- local Stunned=Instance.new("BoolValue")
- Stunned.Name="Stunned"
- Stunned.Parent=Stats
- Stunned.Value=false
- local Stagger=Instance.new("BoolValue")
- Stagger.Name="Stagger"
- Stagger.Parent=Stats
- Stagger.Value=false
- local StaggerHit=Instance.new("BoolValue")
- StaggerHit.Name="StaggerHit"
- StaggerHit.Parent=Stats
- StaggerHit.Value=false
- local RecentEnemy=Instance.new("ObjectValue")
- RecentEnemy.Name="RecentEnemy"
- RecentEnemy.Parent=Stats
- RecentEnemy.Value=nil
- local Decrease=Instance.new("BoolValue")
- Decrease.Name="Decrease"
- Decrease.Parent=Stats
- Decrease.Value=false
- local mana=Instance.new("NumberValue")
- mana.Name="Mana"
- mana.Parent=Stats
- mana.Value=0
- local boss=Instance.new("BoolValue")
- boss.Name="Boss"
- boss.Parent=Stats
- boss.Value=true
- local alive=Instance.new("BoolValue")
- alive.Name="Alive"
- alive.Parent=Character
- alive.Value=true
- local btarget=Instance.new("ObjectValue")
- btarget.Name="Target"
- btarget.Parent=Stats
- btarget.Value=nil
- local passive1=Instance.new("NumberValue",Decrease)
- passive1.Name="DecreaseAtk"
- passive1.Value=-.4
- local passive2=Instance.new("NumberValue",Decrease)
- passive2.Name="DecreaseDef"
- passive2.Value=-.1
- local passive3=Instance.new("NumberValue",Decrease)
- passive3.Name="DecreaseMvmt"
- passive3.Value=.1
- so = function(id,par,vol,pit)
- local sou = Instance.new("Sound",par or workspace)
- sou.Volume=1.5
- sou.Pitch=pit or 1
- sou.SoundId="http://www.roblox.com/asset/?id="..id
- --swait()
- sou:play()
- game:GetService("Debris"):AddItem(sou,6)
- end
- local function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CFrame.new(at.x, at.y, at.z,
- right.x, top.x, back.x,
- right.y, top.y, back.y,
- right.z, top.z, back.z)
- end
- function Triangle(a, b, c)
- local edg1 = (c-a):Dot((b-a).unit)
- local edg2 = (a-b):Dot((c-b).unit)
- local edg3 = (b-c):Dot((a-c).unit)
- if edg1 <= (b-a).magnitude and edg1 >= 0 then
- a, b, c = a, b, c
- elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
- a, b, c = b, c, a
- elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
- a, b, c = c, a, b
- else
- assert(false, "unreachable")
- end
- local len1 = (c-a):Dot((b-a).unit)
- local len2 = (b-a).magnitude - len1
- local width = (a + (b-a).unit*len1 - c).magnitude
- local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
- local list = {}
- if len1 > 0.01 then
- local w1 = Instance.new('WedgePart', m)
- w1.Name = "Triangle"
- game:GetService("Debris"):AddItem(w1,5)
- w1.Material = "SmoothPlastic"
- w1.FormFactor = 'Custom'
- w1.BrickColor = BrickColor.new("Teal")
- w1.Transparency = 0
- w1.Reflectance = 0
- w1.Material = "SmoothPlastic"
- w1.CanCollide = false
- NoOutline(w1)
- local sz = Vector3.new(0.2, width, len1)
- w1.Size = sz
- local sp = Instance.new("SpecialMesh",w1)
- sp.MeshType = "Wedge"
- sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
- w1:BreakJoints()
- w1.Anchored = true
- w1.Parent = workspace
- w1.Transparency = 0.7
- table.insert(Effects,{w1,"Disappear",.05})
- w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
- table.insert(list,w1)
- end
- if len2 > 0.01 then
- local w2 = Instance.new('WedgePart', m)
- w2.Name = "Triangle"
- game:GetService("Debris"):AddItem(w2,5)
- w2.Material = "SmoothPlastic"
- w2.FormFactor = 'Custom'
- w2.BrickColor = BrickColor.new("Teal")
- w2.Transparency = 0
- w2.Reflectance = 0
- w2.Material = "SmoothPlastic"
- w2.CanCollide = false
- NoOutline(w2)
- local sz = Vector3.new(0.2, width, len2)
- w2.Size = sz
- local sp = Instance.new("SpecialMesh",w2)
- sp.MeshType = "Wedge"
- sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
- w2:BreakJoints()
- w2.Anchored = true
- w2.Parent = workspace
- w2.Transparency = 0.7
- table.insert(Effects,{w2,"Disappear",.05})
- w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
- table.insert(list,w2)
- end
- return unpack(list)
- end
- function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- if Type==1 or Type==nil then
- table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
- elseif Type==2 then
- table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
- end
- end
- function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
- end
- function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe*cf(x2,y2,z2)
- local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCylinder3(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,Character,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
- end
- function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
- local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
- end
- function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- --[[local BodGy=Instance.new("BodyGyro")
- BodGy.maxTorque=Vector3.new(0,4e+005,0)
- BodGy.P=2000
- BodGy.D=100
- BodGy.Name="SiegmundGyro"
- CF=RootPart.CFrame
- BodGy.Parent=RootPart
- BodGy.cframe=CF]]
- --[[Neck.C0=euler(0,0,0)*cf(0,3,0)*euler(0,.6,0)*euler(-.2,0,0)
- RootJoint.C0=cf(0,-2,0)*euler(0,.6,0)
- RW.C0=cf(4.5,1.5,0)*euler(-.4,0,.5)*euler(0,0,0)
- RW.C1=cf(0,1.5,0)*euler(0,0,0)
- LW.C0=cf(-4.5,1.5,0)*euler(.2,0,-.5)
- LW.C1=cf(0,1.5,0)*euler(0,0,0)
- RH.C0=cf(1.5,-3,0)*euler(0,-.6,0)*euler(0,0,.1)
- RH.C1=cf(0,3,0)*euler(0,0,0)
- LH.C0=cf(-1.5,-3,0)*euler(0,.6,0)*euler(.1,0,0)
- LH.C1=cf(0,3,0)*euler(0,0,0)]]
- --[[RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
- LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)]]
- function StartAnim()
- attack=true
- --workspace.CurrentCamera.CameraSubject=Head
- Neck.C0=necko*euler(-0.4,0,0)
- RootJoint.C0=euler(.2,0,0)
- RW.C0=cf(1.5,0.5,0)*euler(-.3,0,0.2)
- RW.C1=cf(0,0.5,0)*euler(0,0,0)
- LW.C0=cf(-1.5,0.5,0)*euler(-.3,0,-0.2)
- LW.C1=cf(0,0.5,0)*euler(0,0,0)
- RH.C0=cf(.5,-1,0)*euler(0.4,1.57,0)
- LH.C0=cf(-.5,-1,0)*euler(-0.2,-1.57,0)
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
- while hitfloor==nil do
- swait()
- end
- print("endderp")
- so("http://roblox.com/asset/?id=157878578",Torso,1,0.8)
- so("http://roblox.com/asset/?id=2760979",Torso,1,0.4)
- MagicWave(BrickColor.new("Medium stone grey"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
- --MagniDamage(Torso,15,6,8,math.random(20,40),"Knockdown2",Torso,0,1,math.random(8,10),nil,nil,true)
- for i=0,1,0.05 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
- end
- attack=false
- end
- --[[RW.C0=cf(1.5,0.5,0)*euler(0,0,1.2)
- LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.2)
- Neck.C0=necko*euler(-.4,0,0)
- RootJoint.C0=cf(0,1,0)*euler(0,0,0)
- RH.C0=cf(1,-1,0)*euler(-1.2,1.57,0)
- LH.C0=cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0)]]
- local BodGy=Instance.new("BodyGyro")
- BodGy.maxTorque=Vector3.new(0,4e+005,0)
- BodGy.P=2000
- BodGy.D=100
- BodGy.Name="SthomasGyro"
- CF=RootPart.CFrame
- BodGy.Parent=RootPart
- BodGy.cframe=CF
- wait()
- print("Spanda spawned.")
- function StunAnim()
- attack=true
- Stunned.Value=true
- showDamage(Character,"Stunned","Interrupt")
- local dec=Instance.new("NumberValue",Decrease)
- dec.Name="DecreaseMvmt"
- dec.Value=10
- for i=0,1,0.3 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.2,.5,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(-.2,3,0),.2)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
- end
- for i=0,1,0.3 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.3,.5,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-.5)*euler(-.8,3,0),.2)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
- end
- for i=0,1,0.3 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.3,-1,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1.57,3,0),.2)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
- end
- local gairost=Instance.new("BodyGyro")
- gairost.Parent=RootPart
- gairost.maxTorque=Vector3.new(4e+005,0,4e+005)*math.huge
- gairost.P=20e+003
- gairost.cframe=cf(0,0,0)
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2.5)*euler(-1.57,3.14,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
- end
- for i=1,200 do
- swait()
- gairost.cframe=RootPart.CFrame
- end
- for i=0,1,0.2 do
- swait()
- Stun.Value=0
- gairost.cframe=RootPart.CFrame
- Neck.C0=clerp(Neck.C0,necko*euler(0,.2,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1,4,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
- end
- gairost.Parent=nil
- dec.Parent=nil
- Stun.Value=0
- Stunned.Value=false
- attack=false
- for i=1,10 do
- swait()
- Stun.Value=0
- end
- end
- function PunchSlam()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,-.5,0)*euler(-.2,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(.1,0,0)*cf(0,.2,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,0,.8)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,-.5,-.05),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,.4),.3)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*3
- so("169445092",LeftArm,1,1.2)
- for i=0,1,0.1 do
- swait()
- MagniDamage(LeftArm,2,8,10,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
- --MagniDamage(LeftArm,2,6,8,0,"Normal",RootPart,.3,1,math.random(6,7),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(-.1,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*euler(.2,0,0)*cf(0,.2,1),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- --LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.7,0,.2)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,.4,-.3),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.9,-.2)*euler(0,-1.57,0)*euler(0,.5,0),.3)
- if i<.3 then
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.7,0,-.2)*euler(0,0,0),.3)
- else
- LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.2)*euler(1.7,0,.1)*euler(0,0,0),.3)
- end
- end
- if RecentEnemy.Value~=nil then
- Torso.Velocity=vt(0,0,0)
- target,distance=findNearestTorso(Torso.Position)
- if target~=nil then
- BodGy.cframe=cf(Torso.Position,target.Position)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*3
- refd=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- refd.Anchored=true
- game:GetService("Debris"):AddItem(refd,5)
- so("169445092",RightArm,1,1.2)
- for i=0,1,0.1 do
- swait()
- refd.CFrame=cf(posfloor)
- MagniDamage(LeftArm,4,10,12,math.random(30,35),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
- if i<.6 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
- else
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
- end
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)
- end
- refd.Parent=nil
- --swait(100)
- end
- attack=false
- end
- function SweepCut()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,1.3,0)*euler(-.5,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-.5,0,0)*cf(0,.4,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.5)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.7,-.4)*euler(0,1.57,0)*euler(-.5,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.3,-.4,-.7)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.7,0,0),.3)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*5
- so("169445073",LeftLeg,1,1.2)
- for i=0,1,0.1 do
- swait()
- MagniDamage(LeftLeg,2,7,9,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(0,1,0)*euler(-.5,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-1,0,0)*cf(0,1.2,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,.3)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,1)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.7,-.8)*euler(0,1.57,0)*euler(-.3,0,-1.2),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.5,0,0),.3)
- end
- Torso.Velocity=vt(0,0,0)
- if RecentEnemy.Value~=nil then
- target,distance=findNearestTorso(Torso.Position)
- if target~=nil then
- BodGy.cframe=cf(Torso.Position,target.Position)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*3
- refd=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- refd.Anchored=true
- game:GetService("Debris"):AddItem(refd,5)
- so("169445092",RightArm,1,1)
- for i=0,1,0.2 do
- swait()
- refd.CFrame=cf(posfloor)
- MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
- --MagniDamage(LeftArm,4,6,8,math.random(30,35),"Knockdown2",refd,.5,1,math.random(3,4),nil,nil)
- --[[Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
- if i<.6 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
- else
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
- end
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)]]
- Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.4)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(0,0,0)*cf(0,.6,0),.4)
- RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.8,0,-.8)*euler(0,0,0),.4)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-.7)*euler(0,0,0),.4)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
- RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,0),.4)
- LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,0),.4)
- end
- for i=0,1,0.1 do
- swait()
- MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
- Torso.Velocity=vt(0,60,0)
- Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
- RootJoint.C1=RootJoint.C1*euler(0,.5,0)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.5,0,-.2)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,-.2),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,.2),.3)
- end
- refd.Parent=nil
- RootJoint.C1=cf(0,0,0)
- end
- --swait(100)
- attack=false
- end
- function MultiKick()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(.1,.7,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(.1,.8,0)*euler(0,0,0)*cf(0,.6,0),.3)
- RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.4,0,.4)*euler(0,-.5,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1,0,.2)*euler(0,1,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.3,-.6)*euler(.05,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.2,-.4)*euler(.2,0,0),.3)
- end
- Look=RootPart.CFrame.lookVector*move*2
- local n=8
- for i=0,1,0.04 do
- swait()
- n=n+1
- if n>=8 then
- n=0
- so("169445073",LeftLeg,1,1.2)
- end
- Torso.Velocity=Look
- MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
- RootJoint.C1=RootJoint.C1*euler(0,.6,0)
- RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
- end
- if RecentEnemy.Value~=nil then
- RecentEnemy.Value=nil
- target,distance=findNearestTorso(Torso.Position)
- if target~=nil then
- RootPart.CFrame=cf(RootPart.Position,target.Position)
- end
- Look=RootPart.CFrame.lookVector*move
- for i=0,1,0.04 do
- swait()
- n=n+1
- if n>=8 then
- n=0
- so("169445073",LeftLeg,1,1.2)
- end
- Torso.Velocity=Look
- MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
- RootJoint.C1=RootJoint.C1*euler(0,.6,0)
- RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
- end
- Torso.Velocity=vt(0,0,0)
- end
- RootJoint.C1=cf(0,0,0)
- attack=false
- end
- function JumpKick()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
- end
- Torso.Velocity=vt(0,100,0)
- jump=true
- local dec=Instance.new("NumberValue",Decrease)
- dec.Name="DecreaseMvmt"
- dec.Value=-.4
- for i=0,1,0.05 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,4,-3),.2)
- RootJoint.C1=RootJoint.C1*euler(-.32,0,0)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1)*euler(0,0,0),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-1)*euler(0,0,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.2)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.8)*euler(.2,0,0),.2)
- end
- while hitfloor==nil do
- swait()
- MagniDamage(LeftLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
- MagniDamage(RightLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
- end
- jump=false
- dec.Parent=nil
- RootJoint.C1=cf(0,0,0)
- attack=false
- end
- function EnergyBlam()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,-1,0)*euler(-.2,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,-1,0)*cf(0,.4,0),.3)
- RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.4,0,-.5)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,.5,-.1),.3)
- LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,-1,.2),.3)
- end
- so("2101137",Torso,1,1)
- for i=0,1,0.05 do
- swait()
- MagicCircle(BrickColor.new("Really black"),Torso.CFrame*cf(0,0,-2),1,1,1,1,1,1,.1)
- MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,0,-2),1,1,1,.5,.5,.5,.1)
- end
- for i=0,1,0.1 do
- swait()
- MagicCircle(BrickColor.new("Really black"),Torso.CFrame*cf(0,.5,-2),1,1,1,1,1,1,.1)
- MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,.5,-2),1,1,1,.5,.5,.5,.1)
- Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.4,0),.3)
- RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,.5)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,0,-.1),.3)
- LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
- end
- ref=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- ref.Anchored=false
- --ref.CFrame=cf(head.Position)
- local rwld=weld(Torso,Torso,ref,cf(0,.5,-2.5))
- game:GetService("Debris"):AddItem(ref,10)
- ref2=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- ref2.Anchored=false
- --ref.CFrame=cf(head.Position)
- game:GetService("Debris"):AddItem(ref2,10)
- local tehCF=nil
- --[[target,distance=findNearestTorso(Torso.Position)
- if target~=nil then]]
- tehCF=cf(ref.Position,Mouse.Hit.p)
- --end
- nuh=5
- for i=0,1,0.05 do
- swait()
- nuh=nuh+1
- if nuh>=5 then
- nuh=0
- so("169380505",ref2,1,1.5)
- end
- --[[target,distance=findNearestTorso(Torso.Position)
- if target~=nil then]]
- hit,pos=rayCast(ref.Position,tehCF.lookVector,100,Character)
- local mag=(ref.Position-pos).magnitude
- MagicCylinder3(BrickColor.new("White"),CFrame.new((ref.Position+pos)/2,pos)*angles(1.57,0,0),6,mag*5,6,2,1,2,0.1)
- MagicCircle2(BrickColor.new("White"),cf(pos),10,10,10,10,10,10,.1)
- ref2.CFrame=cf(pos)
- MagniDamage(ref2,10,12,16,0,"Normal",ref2,.2,1,math.random(2,4),nil,nil,true)
- --end
- end
- ref.Parent=nil
- ref2.Parent=nil
- attack=false
- end
- function DecreaseStat(Model,Stat,Amount,Duration)
- if Model:findFirstChild("Stats")~=nil then
- if Model.Stats[Stat]~=nil then
- Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
- d=Instance.new("NumberValue",Model.Stats.Decrease)
- game:GetService("Debris"):AddItem(d,40)
- if Stat=="Damage" then
- d.Name="DecreaseAtk"
- elseif Stat=="Defense" then
- d.Name="DecreaseDef"
- elseif Stat=="Movement" then
- d.Name="DecreaseMvmt"
- end
- if Model:findFirstChild("Torso")~=nil then
- display=""
- if Stat=="Damage" then
- if Amount>0 then
- display="-Damage"
- else
- display="+Damage"
- end
- elseif Stat=="Defense" then
- if Amount>0 then
- display="-Defense"
- else
- display="+Defense"
- end
- elseif Stat=="Movement" then
- if Amount>0 then
- display="-Movement"
- else
- display="+Movement"
- end
- end
- showDamage(Model,display,"Debuff")
- end
- d.Value=Amount
- table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
- end
- end
- end
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- --[[function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2.Name~=bName) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if btarget.Value==nil then
- if (temp.Position - pos).magnitude < dist then
- local dohit=true
- if temp2:findFirstChild("Stats")~=nil then if temp2.Stats:findFirstChild("Boss")~=nil then if temp2.Stats.Boss.Value==true then dohit=false end end end
- if temp2:findFirstChild("Alive")==nil then dohit=false end
- if dohit==true then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- else
- if btarget.Value.Parent~=nil then
- if btarget.Value:findFirstChild("Torso")~=nil then
- if btarget.Value:findFirstChild("Humanoid")~=nil then
- if btarget.Value.Humanoid.Health<=0 then
- btarget.Value=nil
- end
- end
- if btarget.Value~=nil then
- torso=btarget.Value.Torso
- dist = (torso.Position - pos).magnitude
- end
- end
- else
- btarget.Value=nil
- end
- end
- end
- end
- end
- return torso,dist
- end]]
- findNearestTorso = function(pos)
- local list = (game.Workspace:children())
- local torso = nil
- local dist = 1000
- local temp, human, temp2 = nil, nil, nil
- for x = 1, #list do
- temp2 = list[x]
- if temp2.className == "Model" and temp2.Name ~= Character.Name then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
- local dohit = true
- if dohit == true then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso, dist
- end
- function findRandomTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- local list2 = {}
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2.Name~="Vanta") then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if pos.magnitude < dist then
- torso = temp
- table.insert(list2,temp)
- end
- end
- end
- end
- if #list2>0 then
- rand=math.random(1,#list2)
- return list2[rand],dist
- else
- return nil,dist
- end
- end
- Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
- if hit.Parent==nil then
- return
- end
- h=hit.Parent:FindFirstChild("Humanoid")
- for _,v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h=v
- end
- end
- if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
- h=hit.Parent.Parent:FindFirstChild("Humanoid")
- end
- if hit.Parent.className=="Hat" then
- hit=hit.Parent.Parent:findFirstChild("Head")
- end
- if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
- if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
- if hit.Parent:findFirstChild("Stats")~=nil then if hit.Parent.Stats:findFirstChild("Boss")~=nil then if hit.Parent.Stats.Boss.Value==true then return end end end
- RecentEnemy.Value=hit.Parent
- game:GetService("Debris"):AddItem(c,.5)
- minim=minim*Atk.Value
- maxim=maxim*Atk.Value
- Damage=0
- if minim==maxim or minim>maxim then
- Damage=maxim
- else
- Damage=math.random(minim,maxim)
- end
- blocked=false
- enblock=nil
- Stats=hit.Parent:findFirstChild("Stats")
- if Stats~=nil then
- enblock=Stats:findFirstChild("Block")
- if enblock~=nil then
- if enblock.Value==true then
- blocked=true
- end
- end
- if Stats:findFirstChild("Defense")~=nil then
- Damage=Damage/(Stats.Defense.Value)
- if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
- hitnum=math.random(1,3)
- if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
- elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
- elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
- end
- --[[if hitnum==1 then so("199149321",hit,1,1)
- elseif hitnum==2 then so("199149338",hit,1,1)
- elseif hitnum==3 then so("199149367",hit,1,1)
- elseif hitnum==4 then so("199149409",hit,1,1)
- elseif hitnum==5 then so("199149452",hit,1,1)
- end]]
- elseif ranged==false or ranged==nil and blocked~=true then
- hitnum=math.random(1,3)
- if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
- elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
- elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
- end
- --[[if hitnum==1 then so("199149137",hit,1,1)
- elseif hitnum==2 then so("199149186",hit,1,1)
- elseif hitnum==3 then so("199149221",hit,1,1)
- elseif hitnum==4 then so("199149235",hit,1,1)
- elseif hitnum==5 then so("199149269",hit,1,1)
- elseif hitnum==6 then so("199149297",hit,1,1)
- end]]
- end
- end
- if Stats:findFirstChild("Stun")~=nil then
- if blocked==true then
- incstun=math.floor(incstun/2)
- end
- Stats.Stun.Value=Stats.Stun.Value+incstun
- end
- if Stats:findFirstChild("Stagger")~=nil then
- if stagger==true then
- Stats.Stagger.Value=true
- end
- end
- end
- if blocked==true then
- showDamage(hit.Parent,"Block","Damage")
- hitnum=math.random(1,2)
- if hitnum==1 then so("199148933",hit,1,1)
- elseif hitnum==2 then so("199148947",hit,1,1)
- end
- enblock.Value=false
- else
- Damage=math.floor(Damage)
- h.Health=h.Health-Damage
- --[[coroutine.resume(coroutine.create(function(Hum,Dam)
- damageFunc:InvokeServer(Hum,Dam)
- end),h,Damage)]]
- showDamage(hit.Parent,Damage,"Damage")
- if DecreaseState~=nil then
- if DecreaseState=="Shatter" then
- DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
- DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
- else
- DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
- end
- end
- if Type=="Knockdown" then
- hum=hit.Parent.Humanoid
- hum.PlatformStand=true
- coroutine.resume(coroutine.create(function(HHumanoid)
- swait(1)
- HHumanoid.PlatformStand=false
- end),hum)
- local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
- --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
- local bodvol=Instance.new("BodyVelocity")
- bodvol.velocity=angle*knockback
- bodvol.P=5000
- bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
- bodvol.Parent=hit
- rl=Instance.new("BodyAngularVelocity")
- rl.P=3000
- rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
- rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- rl.Parent=hit
- game:GetService("Debris"):AddItem(bodvol,.5)
- game:GetService("Debris"):AddItem(rl,.5)
- elseif Type=="Shatter" then
- for i=1,10 do
- BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
- end
- elseif Type=="Knockdown2" then
- hum=hit.Parent.Humanoid
- local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
- local bodvol=Instance.new("BodyVelocity")
- bodvol.velocity=angle*knockback
- bodvol.P=5000
- bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
- bodvol.Parent=hit
- game:GetService("Debris"):AddItem(bodvol,.5)
- elseif Type=="Normal" then
- vp=Instance.new("BodyVelocity")
- vp.P=500
- vp.maxForce=Vector3.new(math.huge,0,math.huge)
- if KnockbackType==1 then
- vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
- elseif KnockbackType==2 then
- vp.velocity=Property.CFrame.lookVector*knockback
- end
- game:GetService("Debris"):AddItem(vp,.5)
- if knockback>0 then
- vp.Parent=hit.Parent.Torso
- end
- end
- end
- debounce=Instance.new("BoolValue")
- debounce.Name="DebounceHit"
- debounce.Parent=hit.Parent
- debounce.Value=true
- game:GetService("Debris"):AddItem(debounce,Delay)
- CRIT=false
- end
- end
- showDamage=function(Char,Dealt,Type)
- m=Instance.new("Model")
- m.Name="Effect"
- c=Instance.new("Part")
- c.Transparency=1
- c.Name="Head"
- c.TopSurface=0
- c.BottomSurface=0
- c.formFactor="Plate"
- c.Size=Vector3.new(1,.4,1)
- b=Instance.new("BillboardGui",c)
- b.Size=UDim2.new(5,0,5,0)
- b.AlwaysOnTop=true
- damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
- if Type=="Damage" then
- damgui.Font="SourceSans"
- if Dealt=="Block" then
- damgui.TextColor3=BrickColor.new("Really black").Color
- elseif Dealt<3 then
- damgui.TextColor3=BrickColor.new("White").Color
- elseif Dealt>=3 and Dealt<20 then
- damgui.TextColor3=BrickColor.new("Black").Color
- else
- damgui.TextColor3=BrickColor.new("White").Color
- damgui.Font="SourceSansBold"
- end
- elseif Type=="Debuff" then
- damgui.TextColor3=BrickColor.new("White").Color
- elseif Type=="Interrupt" then
- damgui.TextColor3=BrickColor.new("Black").Color
- end
- --damgui.FontSize="Size48"
- damgui.TextScaled=true
- ms=Instance.new("CylinderMesh")
- ms.Scale=Vector3.new(1,1,1)
- ms.Parent=c
- c.Reflectance=0
- Instance.new("BodyGyro").Parent=c
- c.Parent=m
- if Char:findFirstChild("Head")~=nil then
- c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
- elseif Char.Parent:findFirstChild("Head")~=nil then
- c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
- end
- f=Instance.new("BodyPosition")
- f.P=2000
- f.D=100
- f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
- if Type=="Damage" then
- f.position=c.Position+Vector3.new(0,3,0)
- elseif Type=="Debuff" or Type=="Interrupt" then
- f.position=c.Position+Vector3.new(0,5,0)
- end
- f.Parent=c
- game:GetService("Debris"):AddItem(m,5)
- table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
- c.CanCollide=false
- m.Parent=workspace
- c.CanCollide=false
- end
- function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
- for _,c in pairs(workspace:children()) do
- local hum=c:findFirstChild("Humanoid")
- if hum~=nil then
- local head=nil
- for _,d in pairs(c:children()) do
- --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
- --[[if d.className=="Model" and ranged~=true then
- head=d:findFirstChild("Hitbox")
- if d.Parent==Character then break end
- if head~=nil then
- local targ=head.Position-Part.Position
- local mag=targ.magnitude
- if mag<=magni then
- ref=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- ref.Anchored=true
- ref.CFrame=cf(head.Position)
- game:GetService("Debris"):AddItem(ref,1)
- hitnum=math.random(1,5)
- if hitnum==1 then so("199148971",ref,1,1)
- elseif hitnum==2 then so("199149025",ref,1,1)
- elseif hitnum==3 then so("199149072",ref,1,1)
- elseif hitnum==4 then so("199149109",ref,1,1)
- elseif hitnum==5 then so("199149119",ref,1,1)
- end
- StaggerHit.Value=true
- end
- end
- end]]
- if d.className=="Part" then
- head=d
- if head~=nil then
- local targ=head.Position-Part.Position
- local mag=targ.magnitude
- if mag<=magni and c.Name~=Character then
- if stun==nil then
- stun=math.random(5,10)
- end
- local Rang=nil
- if Ranged==false then
- Rang=true
- end
- local stag=nil
- if shbash==true then
- stag=true
- end
- Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
- --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
- end
- end
- end
- end
- end
- end
- end
- local hold = false
- function onKeyDown(key)
- if attack==false then
- if key=="z" then
- PunchSlam()
- elseif key=="x" then
- SweepCut()
- elseif key=="c" then
- MultiKick()
- elseif key=="v" then
- JumpKick()
- elseif key == "b" then
- EnergyBlam()
- --[[elseif key == "n" then
- GrandeurDash()
- elseif key == "m" then
- DeathImpact()
- elseif key == "f" then
- Jump()]]
- elseif key=="0" and hold == false then
- hold = true
- run.Parent=Decrease
- end
- end
- end
- function onKeyUp(key)
- if attack==false then
- if key=="0" and hold == true then
- hold = false
- run.Parent=nil
- end
- end
- end
- Mouse.KeyDown:connect(onKeyDown)
- Mouse.KeyUp:connect(onKeyUp)
- local stunnum=0
- local animnum=0
- local idle=1
- local animlimit=5
- local target,distance=nil,nil
- local attacking=false
- local stunanim=false
- while Humanoid.Health>0 do
- swait()
- --[[print(target)
- print(distance)]]
- hitbox2.Parent=hitbox.Parent
- hitbox2.Size=hitbox.Size
- hitbox2.CFrame=hitboxCF
- --[[for _,c in pairs(Character:children()) do
- for _,v in pairs(c:children()) do
- if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
- if v.Name~="SiegmundGyro" and v.Name~="SiegmundPos" then
- print("dai")
- v.Parent=nil
- end
- end
- end
- end]]
- coroutine.resume(coroutine.create(function()
- if start==false then
- start=true
- StartAnim()
- end
- end))
- if attack==false then
- BodGy.cframe=cf(Torso.Position,Mouse.Hit.p)
- end
- target,distance=findNearestTorso(Torso.Position)
- --[[if target~=nil then
- if attack==false then
- BodGy.cframe=cf(Torso.Position,target.Position)
- end
- numb1=RootPart.Position.y
- numb2=target.Position.y
- if numb2-numb1>=5 or numb2-numb1<=-5 then
- if distance<=30 then
- if attack==false then
- attackrand=math.random(1,20)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- JumpKick()
- end))
- end
- end
- end
- end
- if distance>30 then --far range
- Humanoid:MoveTo(target.Position)
- run.Parent=Decrease
- if attack==false then
- attackrand=math.random(1,70)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- EnergyBlam()
- --[[d=math.random(1,3)
- if d==1 then
- PunchSlam()
- elseif d==2 then
- SweepCut()
- elseif d==3 then
- MultiKick()
- end
- end))
- --[[coroutine.resume(coroutine.create(function()
- buffdef.Parent=Decrease
- atk=0
- if stompcooldown<=0 then
- atk=3
- else
- atk=math.random(1,2)
- end
- if atk==1 then
- Jump()
- elseif atk==2 then
- GrandeurDash()
- elseif atk==3 then
- DeathImpact()
- end
- buffdef.Parent=nil
- end))
- end
- end
- elseif distance<=30 and distance>=5 then --mid range
- move=distance*3
- Humanoid:MoveTo(target.Position)
- run.Parent=nil
- if attack==false then
- attackrand=math.random(1,20)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- d=math.random(1,3)
- if d==1 then
- PunchSlam()
- elseif d==2 then
- SweepCut()
- elseif d==3 then
- MultiKick()
- end
- end))
- --[[coroutine.resume(coroutine.create(function()
- buffdef.Parent=Decrease
- atk=0
- if stompcooldown<=0 then
- atk=3
- else
- atk=math.random(1,2)
- end
- if atk==1 then
- HeavySlam()
- elseif atk==2 then
- GrandeurDash()
- elseif atk==3 then
- DeathImpact()
- end
- buffdef.Parent=nil
- end))
- end
- end
- else --close range
- move=10
- Humanoid:MoveTo(RootPart.Position)
- run.Parent=nil
- --run.Parent=nil
- if attack==false then
- attackrand=math.random(1,20)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- d=math.random(1,3)
- if d==1 then
- PunchSlam()
- elseif d==2 then
- SweepCut()
- elseif d==3 then
- MultiKick()
- end
- end))
- --[[coroutine.resume(coroutine.create(function()
- buffdef.Parent=Decrease
- HeavyCombo("Stun")
- buffdef.Parent=nil
- end))
- end
- end
- end
- end]]
- if Mvmt.Value<0 or Stun.Value>=100 or attack==true then
- Humanoid.WalkSpeed=0
- if jump==true then
- Humanoid.WalkSpeed=16*Mvmt.Value
- end
- else
- Humanoid.WalkSpeed=16*Mvmt.Value
- end
- if Stun.Value>=100 and stunanim==false then
- coroutine.resume(coroutine.create(function()
- stunanim=true
- while attack==true do
- swait()
- end
- StunAnim()
- Stun.Value=0
- stunanim=false
- end))
- end
- local stunnum2=80
- if stunnum>=stunnum2 then
- if Stun.Value>0 then
- Stun.Value=Stun.Value-1
- end
- stunnum=0
- end
- stunnum=stunnum+1
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local velderp=RootPart.Velocity.y
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
- for _,c in pairs(Decrease:children()) do
- if c:findFirstChild("Duration")~=nil then
- c.Duration.Value=c.Duration.Value-1
- if c.Duration.Value<=0 then
- c.Parent=nil
- end
- end
- if c.Name=="DecreaseAtk" then
- decreaseatk=decreaseatk+c.Value
- elseif c.Name=="DecreaseDef" then
- decreasedef=decreasedef+c.Value
- elseif c.Name=="DecreaseMvmt" then
- decreasemvmt=decreasemvmt+c.Value
- end
- end
- Atk.Value=1-decreaseatk
- if Atk.Value<=0 then
- Atk.Value=0
- end
- Def.Value=1-decreasedef
- if Def.Value<=0 then
- Def.Value=0.01
- end
- Mvmt.Value=1-decreasemvmt
- if Mvmt.Value<=0 then
- Mvmt.Value=0
- end
- decreaseatk=0
- decreasedef=0
- decreasemvmt=0
- AtkVal=Atk.Value*100
- AtkVal=math.floor(AtkVal)
- AtkVal=AtkVal/100
- DefVal=Def.Value*100
- DefVal=math.floor(DefVal)
- DefVal=DefVal/100
- MvmtVal=Mvmt.Value*100
- MvmtVal=math.floor(MvmtVal)
- MvmtVal=MvmtVal/100
- if MvmtVal<=0 then
- MvmtVal=0
- end
- animnum=animnum+1
- if animnum>=animlimit*5 then
- idle=1
- animnum=0
- elseif animnum>=animlimit*4 then
- idle=1
- animnum=0
- elseif animnum>=animlimit*3 then
- idle=4
- elseif animnum>=animlimit*2 then
- idle=3
- elseif animnum>=animlimit*1 then
- idle=2
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- Anim="Jump"
- if attack==false then
- Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(-.1,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- Anim="Fall"
- if attack==false then
- Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,0.2),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-0.2),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0.4,1.57,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(-0.2,-1.57,0),.2)
- end
- elseif torvel<1 and hitfloor~=nil then
- Anim="Idle"
- animlimit=15
- if attack==false then
- if idle==1 or idle==2 then
- Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*cf(0,.4,0),.1)
- RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(1,0,.2)*euler(0,-.5,0),.1)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,1,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.6,-.9,0)*euler(0,1.57,0)*euler(0,-.1,-.05),.1)
- LH.C0=clerp(LH.C0,cf(-.7,-.8,-.4)*euler(0,-1.57,0)*euler(0,.5,.1),.1)
- else
- Neck.C0=clerp(Neck.C0,necko*euler(.1,.5,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(.1,.5,0)*euler(0,0,0)*cf(0,.6,0),.1)
- RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.8,0,.4)*euler(0,-.5,0),.1)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.6,0,.2)*euler(0,1,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.1,-.2)*euler(.05,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.5,.2)*euler(-.1,0,0),.1)
- end
- end
- elseif torvel>2 and torvel<20 and hitfloor~=nil then
- Anim="Walk"
- animlimit=10
- if attack==false then
- if idle==1 or idle==2 then
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.4,0,-.1)*euler(0,0,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,-.5),.1)
- if idle==1 then
- Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.2),.1)
- elseif idle==2 then
- Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
- RW.C0=clerp(RW.C0,cf(1.3,0.5,-.5)*euler(1.2,0,-.5)*euler(0,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-.9,-.3)*euler(0,-1.57,0)*euler(0,0,0),.1)
- end
- else
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.4,0,.1)*euler(0,0,0),.1)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,.5),.1)
- if idle==3 then
- Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.2),.1)
- elseif idle==4 then
- Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.5)*euler(1.2,0,.5)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-.9,-.3)*euler(0,1.57,0)*euler(0,0,0),.1)
- end
- end
- end
- elseif torvel>=20 and hitfloor~=nil then
- Anim="Run"
- animlimit=10
- if attack==false then
- if idle==1 or idle==2 then
- Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.2,0,-.8),.2)
- if idle==1 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.5),.2)
- elseif idle==2 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-.6,-.5)*euler(0,-1.57,0)*euler(0,0,-.5),.1)
- end
- else
- Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.2,0,.8),.2)
- if idle==3 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.5),.2)
- elseif idle==4 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-.6,-.5)*euler(0,1.57,0)*euler(0,0,.5),.1)
- end
- end
- end
- end
- if #Effects>0 then
- --table.insert(Effects,{prt,"Block1",delay})
- for e=1,#Effects do
- if Effects[e]~=nil then
- --for j=1,#Effects[e] do
- local Thing=Effects[e]
- if Thing~=nil then
- local Part=Thing[1]
- local Mode=Thing[2]
- local Delay=Thing[3]
- local IncX=Thing[4]
- local IncY=Thing[5]
- local IncZ=Thing[6]
- if Thing[2]=="DecreaseStat" then
- --table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
- Thing[5]=Thing[5]-1
- if Thing[5]<=0 then
- if Thing[1]:findFirstChild("Stats")~=nil then
- if Thing[1].Stats:findFirstChild("Decrease")~=nil then
- --Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
- end
- end
- Thing[6].Parent=nil
- table.remove(Effects,e)
- end
- end
- if Thing[2]=="CylinderClang" then
- if Thing[3]<=1 then
- Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
- Thing[7]=Thing[1].CFrame
- effect("New Yeller",0,Thing[8],Thing[7])
- Thing[8]=Thing[7]
- Thing[3]=Thing[3]+Thing[4]
- else
- Part.Parent=nil
- table.remove(Effects,e)
- end
- end
- if Thing[2]=="showDamage" then
- if Thing[6]<Thing[5] then
- Thing[6]=Thing[6]+1
- elseif Thing[6]<Thing[7] then
- Thing[4].position=Thing[4].position+vt(0,-.2,0)
- Thing[6]=Thing[6]+1
- elseif Thing[6]<Thing[8] then
- Thing[6]=Thing[6]+1
- elseif Thing[6]<Thing[9] then
- Thing[6]=Thing[6]+1
- Thing[4].position=Thing[4].position+vt(0,.2,0)
- Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
- Thing[3].TextTransparency=Thing[3].TextTransparency+.1
- else
- Thing[1].Parent=nil
- table.remove(Effects,e)
- end
- end
- if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" then
- if Thing[1].Transparency<=1 then
- if Thing[2]=="Block1" then
- Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Block2" then
- Thing[1].CFrame=Thing[1].CFrame
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Cylinder" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Cylinder2" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- if Thing[1].Transparency>=.5 then
- Thing[1].BrickColor=BrickColor.new("White")
- end
- elseif Thing[2]=="Blood" then
- Mesh=Thing[7]
- Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Elec" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Disappear" then
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- end
- else
- table.remove(Effects,e)
- Thing[1].Parent=nil
- end
- end
- end
- --end
- end
- end
- end
- endlocal p = game.Players.LocalPlayer
- local char = p.Character
- local mouse = p:GetMouse()
- local larm = char["Left Arm"]
- local rarm = char["Right Arm"]
- local lleg = char["Left Leg"]
- local rleg = char["Right Leg"]
- local hed = char.Head
- local Torso = char.Torso
- local hum = char.Humanoid
- local cam = game.Workspace.CurrentCamera
- local root = char.HumanoidRootPart
- local deb = false
- local shot = 0
- local potential = false
- local debris=game:service"Debris"
- local l = game:GetService("Lighting")
- local rs = game:GetService("RunService").RenderStepped
- ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
- math.randomseed(os.time())
- for i,v in pairs(char:children()) do
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- char["Body Colors"].HeadColor = BrickColor.new("White")
- char["Body Colors"].LeftArmColor = BrickColor.new("White")
- char["Body Colors"].RightArmColor = BrickColor.new("White")
- char["Body Colors"].TorsoColor = BrickColor.new("White")
- char["Body Colors"].RightLegColor = BrickColor.new("White")
- char["Body Colors"].LeftLegColor = BrickColor.new("White")
- Player=game:GetService("Players").LocalPlayer
- Character=Player.Character
- PlayerGui=Player.PlayerGui
- Backpack=Player.Backpack
- Torso=Character.Torso
- Head=Character.Head
- Humanoid=Character.Humanoid
- Mouse=Player:GetMouse()
- RootPart = Character.HumanoidRootPart
- RootJoint = RootPart.RootJoint
- LeftArm=Character["Left Arm"]
- LeftLeg=Character["Left Leg"]
- RightArm=Character["Right Arm"]
- RightLeg=Character["Right Leg"]
- LS=Torso["Left Shoulder"]
- LH=Torso["Left Hip"]
- RS=Torso["Right Shoulder"]
- RH=Torso["Right Hip"]
- Neck=Torso.Neck
- it=Instance.new
- vt=Vector3.new
- cf=CFrame.new
- euler=CFrame.fromEulerAnglesXYZ
- angles=CFrame.Angles
- local decreaseatk=0
- local decreasedef=0
- local decreasemvmt=0
- local Anim="Idle"
- local Effects={}
- local armorparts={}
- local armorwelds={}
- local weaponparts={}
- local weaponwelds={}
- local necko=euler(0,0,0)*cf(0,1,0)
- local attack=false
- local jump=false
- local start=false
- local move=10
- local hitfloor,posfloor=nil,nil
- local run=Instance.new("NumberValue")
- run.Name="DecreaseMvmt"
- run.Value=-1.2
- local bName="Sthomas"
- local MainColor=BrickColor.new("Really black")
- local SubColor=BrickColor.new("Really black")
- --[[if script:findFirstChild("SiegmundHealth")~=nil then
- for _,c in pairs(game.Players:children()) do
- d=script.SiegmundHealth:Clone()
- d.Parent=c.PlayerGui
- end
- end]]
- function NoOutline(Part)
- Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
- end
- Character.Animate:Remove()
- Character.Humanoid.Animator:Remove()
- local Create = LoadLibrary("RbxUtility").Create
- ArtificialHB = Create("BindableEvent", script){
- Parent = script,
- Name = "Heartbeat",
- }
- script:WaitForChild("Heartbeat")
- frame = 1 / 30
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- --[[frame,t,lastframe = 1/30,0,tick()
- allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
- tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
- swait = function(dt)
- if dt == nil then
- dt = frame
- elseif dt < frame then
- dt = frame
- elseif dt > frame then
- --round this out into frames
- dt = math.floor(dt/frame)
- end
- local timetomeet = tick() + dt
- end]] --maybe later
- --30hz Pacemaker
- script:WaitForChild("Heartbeat")
- frame = 1/30
- tf = 0
- allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame*2 or greater.
- tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
- lastframe = tick()
- script.Heartbeat:Fire() --ayy lmao
- game:GetService("RunService").Heartbeat:connect(function(s,p) --herp derp
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe=tick()
- else
- --print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame*(math.floor(t/frame))))
- for i=1, math.floor(tf/frame) do
- script.Heartbeat:Fire()
- end
- lastframe=tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf/frame)
- end
- end
- end)
- 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 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 = math.acos(cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((1-t)*theta)*invSinTheta
- finishInterp = math.sin(t*theta)*invSinTheta
- else
- startInterp = 1-t
- finishInterp = t
- end
- else
- if (1+cosTheta) > 0.0001 then
- local theta = math.acos(-cosTheta)
- local invSinTheta = 1/math.sin(theta)
- startInterp = math.sin((t-1)*theta)*invSinTheta
- finishInterp = math.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 part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
- local fp=it("Part")
- fp.formFactor=formfactor
- fp.Parent=parent
- fp.Reflectance=reflectance
- fp.Transparency=transparency
- fp.CanCollide=false
- fp.Locked=true
- fp.BrickColor=brickcolor
- fp.Name=name
- fp.Size=size
- NoOutline(fp)
- fp.Material="SmoothPlastic"
- fp:BreakJoints()
- return fp
- end
- function mesh(Mesh,part,meshtype,meshid,offset,scale)
- local mesh=it(Mesh)
- mesh.Parent=part
- if Mesh=="SpecialMesh" then
- mesh.MeshType=meshtype
- if meshid~="nil" then
- mesh.MeshId="http://www.roblox.com/asset/?id="..meshid
- end
- end
- mesh.Offset=offset
- mesh.Scale=scale
- return mesh
- end
- function weld(parent,part0,part1,c0)
- local weld=it("Motor")
- weld.Parent=parent
- weld.Part0=part0
- weld.Part1=part1
- weld.C0=c0
- return weld
- end
- function gui(GuiType,parent,text,backtrans,backcol,pos,size,image)
- local gui=it(GuiType)
- gui.Parent=parent
- gui.BackgroundTransparency=backtrans
- gui.BackgroundColor3=backcol
- gui.SizeConstraint="RelativeXY"
- gui.Position=pos
- gui.Size=size
- if GuiType=="TextLabel" then
- gui.Text=text
- gui.TextXAlignment="Center"
- gui.TextYAlignment="Center"
- gui.Font="SourceSans"
- gui.FontSize="Size14"
- gui.TextWrapped=false
- gui.TextStrokeTransparency=0
- gui.TextColor=BrickColor.new("White")
- elseif GuiType=="ImageLabel" then
- gui.Image="rbxassetid://"..image
- gui.ImageColor3=backcol
- end
- return gui
- end
- local Characte=Instance.new("Model")
- Characte.Parent=Character
- Characte.Name=bName
- --local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
- local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
- --local LeftArm=part(0,Character,0,0,MainColor,"Left Arm",vt(1,2,1))
- local LeftArmc=part(0,Character,0,0,SubColor,"Left Arm Copy",vt(1,2,1))
- --local RightArm=part(0,Character,0,0,MainColor,"Right Arm",vt(1,2,1))
- local RightArmc=part(0,Character,0,0,SubColor,"Right Arm Copy",vt(1,2,1))
- --local LeftLeg=part(0,Character,0,0,MainColor,"Left Leg",vt(1,2,1))
- local LeftLegc=part(0,Character,0,0,SubColor,"Left Leg Copy",vt(1,2,1))
- --local RightLeg=part(0,Character,0,0,MainColor,"Right Leg",vt(1,2,1))
- local RightLegc=part(0,Character,0,0,SubColor,"Right Leg Copy",vt(1,2,1))
- --local Head=part(0,Character,0,0,BrickColor.new("Pastel brown"),"Head",vt(2,1,1))
- --[[local Torso=part(0,Character,0,0,MainColor,"Torso",vt(2,2,1))
- local Torsoc=part(0,Character,0,0,SubColor,"Torso Copy",vt(2,2,1))
- local LeftArm=part(0,Character,0,0,SubColor,"Left Arm",vt(1,2,1))
- local LeftArmc=part(0,Character,0,0,MainColor,"Left Arm Copy",vt(1,2,1))
- local RightArm=part(0,Character,0,0,SubColor,"Right Arm",vt(1,2,1))
- local RightArmc=part(0,Character,0,0,MainColor,"Right Arm Copy",vt(1,2,1))
- local LeftLeg=part(0,Character,0,0,SubColor,"Left Leg",vt(1,2,1))
- local LeftLegc=part(0,Character,0,0,MainColor,"Left Leg Copy",vt(1,2,1))
- local RightLeg=part(0,Character,0,0,SubColor,"Right Leg",vt(1,2,1))
- local RightLegc=part(0,Character,0,0,MainColor,"Right Leg Copy",vt(1,2,1))]]
- --local RootPart=part(0,Character,0,1,MainColor,"HumanoidRootPart",vt(2,2,1))
- local Cape=part(0,Character,0,0,BrickColor.new("White"),"Hat",vt())
- Head.CanCollide=true
- Torso.CanCollide=true
- LeftArm.CanCollide=true
- RightArm.CanCollide=true
- LeftLeg.CanCollide=true
- RightLeg.CanCollide=true
- RootPart.CanCollide=false
- Head.face:Remove()
- face=Instance.new("Decal",Head)
- face.Face="Front"
- --face.Texture="http://www.roblox.com/asset/?id="
- face.Texture="http://www.roblox.com/asset/?id="
- local HMesh=mesh("SpecialMesh",Head,"Head","nil",vt(0,0,0),vt(1.25,1.25,1.25))
- local TMsh=mesh("SpecialMesh",Torso,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(1.8,1,.8))
- local LAMsh=mesh("SpecialMesh",LeftArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
- local RAMsh=mesh("SpecialMesh",RightArm,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,.8,.8))
- local LLMsh=mesh("SpecialMesh",LeftLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
- local RLMsh=mesh("SpecialMesh",RightLeg,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(.8,1,.8))
- local TcMsh=mesh("SpecialMesh",Torsoc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-2,-1,-1))
- local LAcMsh=mesh("SpecialMesh",LeftArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
- local RAcMsh=mesh("SpecialMesh",RightArmc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1,-1))
- local LLcMsh=mesh("SpecialMesh",LeftLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
- local RLcMsh=mesh("SpecialMesh",RightLegc,"FileMesh","rbxasset://fonts/leftarm.mesh",vt(0,0,0),vt(-1,-1.2,-1))
- TMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RAMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RLMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- TcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RAcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- LLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- RLcMsh.MeshId="rbxasset://fonts/leftarm.mesh"
- local Cmsh=mesh("SpecialMesh",Cape,"FileMesh","http://www.roblox.com/asset/?id=250281794",vt(0,0,0),vt(1,1,1))
- --[[local Neck=weld(Torso,Torso,Head,cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
- Neck.C1=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)]]
- local Neck=weld(Torso,Torso,Head,euler(0,0,0)*cf(0,1,0))
- Neck.C1=cf(0,-.5,0)
- local RW=weld(Torso,Torso,RightArm,cf(1.5,.5,0))
- RW.C1=cf(0,.5,0)
- local RWc=weld(Torso,RightArm,RightArmc,cf(0,0,0))
- local LW=weld(Torso,Torso,LeftArm,cf(-1.5,.5,0))
- LW.C1=cf(0,.5,0)
- local LWc=weld(Torso,LeftArm,LeftArmc,cf(0,0,0))
- local RH=weld(Torso,Torso,RightLeg,cf(.5,-1,0))
- RH.C1=cf(0,1,0)
- local RHc=weld(Torso,RightLeg,RightLegc,cf(0,0,0))
- local LH=weld(Torso,Torso,LeftLeg,cf(-.5,-1,0))
- LH.C1=cf(0,1,0)
- local LHc=weld(Torso,LeftLeg,LeftLegc,cf(0,0,0))
- local RootJoint=weld(Torso,Torso,RootPart,cf(0,0,0))
- local RootJointc=weld(Torso,Torso,Torsoc,cf(0,0,0))
- --local Cwld=weld(Torso,Cape,Head,euler(0,0,0)*cf(0,2,-.3))
- local Cwld=weld(Torso,Cape,Torso,euler(0,0,0)*cf(0,.5,-.3))
- --Torso.CFrame=cf(math.random(-5000,5000)/100,math.random(-5000,5000)/100,math.random(-5000,5000)/100)
- --Torso.CFrame=cf(0,0,0)
- --Torso.CFrame=workspace.Map.BossSpawn.CFrame*cf(0,5,0)
- local hitbox=part(3,nil,0,1,BrickColor.new("White"),"Hitbox",vt(1,1,1))
- --hitbox.Anchored=true
- local hitbox2=part(3,nil,0,1,BrickColor.new("White"),"Hitbox",vt(1,1,1))
- hitbox2.Anchored=true
- local hitboxCF=cf(0,0,0)
- --[[local Humanoid=Instance.new("Humanoid")
- Humanoid.Parent=Character
- TehHealth=700
- --TehHealth=2000
- Humanoid.MaxHealth=TehHealth
- Humanoid.Health=TehHealth
- coroutine.resume(coroutine.create(function()
- for i=1,20 do
- wait()
- Humanoid.Health=Humanoid.MaxHealth
- end
- Humanoid:TakeDamage(1)
- end))]]
- local Stats=Instance.new("BoolValue")
- Stats.Name="Stats"
- Stats.Parent=Character
- local Atk=Instance.new("NumberValue")
- Atk.Name="Damage"
- Atk.Parent=Stats
- Atk.Value=1
- local Def=Instance.new("NumberValue")
- Def.Name="Defense"
- Def.Parent=Stats
- Def.Value=1
- local Mvmt=Instance.new("NumberValue")
- Mvmt.Name="Movement"
- Mvmt.Parent=Stats
- Mvmt.Value=1
- local Block=Instance.new("BoolValue")
- Block.Name="Block"
- Block.Parent=Stats
- Block.Value=false
- local Stun=Instance.new("NumberValue")
- Stun.Name="Stun"
- Stun.Parent=Stats
- Stun.Value=0
- local StunT=Instance.new("NumberValue")
- StunT.Name="StunThreshold"
- StunT.Parent=Stats
- StunT.Value=100
- local Rooted=Instance.new("BoolValue")
- Rooted.Name="Rooted"
- Rooted.Parent=Stats
- Rooted.Value=false
- local Stunned=Instance.new("BoolValue")
- Stunned.Name="Stunned"
- Stunned.Parent=Stats
- Stunned.Value=false
- local Stagger=Instance.new("BoolValue")
- Stagger.Name="Stagger"
- Stagger.Parent=Stats
- Stagger.Value=false
- local StaggerHit=Instance.new("BoolValue")
- StaggerHit.Name="StaggerHit"
- StaggerHit.Parent=Stats
- StaggerHit.Value=false
- local RecentEnemy=Instance.new("ObjectValue")
- RecentEnemy.Name="RecentEnemy"
- RecentEnemy.Parent=Stats
- RecentEnemy.Value=nil
- local Decrease=Instance.new("BoolValue")
- Decrease.Name="Decrease"
- Decrease.Parent=Stats
- Decrease.Value=false
- local mana=Instance.new("NumberValue")
- mana.Name="Mana"
- mana.Parent=Stats
- mana.Value=0
- local boss=Instance.new("BoolValue")
- boss.Name="Boss"
- boss.Parent=Stats
- boss.Value=true
- local alive=Instance.new("BoolValue")
- alive.Name="Alive"
- alive.Parent=Character
- alive.Value=true
- local btarget=Instance.new("ObjectValue")
- btarget.Name="Target"
- btarget.Parent=Stats
- btarget.Value=nil
- local passive1=Instance.new("NumberValue",Decrease)
- passive1.Name="DecreaseAtk"
- passive1.Value=-.4
- local passive2=Instance.new("NumberValue",Decrease)
- passive2.Name="DecreaseDef"
- passive2.Value=-.1
- local passive3=Instance.new("NumberValue",Decrease)
- passive3.Name="DecreaseMvmt"
- passive3.Value=.1
- so = function(id,par,vol,pit)
- local sou = Instance.new("Sound",par or workspace)
- sou.Volume=1.5
- sou.Pitch=pit or 1
- sou.SoundId="http://www.roblox.com/asset/?id="..id
- --swait()
- sou:play()
- game:GetService("Debris"):AddItem(sou,6)
- end
- local function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CFrame.new(at.x, at.y, at.z,
- right.x, top.x, back.x,
- right.y, top.y, back.y,
- right.z, top.z, back.z)
- end
- function Triangle(a, b, c)
- local edg1 = (c-a):Dot((b-a).unit)
- local edg2 = (a-b):Dot((c-b).unit)
- local edg3 = (b-c):Dot((a-c).unit)
- if edg1 <= (b-a).magnitude and edg1 >= 0 then
- a, b, c = a, b, c
- elseif edg2 <= (c-b).magnitude and edg2 >= 0 then
- a, b, c = b, c, a
- elseif edg3 <= (a-c).magnitude and edg3 >= 0 then
- a, b, c = c, a, b
- else
- assert(false, "unreachable")
- end
- local len1 = (c-a):Dot((b-a).unit)
- local len2 = (b-a).magnitude - len1
- local width = (a + (b-a).unit*len1 - c).magnitude
- local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit)
- local list = {}
- if len1 > 0.01 then
- local w1 = Instance.new('WedgePart', m)
- w1.Name = "Triangle"
- game:GetService("Debris"):AddItem(w1,5)
- w1.Material = "SmoothPlastic"
- w1.FormFactor = 'Custom'
- w1.BrickColor = BrickColor.new("Teal")
- w1.Transparency = 0
- w1.Reflectance = 0
- w1.Material = "SmoothPlastic"
- w1.CanCollide = false
- NoOutline(w1)
- local sz = Vector3.new(0.2, width, len1)
- w1.Size = sz
- local sp = Instance.new("SpecialMesh",w1)
- sp.MeshType = "Wedge"
- sp.Scale = Vector3.new(0,1,1) * sz/w1.Size
- w1:BreakJoints()
- w1.Anchored = true
- w1.Parent = workspace
- w1.Transparency = 0.7
- table.insert(Effects,{w1,"Disappear",.05})
- w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2)
- table.insert(list,w1)
- end
- if len2 > 0.01 then
- local w2 = Instance.new('WedgePart', m)
- w2.Name = "Triangle"
- game:GetService("Debris"):AddItem(w2,5)
- w2.Material = "SmoothPlastic"
- w2.FormFactor = 'Custom'
- w2.BrickColor = BrickColor.new("Teal")
- w2.Transparency = 0
- w2.Reflectance = 0
- w2.Material = "SmoothPlastic"
- w2.CanCollide = false
- NoOutline(w2)
- local sz = Vector3.new(0.2, width, len2)
- w2.Size = sz
- local sp = Instance.new("SpecialMesh",w2)
- sp.MeshType = "Wedge"
- sp.Scale = Vector3.new(0,1,1) * sz/w2.Size
- w2:BreakJoints()
- w2.Anchored = true
- w2.Parent = workspace
- w2.Transparency = 0.7
- table.insert(Effects,{w2,"Disappear",.05})
- w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2)
- table.insert(list,w2)
- end
- return unpack(list)
- end
- function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- if Type==1 or Type==nil then
- table.insert(Effects,{prt,"Block1",delay,x3,y3,z3,msh})
- elseif Type==2 then
- table.insert(Effects,{prt,"Block2",delay,x3,y3,z3,msh})
- end
- end
- function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Sphere","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
- end
- function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
- prt.Anchored=true
- prt.CFrame=cframe*cf(x2,y2,z2)
- local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function MagicCylinder3(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,Character,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder2",delay,x3,y3,z3,msh})
- end
- function MagicHead(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"Head","nil",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- function ClangEffect(brickcolor,cframe,duration,decrease,size,power)
- local prt=part(3,workspace,0,1,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(5,5,5))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"CylinderClang",duration,decrease,size,power,prt.CFrame,nil})
- end
- function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
- local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(.2,.2,.2))
- prt.Anchored=true
- prt.CFrame=cframe
- local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1))
- game:GetService("Debris"):AddItem(prt,3)
- table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3,msh})
- end
- --[[local BodGy=Instance.new("BodyGyro")
- BodGy.maxTorque=Vector3.new(0,4e+005,0)
- BodGy.P=2000
- BodGy.D=100
- BodGy.Name="SiegmundGyro"
- CF=RootPart.CFrame
- BodGy.Parent=RootPart
- BodGy.cframe=CF]]
- --[[Neck.C0=euler(0,0,0)*cf(0,3,0)*euler(0,.6,0)*euler(-.2,0,0)
- RootJoint.C0=cf(0,-2,0)*euler(0,.6,0)
- RW.C0=cf(4.5,1.5,0)*euler(-.4,0,.5)*euler(0,0,0)
- RW.C1=cf(0,1.5,0)*euler(0,0,0)
- LW.C0=cf(-4.5,1.5,0)*euler(.2,0,-.5)
- LW.C1=cf(0,1.5,0)*euler(0,0,0)
- RH.C0=cf(1.5,-3,0)*euler(0,-.6,0)*euler(0,0,.1)
- RH.C1=cf(0,3,0)*euler(0,0,0)
- LH.C0=cf(-1.5,-3,0)*euler(0,.6,0)*euler(.1,0,0)
- LH.C1=cf(0,3,0)*euler(0,0,0)]]
- --[[RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(3,0,0.5),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,necko*euler(0.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,-1)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(-1.2,1.57,0),.3)
- LH.C0=clerp(LH.C0,cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0),.3)]]
- function StartAnim()
- attack=true
- --workspace.CurrentCamera.CameraSubject=Head
- Neck.C0=necko*euler(-0.4,0,0)
- RootJoint.C0=euler(.2,0,0)
- RW.C0=cf(1.5,0.5,0)*euler(-.3,0,0.2)
- RW.C1=cf(0,0.5,0)*euler(0,0,0)
- LW.C0=cf(-1.5,0.5,0)*euler(-.3,0,-0.2)
- LW.C1=cf(0,0.5,0)*euler(0,0,0)
- RH.C0=cf(.5,-1,0)*euler(0.4,1.57,0)
- LH.C0=cf(-.5,-1,0)*euler(-0.2,-1.57,0)
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
- while hitfloor==nil do
- swait()
- end
- print("endderp")
- so("http://roblox.com/asset/?id=157878578",Torso,1,0.8)
- so("http://roblox.com/asset/?id=2760979",Torso,1,0.4)
- MagicWave(BrickColor.new("Medium stone grey"),cf(Torso.Position)*cf(0,-1,0),1,1,1,1.5,1,1.5,0.05)
- --MagniDamage(Torso,15,6,8,math.random(20,40),"Knockdown2",Torso,0,1,math.random(8,10),nil,nil,true)
- for i=0,1,0.05 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
- end
- attack=false
- end
- --[[RW.C0=cf(1.5,0.5,0)*euler(0,0,1.2)
- LW.C0=cf(-1.5,0.5,0)*euler(0,0,-1.2)
- Neck.C0=necko*euler(-.4,0,0)
- RootJoint.C0=cf(0,1,0)*euler(0,0,0)
- RH.C0=cf(1,-1,0)*euler(-1.2,1.57,0)
- LH.C0=cf(-1.1,-.5,-0.5)*euler(-0.2,-1.3,0)]]
- local BodGy=Instance.new("BodyGyro")
- BodGy.maxTorque=Vector3.new(0,4e+005,0)
- BodGy.P=2000
- BodGy.D=100
- BodGy.Name="SthomasGyro"
- CF=RootPart.CFrame
- BodGy.Parent=RootPart
- BodGy.cframe=CF
- wait()
- print("Spanda spawned.")
- function StunAnim()
- attack=true
- Stunned.Value=true
- showDamage(Character,"Stunned","Interrupt")
- local dec=Instance.new("NumberValue",Decrease)
- dec.Name="DecreaseMvmt"
- dec.Value=10
- for i=0,1,0.3 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.2,.5,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(-.2,3,0),.2)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1.3),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1,0,.4)*euler(0,-.1,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.3),.25)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.2,0,0),.25)
- end
- for i=0,1,0.3 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.3,.5,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-.5)*euler(-.8,3,0),.2)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.4)*euler(1.2,0,.8)*euler(0,-.1,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.5,0,.6),.25)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(.1,0,.7),.25)
- end
- for i=0,1,0.3 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.3,-1,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1.57,3,0),.2)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.8,0,1.3),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,-.8)*euler(0,-.1,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-.6,0)*euler(0,1.57,0)*euler(-.2,0,.6),.25)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,0)*euler(0,-1.57,0)*euler(-.1,0,.3),.25)
- end
- local gairost=Instance.new("BodyGyro")
- gairost.Parent=RootPart
- gairost.maxTorque=Vector3.new(4e+005,0,4e+005)*math.huge
- gairost.P=20e+003
- gairost.cframe=cf(0,0,0)
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2.5)*euler(-1.57,3.14,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1.5)*euler(.2,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.5,0,-1.57)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,0),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.1,.2,0),.3)
- end
- for i=1,200 do
- swait()
- gairost.cframe=RootPart.CFrame
- end
- for i=0,1,0.2 do
- swait()
- Stun.Value=0
- gairost.cframe=RootPart.CFrame
- Neck.C0=clerp(Neck.C0,necko*euler(0,.2,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,-2)*euler(-1,4,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.57,0,1)*euler(.2,-1,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.2,0,.2)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.3,.5,.4),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-1)*euler(0,-1.57,0)*euler(-.1,.2,1),.3)
- end
- gairost.Parent=nil
- dec.Parent=nil
- Stun.Value=0
- Stunned.Value=false
- attack=false
- for i=1,10 do
- swait()
- Stun.Value=0
- end
- end
- function PunchSlam()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,-.5,0)*euler(-.2,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(.1,0,0)*cf(0,.2,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.2,0,.8)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,-.5,-.05),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,.4),.3)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*3
- so("169445092",LeftArm,1,1.2)
- for i=0,1,0.1 do
- swait()
- MagniDamage(LeftArm,2,8,10,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
- --MagniDamage(LeftArm,2,6,8,0,"Normal",RootPart,.3,1,math.random(6,7),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(-.1,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*euler(.2,0,0)*cf(0,.2,1),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- --LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1.7,0,.2)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.9,-.2)*euler(0,1.57,0)*euler(0,.4,-.3),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.9,-.2)*euler(0,-1.57,0)*euler(0,.5,0),.3)
- if i<.3 then
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.7,0,-.2)*euler(0,0,0),.3)
- else
- LW.C0=clerp(LW.C0,cf(-1.2,0.5,-.2)*euler(1.7,0,.1)*euler(0,0,0),.3)
- end
- end
- if RecentEnemy.Value~=nil then
- Torso.Velocity=vt(0,0,0)
- target,distance=findNearestTorso(Torso.Position)
- if target~=nil then
- BodGy.cframe=cf(Torso.Position,target.Position)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*3
- refd=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- refd.Anchored=true
- game:GetService("Debris"):AddItem(refd,5)
- so("169445092",RightArm,1,1.2)
- for i=0,1,0.1 do
- swait()
- refd.CFrame=cf(posfloor)
- MagniDamage(LeftArm,4,10,12,math.random(30,35),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
- if i<.6 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
- else
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
- end
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)
- end
- refd.Parent=nil
- --swait(100)
- end
- attack=false
- end
- function SweepCut()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,1.3,0)*euler(-.5,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-.5,0,0)*cf(0,.4,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,.5)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.7,-.4)*euler(0,1.57,0)*euler(-.5,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.3,-.4,-.7)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.7,0,0),.3)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*5
- so("169445073",LeftLeg,1,1.2)
- for i=0,1,0.1 do
- swait()
- MagniDamage(LeftLeg,2,7,9,0,"Knockdown2",RootPart,.2,2,math.random(6,7),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(0,1,0)*euler(-.5,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,1.3,0)*euler(-1,0,0)*cf(0,1.2,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(.8,0,.3)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,1)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.6,-.7,-.8)*euler(0,1.57,0)*euler(-.3,0,-1.2),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-.8,-.2)*euler(0,-1.57,0)*euler(0,0,-.1)*euler(-.5,0,0),.3)
- end
- Torso.Velocity=vt(0,0,0)
- if RecentEnemy.Value~=nil then
- target,distance=findNearestTorso(Torso.Position)
- if target~=nil then
- BodGy.cframe=cf(Torso.Position,target.Position)
- end
- Torso.Velocity=RootPart.CFrame.lookVector*move*3
- refd=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- refd.Anchored=true
- game:GetService("Debris"):AddItem(refd,5)
- so("169445092",RightArm,1,1)
- for i=0,1,0.2 do
- swait()
- refd.CFrame=cf(posfloor)
- MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
- --MagniDamage(LeftArm,4,6,8,math.random(30,35),"Knockdown2",refd,.5,1,math.random(3,4),nil,nil)
- --[[Neck.C0=clerp(Neck.C0,necko*euler(0,-1.57,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,0,.2)*euler(0,-1.57,0),.3)
- if i<.6 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,0),.5)
- else
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.57)*euler(0,3.14,-1.2)*euler(-.5,0,0),.2)
- end
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.57)*euler(0,0,1),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,.2)*euler(0,1.57,0)*euler(.2,-1.57,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-.2)*euler(0,-1.57,0)*euler(-.4,-1.57,0),.2)]]
- Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.4)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,-.5,0)*euler(0,0,0)*cf(0,.6,0),.4)
- RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.8,0,-.8)*euler(0,0,0),.4)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-.7)*euler(0,0,0),.4)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.4)
- RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,0),.4)
- LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,0),.4)
- end
- for i=0,1,0.1 do
- swait()
- MagniDamage(RightArm,4,10,12,math.random(40,45),"Knockdown2",refd,.3,1,math.random(3,4),nil,nil)
- Torso.Velocity=vt(0,60,0)
- Neck.C0=clerp(Neck.C0,necko*euler(0,.1,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
- RootJoint.C1=RootJoint.C1*euler(0,.5,0)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(2.5,0,-.2)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-.5,0)*euler(0,1.57,0)*euler(-.2,0,-.2),.3)
- LH.C0=clerp(LH.C0,cf(-.5,-.5,0)*euler(0,-1.57,0)*euler(-.2,0,.2),.3)
- end
- refd.Parent=nil
- RootJoint.C1=cf(0,0,0)
- end
- --swait(100)
- attack=false
- end
- function MultiKick()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(.1,.7,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(.1,.8,0)*euler(0,0,0)*cf(0,.6,0),.3)
- RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.4,0,.4)*euler(0,-.5,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1,0,.2)*euler(0,1,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.3,-.6)*euler(.05,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.2,-.4)*euler(.2,0,0),.3)
- end
- Look=RootPart.CFrame.lookVector*move*2
- local n=8
- for i=0,1,0.04 do
- swait()
- n=n+1
- if n>=8 then
- n=0
- so("169445073",LeftLeg,1,1.2)
- end
- Torso.Velocity=Look
- MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
- RootJoint.C1=RootJoint.C1*euler(0,.6,0)
- RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
- end
- if RecentEnemy.Value~=nil then
- RecentEnemy.Value=nil
- target,distance=findNearestTorso(Torso.Position)
- if target~=nil then
- RootPart.CFrame=cf(RootPart.Position,target.Position)
- end
- Look=RootPart.CFrame.lookVector*move
- for i=0,1,0.04 do
- swait()
- n=n+1
- if n>=8 then
- n=0
- so("169445073",LeftLeg,1,1.2)
- end
- Torso.Velocity=Look
- MagniDamage(LeftLeg,2,5,7,math.random(5,10),"Knockdown2",RootPart,.2,2,math.random(4,5),nil,nil)
- Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,0,0),.3)
- RootJoint.C1=RootJoint.C1*euler(0,.6,0)
- RW.C0=clerp(RW.C0,cf(1,0.4,.5)*euler(1.2,0,.4)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.4,.5)*euler(1.2,0,-.4)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.5)*euler(.2,0,0),.3)
- end
- Torso.Velocity=vt(0,0,0)
- end
- RootJoint.C1=cf(0,0,0)
- attack=false
- end
- function JumpKick()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,cf(0,1,0)*euler(0,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0,0,1.2),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0,0,-1.2),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(-1.2,1.57,0),.3)
- LH.C0=clerp(LH.C0,cf(-.6,-.5,-0.5)*euler(-0.2,-1.3,0),.3)
- end
- Torso.Velocity=vt(0,100,0)
- jump=true
- local dec=Instance.new("NumberValue",Decrease)
- dec.Name="DecreaseMvmt"
- dec.Value=-.4
- for i=0,1,0.05 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(-.1,0,0)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*euler(0,0,0)*cf(0,4,-3),.2)
- RootJoint.C1=RootJoint.C1*euler(-.32,0,0)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.2,0,1)*euler(0,0,0),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.2,0,-1)*euler(0,0,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.7,-.5,-.7)*euler(0,1.57,0)*euler(0,-.3,-1)*euler(0,0,0),.2)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.5)*euler(0,-1.57,0)*euler(0,.2,-1.8)*euler(.2,0,0),.2)
- end
- while hitfloor==nil do
- swait()
- MagniDamage(LeftLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
- MagniDamage(RightLeg,5,8,10,math.random(15,25),"Knockdown2",RootPart,.2,2,math.random(8,10),nil,nil)
- end
- jump=false
- dec.Parent=nil
- RootJoint.C1=cf(0,0,0)
- attack=false
- end
- function EnergyBlam()
- attack=true
- for i=0,1,0.1 do
- swait()
- Neck.C0=clerp(Neck.C0,necko*euler(0,-1,0)*euler(-.2,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,-1,0)*cf(0,.4,0),.3)
- RW.C0=clerp(RW.C0,cf(1.3,0.5,-.2)*euler(1.4,0,-.5)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,.5,-.1),.3)
- LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,-1,.2),.3)
- end
- so("2101137",Torso,1,1)
- for i=0,1,0.05 do
- swait()
- MagicCircle(BrickColor.new("Really black"),Torso.CFrame*cf(0,0,-2),1,1,1,1,1,1,.1)
- MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,0,-2),1,1,1,.5,.5,.5,.1)
- end
- for i=0,1,0.1 do
- swait()
- MagicCircle(BrickColor.new("Really black"),Torso.CFrame*cf(0,.5,-2),1,1,1,1,1,1,.1)
- MagicCircle(BrickColor.new("White"),Torso.CFrame*cf(0,.5,-2),1,1,1,.5,.5,.5,.1)
- Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.4,0),.3)
- RW.C0=clerp(RW.C0,cf(1,0.5,-.5)*euler(1.5,0,-.5)*euler(0,0,0),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1,0.5,-.5)*euler(1.5,0,.5)*euler(0,0,0),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.7,-.8,-.4)*euler(0,1.57,0)*euler(0,0,-.1),.3)
- LH.C0=clerp(LH.C0,cf(-.4,-.9,0)*euler(0,-1.57,0)*euler(0,0,.2),.3)
- end
- ref=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- ref.Anchored=false
- --ref.CFrame=cf(head.Position)
- local rwld=weld(Torso,Torso,ref,cf(0,.5,-2.5))
- game:GetService("Debris"):AddItem(ref,10)
- ref2=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- ref2.Anchored=false
- --ref.CFrame=cf(head.Position)
- game:GetService("Debris"):AddItem(ref2,10)
- local tehCF=nil
- --[[target,distance=findNearestTorso(Torso.Position)
- if target~=nil then]]
- tehCF=cf(ref.Position,Mouse.Hit.p)
- --end
- nuh=5
- for i=0,1,0.05 do
- swait()
- nuh=nuh+1
- if nuh>=5 then
- nuh=0
- so("169380505",ref2,1,1.5)
- end
- --[[target,distance=findNearestTorso(Torso.Position)
- if target~=nil then]]
- hit,pos=rayCast(ref.Position,tehCF.lookVector,100,Character)
- local mag=(ref.Position-pos).magnitude
- MagicCylinder3(BrickColor.new("White"),CFrame.new((ref.Position+pos)/2,pos)*angles(1.57,0,0),6,mag*5,6,2,1,2,0.1)
- MagicCircle2(BrickColor.new("White"),cf(pos),10,10,10,10,10,10,.1)
- ref2.CFrame=cf(pos)
- MagniDamage(ref2,10,12,16,0,"Normal",ref2,.2,1,math.random(2,4),nil,nil,true)
- --end
- end
- ref.Parent=nil
- ref2.Parent=nil
- attack=false
- end
- function DecreaseStat(Model,Stat,Amount,Duration)
- if Model:findFirstChild("Stats")~=nil then
- if Model.Stats[Stat]~=nil then
- Model.Stats[Stat].Value=Model.Stats[Stat].Value-Amount
- d=Instance.new("NumberValue",Model.Stats.Decrease)
- game:GetService("Debris"):AddItem(d,40)
- if Stat=="Damage" then
- d.Name="DecreaseAtk"
- elseif Stat=="Defense" then
- d.Name="DecreaseDef"
- elseif Stat=="Movement" then
- d.Name="DecreaseMvmt"
- end
- if Model:findFirstChild("Torso")~=nil then
- display=""
- if Stat=="Damage" then
- if Amount>0 then
- display="-Damage"
- else
- display="+Damage"
- end
- elseif Stat=="Defense" then
- if Amount>0 then
- display="-Defense"
- else
- display="+Defense"
- end
- elseif Stat=="Movement" then
- if Amount>0 then
- display="-Movement"
- else
- display="+Movement"
- end
- end
- showDamage(Model,display,"Debuff")
- end
- d.Value=Amount
- table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
- end
- end
- end
- function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
- return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
- end
- --[[function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2.Name~=bName) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if btarget.Value==nil then
- if (temp.Position - pos).magnitude < dist then
- local dohit=true
- if temp2:findFirstChild("Stats")~=nil then if temp2.Stats:findFirstChild("Boss")~=nil then if temp2.Stats.Boss.Value==true then dohit=false end end end
- if temp2:findFirstChild("Alive")==nil then dohit=false end
- if dohit==true then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- else
- if btarget.Value.Parent~=nil then
- if btarget.Value:findFirstChild("Torso")~=nil then
- if btarget.Value:findFirstChild("Humanoid")~=nil then
- if btarget.Value.Humanoid.Health<=0 then
- btarget.Value=nil
- end
- end
- if btarget.Value~=nil then
- torso=btarget.Value.Torso
- dist = (torso.Position - pos).magnitude
- end
- end
- else
- btarget.Value=nil
- end
- end
- end
- end
- end
- return torso,dist
- end]]
- findNearestTorso = function(pos)
- local list = (game.Workspace:children())
- local torso = nil
- local dist = 1000
- local temp, human, temp2 = nil, nil, nil
- for x = 1, #list do
- temp2 = list[x]
- if temp2.className == "Model" and temp2.Name ~= Character.Name then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
- local dohit = true
- if dohit == true then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso, dist
- end
- function findRandomTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 1000
- local temp = nil
- local human = nil
- local temp2 = nil
- local list2 = {}
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2.Name~="Vanta") then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if pos.magnitude < dist then
- torso = temp
- table.insert(list2,temp)
- end
- end
- end
- end
- if #list2>0 then
- rand=math.random(1,#list2)
- return list2[rand],dist
- else
- return nil,dist
- end
- end
- Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration,Sound)
- if hit.Parent==nil then
- return
- end
- h=hit.Parent:FindFirstChild("Humanoid")
- for _,v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h=v
- end
- end
- if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
- h=hit.Parent.Parent:FindFirstChild("Humanoid")
- end
- if hit.Parent.className=="Hat" then
- hit=hit.Parent.Parent:findFirstChild("Head")
- end
- if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
- if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
- if hit.Parent:findFirstChild("Stats")~=nil then if hit.Parent.Stats:findFirstChild("Boss")~=nil then if hit.Parent.Stats.Boss.Value==true then return end end end
- RecentEnemy.Value=hit.Parent
- game:GetService("Debris"):AddItem(c,.5)
- minim=minim*Atk.Value
- maxim=maxim*Atk.Value
- Damage=0
- if minim==maxim or minim>maxim then
- Damage=maxim
- else
- Damage=math.random(minim,maxim)
- end
- blocked=false
- enblock=nil
- Stats=hit.Parent:findFirstChild("Stats")
- if Stats~=nil then
- enblock=Stats:findFirstChild("Block")
- if enblock~=nil then
- if enblock.Value==true then
- blocked=true
- end
- end
- if Stats:findFirstChild("Defense")~=nil then
- Damage=Damage/(Stats.Defense.Value)
- if Damage<=3 and (ranged==false or ranged==nil) and blocked~=true then
- hitnum=math.random(1,3)
- if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
- elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
- elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
- end
- --[[if hitnum==1 then so("199149321",hit,1,1)
- elseif hitnum==2 then so("199149338",hit,1,1)
- elseif hitnum==3 then so("199149367",hit,1,1)
- elseif hitnum==4 then so("199149409",hit,1,1)
- elseif hitnum==5 then so("199149452",hit,1,1)
- end]]
- elseif ranged==false or ranged==nil and blocked~=true then
- hitnum=math.random(1,3)
- if hitnum==1 then so("169380525",hit,1,math.random(80,120)/100)
- elseif hitnum==2 then so("169380538",hit,1,math.random(80,120)/100)
- elseif hitnum==3 then so("169380528",hit,1,math.random(80,120)/100)
- end
- --[[if hitnum==1 then so("199149137",hit,1,1)
- elseif hitnum==2 then so("199149186",hit,1,1)
- elseif hitnum==3 then so("199149221",hit,1,1)
- elseif hitnum==4 then so("199149235",hit,1,1)
- elseif hitnum==5 then so("199149269",hit,1,1)
- elseif hitnum==6 then so("199149297",hit,1,1)
- end]]
- end
- end
- if Stats:findFirstChild("Stun")~=nil then
- if blocked==true then
- incstun=math.floor(incstun/2)
- end
- Stats.Stun.Value=Stats.Stun.Value+incstun
- end
- if Stats:findFirstChild("Stagger")~=nil then
- if stagger==true then
- Stats.Stagger.Value=true
- end
- end
- end
- if blocked==true then
- showDamage(hit.Parent,"Block","Damage")
- hitnum=math.random(1,2)
- if hitnum==1 then so("199148933",hit,1,1)
- elseif hitnum==2 then so("199148947",hit,1,1)
- end
- enblock.Value=false
- else
- Damage=math.floor(Damage)
- h.Health=h.Health-Damage
- --[[coroutine.resume(coroutine.create(function(Hum,Dam)
- damageFunc:InvokeServer(Hum,Dam)
- end),h,Damage)]]
- showDamage(hit.Parent,Damage,"Damage")
- if DecreaseState~=nil then
- if DecreaseState=="Shatter" then
- DecreaseStat(hit.Parent,"Movement",DecreaseAmount,Duration)
- DecreaseStat(hit.Parent,"Damage",DecreaseAmount,Duration)
- else
- DecreaseStat(hit.Parent,DecreaseState,DecreaseAmount,Duration)
- end
- end
- if Type=="Knockdown" then
- hum=hit.Parent.Humanoid
- hum.PlatformStand=true
- coroutine.resume(coroutine.create(function(HHumanoid)
- swait(1)
- HHumanoid.PlatformStand=false
- end),hum)
- local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
- --hit.CFrame=cf(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
- local bodvol=Instance.new("BodyVelocity")
- bodvol.velocity=angle*knockback
- bodvol.P=5000
- bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
- bodvol.Parent=hit
- rl=Instance.new("BodyAngularVelocity")
- rl.P=3000
- rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
- rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
- rl.Parent=hit
- game:GetService("Debris"):AddItem(bodvol,.5)
- game:GetService("Debris"):AddItem(rl,.5)
- elseif Type=="Shatter" then
- for i=1,10 do
- BreakEffect(BrickColor.new("Cyan"),hit.CFrame,math.random(20,80)/100,math.random(2,10),math.random(20,80)/100)
- end
- elseif Type=="Knockdown2" then
- hum=hit.Parent.Humanoid
- local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
- local bodvol=Instance.new("BodyVelocity")
- bodvol.velocity=angle*knockback
- bodvol.P=5000
- bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
- bodvol.Parent=hit
- game:GetService("Debris"):AddItem(bodvol,.5)
- elseif Type=="Normal" then
- vp=Instance.new("BodyVelocity")
- vp.P=500
- vp.maxForce=Vector3.new(math.huge,0,math.huge)
- if KnockbackType==1 then
- vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
- elseif KnockbackType==2 then
- vp.velocity=Property.CFrame.lookVector*knockback
- end
- game:GetService("Debris"):AddItem(vp,.5)
- if knockback>0 then
- vp.Parent=hit.Parent.Torso
- end
- end
- end
- debounce=Instance.new("BoolValue")
- debounce.Name="DebounceHit"
- debounce.Parent=hit.Parent
- debounce.Value=true
- game:GetService("Debris"):AddItem(debounce,Delay)
- CRIT=false
- end
- end
- showDamage=function(Char,Dealt,Type)
- m=Instance.new("Model")
- m.Name="Effect"
- c=Instance.new("Part")
- c.Transparency=1
- c.Name="Head"
- c.TopSurface=0
- c.BottomSurface=0
- c.formFactor="Plate"
- c.Size=Vector3.new(1,.4,1)
- b=Instance.new("BillboardGui",c)
- b.Size=UDim2.new(5,0,5,0)
- b.AlwaysOnTop=true
- damgui=gui("TextLabel",b,tostring(Dealt),1,Color3.new(0,0,0),UDim2.new(0,0,0,0),UDim2.new(1,0,1,0))
- if Type=="Damage" then
- damgui.Font="SourceSans"
- if Dealt=="Block" then
- damgui.TextColor3=BrickColor.new("Really black").Color
- elseif Dealt<3 then
- damgui.TextColor3=BrickColor.new("White").Color
- elseif Dealt>=3 and Dealt<20 then
- damgui.TextColor3=BrickColor.new("Black").Color
- else
- damgui.TextColor3=BrickColor.new("White").Color
- damgui.Font="SourceSansBold"
- end
- elseif Type=="Debuff" then
- damgui.TextColor3=BrickColor.new("White").Color
- elseif Type=="Interrupt" then
- damgui.TextColor3=BrickColor.new("Black").Color
- end
- --damgui.FontSize="Size48"
- damgui.TextScaled=true
- ms=Instance.new("CylinderMesh")
- ms.Scale=Vector3.new(1,1,1)
- ms.Parent=c
- c.Reflectance=0
- Instance.new("BodyGyro").Parent=c
- c.Parent=m
- if Char:findFirstChild("Head")~=nil then
- c.CFrame=cf(Char["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
- elseif Char.Parent:findFirstChild("Head")~=nil then
- c.CFrame=cf(Char.Parent["Head"].CFrame.p+Vector3.new(math.random(-100,100)/100,3,math.random(-100,100)/100))
- end
- f=Instance.new("BodyPosition")
- f.P=2000
- f.D=100
- f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
- if Type=="Damage" then
- f.position=c.Position+Vector3.new(0,3,0)
- elseif Type=="Debuff" or Type=="Interrupt" then
- f.position=c.Position+Vector3.new(0,5,0)
- end
- f.Parent=c
- game:GetService("Debris"):AddItem(m,5)
- table.insert(Effects,{m,"showDamage",damgui,f,10,1,15,50,100})
- c.CanCollide=false
- m.Parent=workspace
- c.CanCollide=false
- end
- function MagniDamage(Part,magni,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
- for _,c in pairs(workspace:children()) do
- local hum=c:findFirstChild("Humanoid")
- if hum~=nil then
- local head=nil
- for _,d in pairs(c:children()) do
- --if d.Name=="Torso" or d.Name=="Head" or d.Name=="HumanoidRootPart" or d.Name=="HitPart" then
- --[[if d.className=="Model" and ranged~=true then
- head=d:findFirstChild("Hitbox")
- if d.Parent==Character then break end
- if head~=nil then
- local targ=head.Position-Part.Position
- local mag=targ.magnitude
- if mag<=magni then
- ref=part(3,workspace,0,1,BrickColor.new("White"),"Reference",vt())
- ref.Anchored=true
- ref.CFrame=cf(head.Position)
- game:GetService("Debris"):AddItem(ref,1)
- hitnum=math.random(1,5)
- if hitnum==1 then so("199148971",ref,1,1)
- elseif hitnum==2 then so("199149025",ref,1,1)
- elseif hitnum==3 then so("199149072",ref,1,1)
- elseif hitnum==4 then so("199149109",ref,1,1)
- elseif hitnum==5 then so("199149119",ref,1,1)
- end
- StaggerHit.Value=true
- end
- end
- end]]
- if d.className=="Part" then
- head=d
- if head~=nil then
- local targ=head.Position-Part.Position
- local mag=targ.magnitude
- if mag<=magni and c.Name~=Character then
- if stun==nil then
- stun=math.random(5,10)
- end
- local Rang=nil
- if Ranged==false then
- Rang=true
- end
- local stag=nil
- if shbash==true then
- stag=true
- end
- Damagefunc(head,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,ranged,DecreaseState,DecreaseAmount,Duration)
- --Damagefunc(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,incstun,stagger,staghit,DecreaseState,DecreaseAmount,Duration)
- end
- end
- end
- end
- end
- end
- end
- local hold = false
- function onKeyDown(key)
- if attack==false then
- if key=="z" then
- PunchSlam()
- elseif key=="x" then
- SweepCut()
- elseif key=="c" then
- MultiKick()
- elseif key=="v" then
- JumpKick()
- elseif key == "b" then
- EnergyBlam()
- --[[elseif key == "n" then
- GrandeurDash()
- elseif key == "m" then
- DeathImpact()
- elseif key == "f" then
- Jump()]]
- elseif key=="0" and hold == false then
- hold = true
- run.Parent=Decrease
- end
- end
- end
- function onKeyUp(key)
- if attack==false then
- if key=="0" and hold == true then
- hold = false
- run.Parent=nil
- end
- end
- end
- Mouse.KeyDown:connect(onKeyDown)
- Mouse.KeyUp:connect(onKeyUp)
- local stunnum=0
- local animnum=0
- local idle=1
- local animlimit=5
- local target,distance=nil,nil
- local attacking=false
- local stunanim=false
- while Humanoid.Health>0 do
- swait()
- --[[print(target)
- print(distance)]]
- hitbox2.Parent=hitbox.Parent
- hitbox2.Size=hitbox.Size
- hitbox2.CFrame=hitboxCF
- --[[for _,c in pairs(Character:children()) do
- for _,v in pairs(c:children()) do
- if v.className=="BodyGyro" or v.className=="BodyPosition" or v.className=="BodyVelocity" or v.className=="BodyAngularVelocity" then
- if v.Name~="SiegmundGyro" and v.Name~="SiegmundPos" then
- print("dai")
- v.Parent=nil
- end
- end
- end
- end]]
- coroutine.resume(coroutine.create(function()
- if start==false then
- start=true
- StartAnim()
- end
- end))
- if attack==false then
- BodGy.cframe=cf(Torso.Position,Mouse.Hit.p)
- end
- target,distance=findNearestTorso(Torso.Position)
- --[[if target~=nil then
- if attack==false then
- BodGy.cframe=cf(Torso.Position,target.Position)
- end
- numb1=RootPart.Position.y
- numb2=target.Position.y
- if numb2-numb1>=5 or numb2-numb1<=-5 then
- if distance<=30 then
- if attack==false then
- attackrand=math.random(1,20)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- JumpKick()
- end))
- end
- end
- end
- end
- if distance>30 then --far range
- Humanoid:MoveTo(target.Position)
- run.Parent=Decrease
- if attack==false then
- attackrand=math.random(1,70)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- EnergyBlam()
- --[[d=math.random(1,3)
- if d==1 then
- PunchSlam()
- elseif d==2 then
- SweepCut()
- elseif d==3 then
- MultiKick()
- end
- end))
- --[[coroutine.resume(coroutine.create(function()
- buffdef.Parent=Decrease
- atk=0
- if stompcooldown<=0 then
- atk=3
- else
- atk=math.random(1,2)
- end
- if atk==1 then
- Jump()
- elseif atk==2 then
- GrandeurDash()
- elseif atk==3 then
- DeathImpact()
- end
- buffdef.Parent=nil
- end))
- end
- end
- elseif distance<=30 and distance>=5 then --mid range
- move=distance*3
- Humanoid:MoveTo(target.Position)
- run.Parent=nil
- if attack==false then
- attackrand=math.random(1,20)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- d=math.random(1,3)
- if d==1 then
- PunchSlam()
- elseif d==2 then
- SweepCut()
- elseif d==3 then
- MultiKick()
- end
- end))
- --[[coroutine.resume(coroutine.create(function()
- buffdef.Parent=Decrease
- atk=0
- if stompcooldown<=0 then
- atk=3
- else
- atk=math.random(1,2)
- end
- if atk==1 then
- HeavySlam()
- elseif atk==2 then
- GrandeurDash()
- elseif atk==3 then
- DeathImpact()
- end
- buffdef.Parent=nil
- end))
- end
- end
- else --close range
- move=10
- Humanoid:MoveTo(RootPart.Position)
- run.Parent=nil
- --run.Parent=nil
- if attack==false then
- attackrand=math.random(1,20)
- if attackrand==1 then
- coroutine.resume(coroutine.create(function()
- RecentEnemy.Value=nil
- d=math.random(1,3)
- if d==1 then
- PunchSlam()
- elseif d==2 then
- SweepCut()
- elseif d==3 then
- MultiKick()
- end
- end))
- --[[coroutine.resume(coroutine.create(function()
- buffdef.Parent=Decrease
- HeavyCombo("Stun")
- buffdef.Parent=nil
- end))
- end
- end
- end
- end]]
- if Mvmt.Value<0 or Stun.Value>=100 or attack==true then
- Humanoid.WalkSpeed=0
- if jump==true then
- Humanoid.WalkSpeed=16*Mvmt.Value
- end
- else
- Humanoid.WalkSpeed=16*Mvmt.Value
- end
- if Stun.Value>=100 and stunanim==false then
- coroutine.resume(coroutine.create(function()
- stunanim=true
- while attack==true do
- swait()
- end
- StunAnim()
- Stun.Value=0
- stunanim=false
- end))
- end
- local stunnum2=80
- if stunnum>=stunnum2 then
- if Stun.Value>0 then
- Stun.Value=Stun.Value-1
- end
- stunnum=0
- end
- stunnum=stunnum+1
- local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
- local velderp=RootPart.Velocity.y
- hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,10,Character)
- for _,c in pairs(Decrease:children()) do
- if c:findFirstChild("Duration")~=nil then
- c.Duration.Value=c.Duration.Value-1
- if c.Duration.Value<=0 then
- c.Parent=nil
- end
- end
- if c.Name=="DecreaseAtk" then
- decreaseatk=decreaseatk+c.Value
- elseif c.Name=="DecreaseDef" then
- decreasedef=decreasedef+c.Value
- elseif c.Name=="DecreaseMvmt" then
- decreasemvmt=decreasemvmt+c.Value
- end
- end
- Atk.Value=1-decreaseatk
- if Atk.Value<=0 then
- Atk.Value=0
- end
- Def.Value=1-decreasedef
- if Def.Value<=0 then
- Def.Value=0.01
- end
- Mvmt.Value=1-decreasemvmt
- if Mvmt.Value<=0 then
- Mvmt.Value=0
- end
- decreaseatk=0
- decreasedef=0
- decreasemvmt=0
- AtkVal=Atk.Value*100
- AtkVal=math.floor(AtkVal)
- AtkVal=AtkVal/100
- DefVal=Def.Value*100
- DefVal=math.floor(DefVal)
- DefVal=DefVal/100
- MvmtVal=Mvmt.Value*100
- MvmtVal=math.floor(MvmtVal)
- MvmtVal=MvmtVal/100
- if MvmtVal<=0 then
- MvmtVal=0
- end
- animnum=animnum+1
- if animnum>=animlimit*5 then
- idle=1
- animnum=0
- elseif animnum>=animlimit*4 then
- idle=1
- animnum=0
- elseif animnum>=animlimit*3 then
- idle=4
- elseif animnum>=animlimit*2 then
- idle=3
- elseif animnum>=animlimit*1 then
- idle=2
- end
- if RootPart.Velocity.y > 1 and hitfloor==nil then
- Anim="Jump"
- if attack==false then
- Neck.C0=clerp(Neck.C0,necko*euler(.1,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(-.1,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,1),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-1),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2)
- end
- elseif RootPart.Velocity.y < -1 and hitfloor==nil then
- Anim="Fall"
- if attack==false then
- Neck.C0=clerp(Neck.C0,necko*euler(-.4,0,0),.3)
- RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0),.3)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.3,0,0.2),.3)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.3,0,-0.2),.3)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0.4,1.57,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(-0.2,-1.57,0),.2)
- end
- elseif torvel<1 and hitfloor~=nil then
- Anim="Idle"
- animlimit=15
- if attack==false then
- if idle==1 or idle==2 then
- Neck.C0=clerp(Neck.C0,necko*euler(0,.5,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,.5,0)*cf(0,.4,0),.1)
- RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(1,0,.2)*euler(0,-.5,0),.1)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.4,0,.5)*euler(0,1,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.6,-.9,0)*euler(0,1.57,0)*euler(0,-.1,-.05),.1)
- LH.C0=clerp(LH.C0,cf(-.7,-.8,-.4)*euler(0,-1.57,0)*euler(0,.5,.1),.1)
- else
- Neck.C0=clerp(Neck.C0,necko*euler(.1,.5,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(.1,.5,0)*euler(0,0,0)*cf(0,.6,0),.1)
- RW.C0=clerp(RW.C0,cf(1.3,0.4,.3)*euler(.8,0,.4)*euler(0,-.5,0),.1)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.2)*euler(1.6,0,.2)*euler(0,1,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.7,-.7,-.5)*euler(0,1.57,0)*euler(0,-.1,-.2)*euler(.05,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.6,-.6,-.8)*euler(0,-1.57,0)*euler(0,.5,.2)*euler(-.1,0,0),.1)
- end
- end
- elseif torvel>2 and torvel<20 and hitfloor~=nil then
- Anim="Walk"
- animlimit=10
- if attack==false then
- if idle==1 or idle==2 then
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.4,0,-.1)*euler(0,0,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,-.5),.1)
- if idle==1 then
- Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.2),.1)
- elseif idle==2 then
- Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
- RW.C0=clerp(RW.C0,cf(1.3,0.5,-.5)*euler(1.2,0,-.5)*euler(0,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-.9,-.3)*euler(0,-1.57,0)*euler(0,0,0),.1)
- end
- else
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.4,0,.1)*euler(0,0,0),.1)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,.5),.1)
- if idle==3 then
- Neck.C0=clerp(Neck.C0,necko*euler(.05,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(0,0,0)*cf(0,.1,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(1,0,0)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.2),.1)
- elseif idle==4 then
- Neck.C0=clerp(Neck.C0,necko*euler(0,0,0)*euler(0,0,0),.1)
- RootJoint.C0=clerp(RootJoint.C0,euler(.2,0,0)*cf(0,.2,0),.1)
- LW.C0=clerp(LW.C0,cf(-1.3,0.5,-.5)*euler(1.2,0,.5)*euler(0,0,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-.9,-.3)*euler(0,1.57,0)*euler(0,0,0),.1)
- end
- end
- end
- elseif torvel>=20 and hitfloor~=nil then
- Anim="Run"
- animlimit=10
- if attack==false then
- if idle==1 or idle==2 then
- Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(-.2,0,-.8),.2)
- if idle==1 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(0,0,-1.5),.2)
- elseif idle==2 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
- LH.C0=clerp(LH.C0,cf(-.5,-.6,-.5)*euler(0,-1.57,0)*euler(0,0,-.5),.1)
- end
- else
- Neck.C0=clerp(Neck.C0,necko*euler(.2,0,0)*euler(0,0,0),.2)
- RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.2)
- LH.C0=clerp(LH.C0,cf(-.5,-1,0)*euler(0,-1.57,0)*euler(-.2,0,.8),.2)
- if idle==3 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1,0,.5)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1,0,-.5)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.4,0,0)*cf(0,.3,0),.2)
- RH.C0=clerp(RH.C0,cf(.5,-1,0)*euler(0,1.57,0)*euler(0,0,1.5),.2)
- elseif idle==4 then
- RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-1.2,0,.3)*euler(0,0,0),.2)
- LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-1.2,0,-.3)*euler(0,0,0),.2)
- RootJoint.C0=clerp(RootJoint.C0,euler(.5,0,0)*cf(0,.4,0),.1)
- RH.C0=clerp(RH.C0,cf(.5,-.6,-.5)*euler(0,1.57,0)*euler(0,0,.5),.1)
- end
- end
- end
- end
- if #Effects>0 then
- --table.insert(Effects,{prt,"Block1",delay})
- for e=1,#Effects do
- if Effects[e]~=nil then
- --for j=1,#Effects[e] do
- local Thing=Effects[e]
- if Thing~=nil then
- local Part=Thing[1]
- local Mode=Thing[2]
- local Delay=Thing[3]
- local IncX=Thing[4]
- local IncY=Thing[5]
- local IncZ=Thing[6]
- if Thing[2]=="DecreaseStat" then
- --table.insert(Effects,{Model,"DecreaseStat",Stat,Amount,Duration,d})
- Thing[5]=Thing[5]-1
- if Thing[5]<=0 then
- if Thing[1]:findFirstChild("Stats")~=nil then
- if Thing[1].Stats:findFirstChild("Decrease")~=nil then
- --Thing[1].Stats[Thing[3]].Value=Thing[1].Stats[Thing[3]].Value+Thing[4]
- end
- end
- Thing[6].Parent=nil
- table.remove(Effects,e)
- end
- end
- if Thing[2]=="CylinderClang" then
- if Thing[3]<=1 then
- Thing[1].CFrame=Thing[1].CFrame*CFrame.new(0,2.5*Thing[5],0)*CFrame.fromEulerAnglesXYZ(Thing[6],0,0)
- Thing[7]=Thing[1].CFrame
- effect("New Yeller",0,Thing[8],Thing[7])
- Thing[8]=Thing[7]
- Thing[3]=Thing[3]+Thing[4]
- else
- Part.Parent=nil
- table.remove(Effects,e)
- end
- end
- if Thing[2]=="showDamage" then
- if Thing[6]<Thing[5] then
- Thing[6]=Thing[6]+1
- elseif Thing[6]<Thing[7] then
- Thing[4].position=Thing[4].position+vt(0,-.2,0)
- Thing[6]=Thing[6]+1
- elseif Thing[6]<Thing[8] then
- Thing[6]=Thing[6]+1
- elseif Thing[6]<Thing[9] then
- Thing[6]=Thing[6]+1
- Thing[4].position=Thing[4].position+vt(0,.2,0)
- Thing[3].TextStrokeTransparency=Thing[3].TextStrokeTransparency+.1
- Thing[3].TextTransparency=Thing[3].TextTransparency+.1
- else
- Thing[1].Parent=nil
- table.remove(Effects,e)
- end
- end
- if Thing[2]~="DecreaseStat" and Thing[2]~="showDamage" then
- if Thing[1].Transparency<=1 then
- if Thing[2]=="Block1" then
- Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Block2" then
- Thing[1].CFrame=Thing[1].CFrame
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Cylinder" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Cylinder2" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- if Thing[1].Transparency>=.5 then
- Thing[1].BrickColor=BrickColor.new("White")
- end
- elseif Thing[2]=="Blood" then
- Mesh=Thing[7]
- Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0)
- Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Elec" then
- Mesh=Thing[7]
- Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9])
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- elseif Thing[2]=="Disappear" then
- Thing[1].Transparency=Thing[1].Transparency+Thing[3]
- end
- else
- table.remove(Effects,e)
- Thing[1].Parent=nil
- end
- end
- end
- --end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement