Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- yo this was made by Wulfchow (formerly wulfbug9)
- -- i made this in anywhere from 2013 to 2015
- -- enjoy this incomplete mess haha
- CN, CA, V3, BC, C3 = CFrame.new, CFrame.Angles, Vector3.new, BrickColor.new, Color3.new
- Ins, Abs, Sin, Cos, Rad, Pi = Instance.new, math.abs, math.sin, math.cos, math.rad, math.pi
- Random = function(A)
- return ( math.random() - .5) * 2 * (A or 1)
- end
- Part = function(Parent, CFrame, Size, Colour, Material, Transparency, Anchored, CanCollide, Type)
- local P = Ins(Type or "Part")
- P.FormFactor = "Custom"
- P.Size = Size
- P.Anchored = Anchored
- P.Material = Material
- P.BrickColor = BC(Colour)
- P.Transparency = Transparency
- P.CanCollide = CanCollide
- P.TopSurface, P.BottomSurface, P.LeftSurface, P.RightSurface, P.FrontSurface, P.BackSurface = 10, 10, 10, 10, 10, 10
- P.CFrame = CFrame
- P.Parent = Parent
- P.Locked = true
- return P
- end
- Weld = function(P0, P1, C0, C1)
- local W = Ins("Weld", P0)
- W.Part0 = P0
- W.Part1 = P1
- W.C0 = C0 or CN()
- W.C1 = C1 or CN()
- return W
- end
- New = function(Object, Parent, Data)
- local Object = Ins(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- return Object
- end
- GetComplementingColour = function(Colour3)
- local R, G, B = Colour3.r, Colour3.g, Colour3.b
- local NR, NG, NB = R * 255, G * 255, B * 255
- local R2, G2, B2 = Abs(Random(255)), Abs(Random(255)), Abs(Random(255))
- R2, G2, B2 = (R2 + NR) / 2, (G2 + NG) / 2, (B2 + NB) / 2
- return C3(R2 / 255, G2 / 255, B2 / 255)
- end
- Midpoint = function(CF0, CF1)
- local C0, C1 = {CF0.X, CF0.Y, CF0.Z, CF0:toEulerAnglesXYZ()}, {CF1.X, CF1.Y, CF1.Z, CF1:toEulerAnglesXYZ()}
- for i, v in pairs(C0) do
- C0[i] = (v + C1[i]) / 2
- end
- return CN(C0[1], C0[2], C0[3]) * CA(C0[4], C0[5], C0[6])
- end
- do -- > Triangle Trail.
- local Trailing = false
- local Last = {
- [1] = nil,
- [2] = nil,
- }
- local TConnect
- local function Modify(Data)
- for i, v in pairs(Data) do
- if i ~= 1 then
- Data[1][i] = v
- end
- end
- return Data[1]
- 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(Parent, A, B, C, Colour)
- local P1 = Modify{Instance.new("WedgePart"), Anchored = true, FormFactor = "Custom", TopSurface = 0, BottomSurface = 0, BrickColor = BrickColor.new(Colour),
- Transparency = .3, CanCollide = false,
- BottomSurface = 10, TopSurface = 10, FrontSurface = 10, BackSurface = 10, LeftSurface = 10, RightSurface = 10}
- local P2 = Modify{Instance.new("WedgePart"), Anchored = true, FormFactor = "Custom", TopSurface = 0, BottomSurface = 0, BrickColor = BrickColor.new(Colour),
- Transparency = .3, CanCollide = false,
- BottomSurface = 10, TopSurface = 10, FrontSurface = 10, BackSurface = 10, LeftSurface = 10, RightSurface = 10}
- Modify{Instance.new("SpecialMesh",P1), MeshType = "Wedge", Scale = Vector3.new(0,1,1)}
- Modify{Instance.new("SpecialMesh",P2), MeshType = "Wedge", Scale = Vector3.new(0,1,1)}
- local AB, BC, CA = B-A, C-B, A-C
- local ABM, BCM, CAM = AB.magnitude, BC.magnitude, CA.magnitude
- local Edge1 = math.abs(0.5 + CA:Dot(AB)/(ABM*ABM))
- local Edge2 = math.abs(0.5 + AB:Dot(BC)/(BCM*BCM))
- local Edge3 = math.abs(0.5 + BC:Dot(CA)/(CAM*CAM))
- if Edge1 < Edge2 then
- if Edge1 < Edge3 then
- else
- A, B, C = C, A, B
- AB, BC, CA = CA, AB, BC
- ABM = CAM
- end
- else
- if Edge2 < Edge3 then
- A, B, C = B, C, A
- AB, BC, CA = BC, CA, AB
- ABM = BCM
- else
- A, B, C = C, A, B
- AB, BC, CA = CA, AB, BC
- ABM = CAM
- end
- end
- local Len1 = -CA:Dot(AB)/ABM
- local Len2 = ABM - Len1
- local Width = (CA + AB.unit*Len1).magnitude
- local MainCF = CFrameFromTopBack(A, AB:Cross(BC).unit, -AB.unit)
- P1.Name = "WulfEffect"
- P1.Parent = Parent
- P1.Size = Vector3.new(0.2, Width, Len1)
- P1.CFrame = MainCF * CFrame.Angles(math.pi, 0, math.pi/2) * CFrame.new(0, Width/2, Len1/2)
- P2.Name = "WulfEffect"
- P2.Parent = Parent
- P2.Size = Vector3.new(0.2, Width, Len2)
- P2.CFrame = MainCF * CFrame.Angles(math.pi, math.pi, -math.pi/2) * CFrame.new(0, Width/2, -Len1 - Len2/2)
- return P1, P2
- end
- function StartTrail(Part, Colour)
- Colour = Colour or "White"
- Trailing = true
- TConnect = game:service("RunService").Heartbeat:connect(function()
- local P0 = Part.CFrame * CFrame.new(0, Part.Size.Y/2, 0)
- local P1 = Part.CFrame * CFrame.new(0, -Part.Size.Y/2, 0)
- if Last[1] and Last[2] then
- local A, B = Triangle(workspace, P0.p, Last[1].p, Last[2].p, Colour)
- local C, D = Triangle(workspace, P0.p, P1.p, Last[2].p, Colour)
- Spawn(function()
- for i = .4, 1, .05 do
- wait()
- A.Transparency, B.Transparency, C.Transparency, D.Transparency = i, i, i, i
- end
- A:Destroy()
- B:Destroy()
- C:Destroy()
- D:Destroy()
- end)
- end
- Last[1] = P0
- Last[2] = P1
- end)
- end
- function StopTrail()
- TConnect:disconnect()
- Trailing = false
- Last[1] = nil
- Last[2] = nil
- end
- end
- do -- Credit to stravant.
- 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
- end
- Welds = {}
- function StopWeld(Weld)
- if Welds[Weld] and Welds[Weld][1] == true then
- Weld[Weld][2] = true
- end
- end
- function TweenWeld(Weld, C, Start, Finish, Length, Sync)
- if Welds[Weld] and Welds[Weld][1] == true then
- return
- elseif not Welds[Weld] then
- Welds[Weld] = {false, false}
- end
- local function Tween()
- if Welds[Weld][1] == true then return end
- Welds[Weld][1] = true
- local s = {QuaternionFromCFrame(Start)}
- local f = {QuaternionFromCFrame(Finish)}
- local sx, sy, sz = Start.x, Start.y, Start.z
- local fx, fy, fz = Finish.x, Finish.y, Finish.z
- for i = 1, Length do
- if Welds[Weld][2] then break end
- local sp = i / Length
- local _sp = 1 - sp
- Weld["C" .. C] = QuaternionToCFrame(_sp*sx + sp*fx, _sp*sy + sp*fy, _sp*sz + sp*fz,
- QuaternionSlerp(s, f, sp))
- game:service("RunService").Stepped:wait()
- end
- Welds[Weld][2] = false
- Welds[Weld][1] = false
- end
- if Sync then Spawn(Tween) else Tween() end
- end
- -----------------------------------------------------------------------------------------------------
- Player = game:service("Players").LocalPlayer
- Mouse = Player:GetMouse()
- Backpack = Player:WaitForChild("Backpack")
- Character = Player.Character
- Torso = Character:WaitForChild("Torso")
- HRP = Character:WaitForChild("HumanoidRootPart")
- RA = Character:WaitForChild("Right Arm")
- LA = Character:WaitForChild("Left Arm")
- RL = Character:WaitForChild("Right Leg")
- LL = Character:WaitForChild("Left Leg")
- Head = Character:WaitForChild("Head")
- ORS = Torso:WaitForChild("Right Shoulder")
- OLS = Torso:WaitForChild("Left Shoulder")
- Humanoid = Character:WaitForChild("Humanoid")
- Asset = "rbxassetid://"
- Meshes = {Cone = "1033714", Ring = "3270017", Blast = "20329976", Diamond = "9756362", Spike = "1033714", Skull = "4770583"}
- C0 = {
- LS = CN(-1, 0.5, 0),
- RS = CN(1, 0.5, 0),
- LH = CN(-1, -1, 0),
- RH = CN(1, -1, 0),
- NK = CN(0, 1, 0),
- TW = CN(0, 0, 0),
- }
- C1 = {
- LS = CN(0.5, 0.5, 0),
- RS = CN(-0.5, 0.5, 0),
- LH = CN(-.5, 1, 0),
- RH = CN(.5, 1, 0),
- NK = CN(0, -.5, 0),
- TW = CN(0, 0, 0),
- }
- OC0 = {
- RS = CN(1, .5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
- LS = CN(-1, .5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
- RH = CN(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
- LH = CN(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
- NK = CN(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
- TW = CN(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, -0)
- }
- OC1 = {
- RS = CN(.5, .5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
- LS = CN(-.5, .5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
- RH = CN(-.5, .5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),
- LH = CN(.5, .5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
- NK = CN(0, -.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- TW = CN(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
- }
- Attacking = false
- SpiritOn = false
- WolfOn = false
- SwordInactive = false
- local TW, NK, RS, LS
- pcall(game.Destroy, Character:FindFirstChild("Sword"))
- Model = New("Model", Character, { Name = "Sword" })
- Handle = Part(Model, CN(), V3(.4, 3, .4), "Gun metallic", "Concrete", 0, false, false)
- New("CylinderMesh", Handle)
- HandleW = Weld(Torso, Handle, CN(1, -1, .5) * CA(0, 0, Pi/4))
- for i = 0, 3, .25 do
- local P = Part(Model, CN(), V3(.5, .2, .5), "Red flip/flop", "Concrete", 0, false, false)
- New("SpecialMesh", P, { MeshType = "Sphere" })
- Weld(Handle, P, CN(0, -1.5, 0) * CN(0, i, 0) * CA(Pi/6, 0, 0))
- end
- for i = 0, 1, .25 do
- local P = Part(Model, CN(), V3(.5, .5, .5), "Red flip/flop", "Concrete", 0, false, false)
- Weld(Handle, P, CN(0, -1.5, 0) * CA(i, i, i))
- end
- P1 = Part(Model, CN(), V3(.6, .3, .6), "Red flip/flop", "Concrete", 0, false, false)
- New("SpecialMesh", P1, { MeshType = "Sphere" })
- Weld(Handle, P1, CN(0, 1.5, 0))
- P2 = Part(Model, CN(), V3(.75, .3, .75), "Red flip/flop", "Concrete", 0, false, false)
- New("SpecialMesh", P2, { MeshType = "Sphere" })
- Weld(P1, P2, CN(0, .125, 0))
- Div = Part(Model, CN(), V3(2, .5, .5), "Gun metallic", "Concrete", 0, false, false)
- Weld(Handle, Div, CN(0, 1.75 + .125, 0))
- P3 = Part(Model, CN(), V3(.5, .5, 0), "Gun metallic", "Concrete", 0, false, false, "WedgePart")
- Weld(Div, P3, CN(-1.1, 0, 0) * CA(Pi, Pi/2, 0))
- P4 = Part(Model, CN(), V3(.5, .5, 0), "Gun metallic", "Concrete", 0, false, false, "WedgePart")
- Weld(Div, P4, CN(1.1, 0, 0) * CA(Pi, -Pi/2, 0))
- P5 = Part(Model, CN(), V3(.5, 0, 0), "Gun metallic", "Concrete", 0, false, false, "WedgePart")
- Weld(Div, P5, CN(-.9, -.35, 0) * CA(Pi, Pi/2, 0))
- P6 = Part(Model, CN(), V3(.5, 0, 0), "Gun metallic", "Concrete", 0, false, false, "WedgePart")
- Weld(Div, P6, CN(.9, -.35, 0) * CA(Pi, -Pi/2, 0))
- BladeStart = Part(Model, CN(), V3(2.25, .75, .4), "Gun metallic", "Concrete", 0, false, false)
- Weld(Div, BladeStart, CN(0, .375 + .25, 0))
- Blade = Part(Model, CN(), V3(1.75, 8, .4), "Silver", "Concrete", 0, false, false)
- Weld(BladeStart, Blade, CN(0, 4.375, 0))
- Edge1 = Part(Model, CN(), V3(.3, 8, .3), "Silver", "Concrete", 0, false, false)
- New("BlockMesh", Edge1, { Scale = V3(.95, 1, .95) })
- Weld(Blade, Edge1, CN(1.75 / 2, 0, 0) * CA(0, Pi/4, 0))
- Edge2 = Part(Model, CN(), V3(.3, 8, .3), "Silver", "Concrete", 0, false, false)
- New("BlockMesh", Edge2, { Scale = V3(.95, 1, .95) })
- Weld(Blade, Edge2, CN(-1.75 / 2, 0, 0) * CA(0, Pi/4, 0))
- Top = Part(Model, CN(), V3(1.25, 1.25, .4), "Silver", "Concrete", 0, false, false)
- New("BlockMesh", Top, { Scale = V3(1, 1, .999) })
- Weld(Blade, Top, CN(0, 4, 0) * CA(0, 0, Pi/4))
- Edge3 = Part(Model, CN(), V3(.3, 1.25, .3), "Silver", "Concrete", 0, false, false)
- New("BlockMesh", Edge3, { Scale = V3(.95, 1, .95) })
- Weld(Top, Edge3, CN(1.25 / 2, 0, 0) * CA(0, Pi/4, 0))
- Edge4 = Part(Model, CN(), V3(.3, 1.25, .3), "Silver", "Concrete", 0, false, false)
- New("BlockMesh", Edge4, { Scale = V3(.95, 1, .95) })
- Weld(Top, Edge4, CA(0, 0, Pi/2) * CN(1.25 / 2, 0, 0) * CA(0, -Pi/4, 0))
- D1 = Part(Model, CN(), V3(.3, .3, .425), "Light blue", "Concrete", 0, false, false)
- Weld(Blade, D1, CN(0, -3, 0) * CA(0, 0, Pi/4))
- D2 = Part(Model, CN(), V3(.3, .625, .425), "Light blue", "Concrete", 0, false, false)
- Weld(Blade, D2, CN(.125, -2.5, 0) * CA(0, 0, Pi/4))
- D3 = Part(Model, CN(), V3(.3, .625, .425), "Light blue", "Concrete", 0, false, false)
- Weld(Blade, D3, CN(-.125, -2.5, 0) * CA(0, 0, -Pi/4))
- D4 = Part(Model, CN(), V3(.3, .625, .425), "Light blue", "Concrete", 0, false, false)
- Weld(Blade, D4, CN(.125, -1.5, 0) * CA(0, 0, -Pi/4))
- D5 = Part(Model, CN(), V3(.3, .625, .425), "Light blue", "Concrete", 0, false, false)
- Weld(Blade, D5, CN(-.125, -1.5, 0) * CA(0, 0, Pi/4))
- D6 = Part(Model, CN(), V3(.3, .3, .425), "Light blue", "Concrete", 0, false, false)
- Weld(Blade, D6, CN(0, -1, 0) * CA(0, 0, Pi/4))
- TP1 = Part(Model, CN(), V3(0, 0, 0), "White", "Concrete", 1, false, false)
- Weld(Blade, TP1, CN(0, Blade.Size.Y / 2, 0))
- C0.HW = CN(0, 0, -.5)
- function CrownExplode(CF, Size, Colour)
- local Part = Part(workspace, CF, V3(Size, Size, Size), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("FileMesh", Part, { MeshId = Asset .. Meshes.Blast, Scale = V3(Size, Size, Size) })
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + V3(1, 1, 1)
- wait()
- end
- Part:Destroy()
- end)
- end
- function CrownSpin(CF, Size, Colour)
- local Part = Part(workspace, CF, V3(Size, Size, Size), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("FileMesh", Part, { MeshId = Asset .. Meshes.Blast, Scale = V3(Size, Size, Size) })
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- local Rot = 0
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Part.CFrame = CF * CA(0, Rad(Rot), 0)
- wait()
- Rot = Rot + 2
- end
- Part:Destroy()
- end)
- end
- function SphereExplode(CF, Size, Colour)
- local Part = Part(workspace, CF, V3(Size, Size, Size), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("SpecialMesh", Part, { MeshType = "Sphere" })
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + V3(.5, .5, .5)
- wait()
- end
- Part:Destroy()
- end)
- end
- function BrickExplode(CF, Size, Colour)
- local Part = Part(workspace, CF * CA(Random(Pi * 2), Random(Pi * 2), Random(Pi * 2)), V3(Size, Size, Size), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("BlockMesh", Part)
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + V3(.5, .5, .5)
- wait()
- end
- Part:Destroy()
- end)
- end
- function Glitter(CF, Colour, RelSize)
- local RelSize = RelSize or .75
- local SizeX, SizeY, SizeZ = Abs(Random(RelSize)), Abs(Random(RelSize)), Abs(Random(RelSize))
- local Part = Part(workspace, CN(CF.X, CF.Y, CF.Z), V3(SizeX, SizeY, SizeZ), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("BlockMesh", Part)
- New("PointLight", Part, { Color = BC(Colour).Color, Range = ( (SizeX + SizeY + SizeZ) / 3 ) * 2 })
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + V3(.125, .125, .125)
- wait()
- end
- Part:Destroy()
- end)
- end
- function DiamondExplode(CF, Size, Colour)
- local Part = Part(workspace, CF * CA(Random(Pi*2), Random(Pi*2), Random(Pi*2)), V3(Size, Size, Size), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("FileMesh", Part, { MeshId = Asset .. Meshes.Diamond })
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + V3(5, 5, 5)
- wait()
- end
- Part:Destroy()
- end)
- end
- function SpikeUp(CF, Size, Colour)
- local Part = Part(workspace, CF * CN(0, -(Size * 2) / 2, 0), V3(Size / 2, Size * 4, Size / 2), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("FileMesh", Part, { MeshId = Asset .. Meshes.Spike, Scale = Part.Size / 2 })
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- Spawn(function()
- for i = 1, Size - 1, 1 do
- Part.CFrame = CF * CN(0, i, 0)
- wait()
- end
- wait(math.random(5, 8))
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- wait()
- end
- Part:Destroy()
- end)
- end
- function BrickTo(CF, To, Size, Colour)
- local Part = Part(workspace, CF, V3(Size, Size, Size), Colour, "SmoothPlastic", 0.4, true, false)
- Part.Name = "WulfEffect"
- local Mesh = New("SpecialMesh", Part, { MeshType = "Brick" })
- New("PointLight", Part, { Color = BC(Colour).Color, Range = Size * 2 })
- Spawn(function()
- for i = .4, 1.05, .05 do
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + V3(.125, .125, .125)
- Part.CFrame = CF + (Part.Position - To.p) * .9
- wait()
- end
- Part:Destroy()
- end)
- end
- function DamageNearby(CF, Damage, Distance)
- local Humanoids = { }
- for i, v in pairs(workspace:children()) do
- if v:IsA("Model") and v~=Character and v:FindFirstChild("Torso") and v:FindFirstChild("Humanoid") and
- (v:FindFirstChild("Torso").CFrame.p - CF.p).magnitude < Distance then
- table.insert(Humanoids, v:FindFirstChild("Humanoid"))
- end
- end
- for i, v in pairs(Humanoids) do
- v.Health = v.Health - Damage
- end
- end
- function GetIgnoreList()
- local Return = { }
- for i, v in pairs(workspace:children()) do
- if v.Name == "WulfEffect" then
- table.insert(Return, v)
- end
- end
- return Return
- end
- function ReturnToDefault(Speed)
- Speed = Speed or 10
- TweenWeld(HandleW, 0, HandleW.C0, C0.HW, Speed, true)
- TweenWeld(TW, 0, TW.C0, C0.TW, Speed, true)
- TweenWeld(NK, 0, NK.C0, C0.NK, Speed, true)
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(-.125, 0 , 0) * CA(Pi/1.625, 0, Pi/8), Speed, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(.125, 0 , 0) * CA(0, 0, -Pi/16), Speed, false)
- end
- function Spirit()
- Attacking = true
- HandleW.Parent = nil
- local Follow = true
- local CF0 = CN(Torso.CFrame.X, Torso.CFrame.Y, Torso.CFrame.Z)
- local CF = CF0 * CN(0, -20, 0)
- HBP = New("BodyPosition", Handle, { maxForce = V3(math.huge, math.huge, math.huge), position = (CF0 * CN(0, 5, 0)).p })
- HBG = New("BodyGyro", Handle, { maxTorque = V3(math.huge, math.huge, math.huge), cframe = CF0 })
- TweenWeld(RS, 0, RS.C0, C0.RS * CA(Pi/1.25, 0, Pi/10), 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CA(Pi/1.25, 0, -Pi/10), 5, false)
- local Body = Part(Model, CF, V3(3, 3, 2), "Really black", "SmoothPlastic", 0.4, false, false)
- local BP = New("BodyPosition", Body, { maxForce = V3(math.huge, math.huge, math.huge) })
- local BG = New("BodyGyro", Body, { maxTorque = V3(math.huge, math.huge, math.huge) })
- local BS1 = Part(Model, CF, V3(2, 3, 1), "Really black", "SmoothPlastic", 0.4, false, false, "WedgePart")
- Weld(Body, BS1, CN(-2, 0, 0) * CA(Pi, Pi/2, 0))
- local BS2 = Part(Model, CF, V3(2, 3, 1), "Really black", "SmoothPlastic", 0.4, false, false, "WedgePart")
- Weld(Body, BS2, CN(2, 0, 0) * CA(Pi, -Pi/2, 0))
- local Head = Part(Model, CF, V3(2, 2, 2), "Really black", "SmoothPlastic", 0.4, false, false, "WedgePart")
- New("Fire", Head, { Color = BC("Really black").Color, SecondaryColor = BC("Really black").Color, Size = 3 })
- New("SpecialMesh", Head, { MeshType = "FileMesh", MeshId = Asset .. Meshes.Skull, Scale = V3(2, 2, 2) / V3(.375, .375, .375) })
- local Neck = Weld(Body, Head, CN(0, 1.25, 0), CN(0, -1.25, 0))
- local RightA = Part(Model, CF, V3(2, 3, 2), "Really black", "SmoothPlastic", 0.4, false, false)
- local LeftA = Part(Model, CF, V3(2, 3, 2), "Really black", "SmoothPlastic", 0.4, false, false)
- local RAW = Weld(Body, RightA, CN(-1.25, 1.5, 0), CN(1.25, 1.5, 0))
- local LAW = Weld(Body, LeftA, CN(1.25, 1.5, 0), CN(-1.25, 1.5, 0))
- SpiritOn = true
- Spawn(function()
- for i = 0, 10 do
- CrownExplode(Torso.CFrame * CN(0, -3, 0), 10, "Really black")
- DiamondExplode(Torso.CFrame * CN(0, -3, 0), 20, "Really black")
- local Size = math.random(5, 10)
- SpikeUp(Torso.CFrame * CA(Random(Pi/8), 0, Random(Pi/8)) * CN(Random(10), -Size, Random(10)), Size, "Really black")
- wait()
- end
- end)
- Spawn(function()
- local Number = 0
- while SpiritOn and wait() do
- if Follow then
- BP.position = (Torso.CFrame * CFrame.new(0, 5, 5)).p
- BG.cframe = CN(Body.CFrame.p, Mouse.Hit.p)
- end
- Number = Number + 1
- if Number % 100 == 0 then
- SphereExplode(Body.CFrame, 5, "Really black")
- end
- if Number % 5 == 0 then
- Glitter(Body.CFrame * CN(Random(5), Random(5), Random(5)), "Really black")
- end
- end
- BG:Destroy()
- BP:Destroy()
- DiamondExplode(Body.CFrame, 5, "Really black")
- end)
- TweenWeld(RAW, 0, RAW.C0, CN(-1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/1.25, 0, -Pi/10), 5, true)
- TweenWeld(LAW, 0, LAW.C0, CN(1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/1.25, 0, Pi/10), 5, false)
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(-.125, 0 , 0) * CA(0, 0, Pi/16), 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(.125, 0 , 0) * CA(0, 0, -Pi/16), 5, false)
- TweenWeld(RAW, 0, RAW.C0, CN(-1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/4, 0, -Pi/10), 5, true)
- TweenWeld(LAW, 0, LAW.C0, CN(1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/4, 0, Pi/10), 5, true)
- HBP.position = RightA.CFrame.p
- HBG.cframe = RightA.CFrame
- Delay(.5, function()
- HBP:Destroy()
- HandleW.Parent = Model
- HandleW.Part0 = RightA
- HandleW.Part1 = Handle
- HandleW.C0 = CN(0, 0, -1)
- Attacking = false
- end)
- _SpiritEvent = assert(LoadLibrary("RbxUtility")).CreateSignal()
- _SpiritEvent:connect(function(Attack_Type, ...)
- local AttackData = { ... }
- Attacking = true
- if Attack_Type == "Slam" and Mouse.Target then
- local Hit = Mouse.Hit
- Hit = CN(Hit.X, Hit.Y, Hit.Z)
- Follow = false
- BP.position = CN(Hit.X, Hit.Y + 100, Hit.Z).p
- BG.cframe = CN(Body.CFrame.p, Hit.p)
- TweenWeld(RAW, 0, RAW.C0, CN(-1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/1.25, 0, Pi/5), 5, true)
- TweenWeld(HandleW, 0, HandleW.C0, C0.HW * CN(0, -2, 0) * CA(Pi/2, -Pi/5, 0), 5, true)
- TweenWeld(LAW, 0, LAW.C0, CN(1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/1.25, 0, -Pi/5), 5, false)
- BP.position = Hit.p
- Delay(.25, function()
- DamageNearby(Hit, 20, 20)
- for i = 1, 10 do
- wait()
- local Size = math.random(5, 10)
- CrownExplode(Hit, Size, "Really black")
- SpikeUp(Hit * CA(Random(Pi/8), 0, Random(Pi/8)) * CN(Random(20), -Size, Random(20)), Size, "Really black")
- end
- end)
- wait(.5)
- TweenWeld(RAW, 0, RAW.C0, CN(-1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/4, 0, -Pi/10), 5, true)
- TweenWeld(HandleW, 0, HandleW.C0, C0.HW, 5, true)
- TweenWeld(LAW, 0, LAW.C0, CN(1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/4, 0, Pi/10), 5, false)
- wait(.25)
- Follow = true
- elseif Attack_Type == "Slash" then
- elseif Attack_Type == "Throw" and Mouse.Target then
- local Hit = Mouse.Hit
- TweenWeld(RAW, 0, RAW.C0, CN(-1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/1.5, 0, -Pi/10), 5, true)
- TweenWeld(HandleW, 0, HandleW.C0, C0.HW * CA(Pi, 0, 0), 5, true)
- TweenWeld(LAW, 0, LAW.C0, CN(1.25, 1.5, 0) * CN(0, -.5, 0) * CA(-Pi/4, 0, Pi/10), 5, false)
- local HBP = New("BodyPosition", Blade, { maxForce = V3(1, 1, 1) * 10^6, P = 10^4, position = Hit.p })
- local HBG = New("BodyGyro", Blade, { maxTorque = V3(1, 1, 1) * 10^6, P = 10^4, cframe = CN(Blade.CFrame.p, Hit.p) * CN(0, 0, 5) })
- TweenWeld(RAW, 0, RAW.C0, CN(-1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/4, 0, -Pi/10), 5, true)
- TweenWeld(HandleW, 0, HandleW.C0, C0.HW, 5, true)
- TweenWeld(LAW, 0, LAW.C0, CN(1.25, 1.5, 0) * CN(0, -.5, 0) * CA(Pi/4, 0, Pi/10), 5, false)
- HandleW.Parent = nil
- repeat wait()
- local Mag = (Hit.p - Blade.CFrame.p).magnitude
- until Mag < 5
- wait(math.random(1, 3))
- HBP:Destroy()
- HBG:Destroy()
- HandleW.Parent = Model
- HandleW.Part0 = RightA
- HandleW.Part1 = Handle
- HandleW.C0 = CN(0, 0, -1)
- end
- Attacking = false
- end)
- end
- function Unspirit()
- Attacking = true
- HBG:Destroy()
- HBP:Destroy()
- HandleW.Part0 = RA
- HandleW.C0 = CN(0, 0, -.5)
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(-.125, 0 , 0) * CA(Pi/1.625, 0, Pi/8), 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(.125, 0 , 0) * CA(0, 0, -Pi/16), 5, false)
- SpiritOn = false
- Attacking = false
- _SpiritEvent:disconnect()
- _SpiritEvent = nil
- end
- function Wolf()
- -- OLD AS SHT FUNCTION
- local function cslerp(start,destination,increment)
- local function s(a,b,c)return (1-c)*a+(c*b)end
- local c1 = {start.X,start.Y,start.Z,start:toEulerAnglesXYZ()}
- local c2 = {destination.X,destination.Y,destination.Z,destination:toEulerAnglesXYZ()}
- for i,v in pairs(c1)do c1[i] = s(v,c2[i],increment)end
- return CFrame.new(c1[1],c1[2],c1[3])*CFrame.Angles(c1[4],c1[5],c1[6])
- end
- --
- Attacking = true
- WolfOn = true
- Model2 = New("Model", Model, { Name = "Wolf" })
- local Mode = "Idle"
- local CF0 = Torso.CFrame
- local CF = CF0 * CN(0, 2.5, 10)
- local LeftBLeg
- local RightBLeg
- local LeftFLeg
- local RightFLeg
- local Stand = Part(Model2, CF, V3(8, .25, 5), "Grey", "SmoothPlastic", 1, false, true)
- Stand.Name = "Stand"
- local FakeH = Part(Model2, CF, V3(1, 1, 1), "Grey", "SmoothPlastic", 1, false, false)
- FakeH.Name = "Head"
- local FakeT = Part(Model2, CF, V3(1, 1, 1), "Grey", "SmoothPlastic", 1, false, false)
- FakeT.Name = "Torso"
- local FakeHRP = Part(Model2, CF, V3(1, 1, 1), "Grey", "SmoothPlastic", 1, false, false)
- FakeHRP.Name = "HumanoidRootPart"
- Weld(Stand, FakeHRP, CN(0, 5, 0))
- Weld(FakeHRP, FakeT).Name = "RootJoint"
- Weld(FakeT, FakeH).Name = "Neck"
- local Body = Part(Model2, CF, V3(6, 2.5, 3.5), "Grey", "SmoothPlastic", 0, false, false)
- local BWeld = Weld(Stand, Body, CN(0, 2.5, 0) * CA(0, Pi/2, 0), CN(0, -2.5, 0))
- --local Seat = Part(Model2, CF, V3(1, 0, 1), "Grey", "SmoothPlastic", 1, false, false, "Seat")
- --Weld(Body, Seat, CN(0, 1.25, 0) * CA(0, -Pi/2, 0))
- local BodyTop = Part(Model2, CF, V3(3, 3, 4), "Grey", "SmoothPlastic", 0, false, false)
- local BTWeld = Weld(Body, BodyTop, CN(1, 0, 0), CN(-1, 0, 0))
- local Neck = Part(Model2, CF, V3(3, 2, 2.5), "Grey", "SmoothPlastic", 0, false, false)
- local NeckW = Weld(BodyTop, Neck, CA(0, 0, Pi/8) * CN(.75, 0, 0), CN(-.75, 0, 0))
- local Head = Part(Model2, CF, V3(2.25, 2, 2.5), "Grey", "SmoothPlastic", 0, false, false)
- local HeadW = Weld(Neck, Head, CA(0, 0, -Pi/8) * CN(1, .25, 0), CN(-1, -.25, 0))
- local Snout = Part(Model2, CF, V3(2, 1.25, 1.25), "Grey", "SmoothPlastic", 0, false, false)
- local SnoutW = Weld(Head, Snout, CN(.75, -.175, 0), CN(-.75, .175, 0))
- local Ear1 = Part(Model2, CF, V3(.75, 1.5, .5), "Grey", "SmoothPlastic", 0, false, false, "WedgePart")
- Weld(Head, Ear1, CN(0, 1.75, .5))
- local Ear2 = Part(Model2, CF, V3(.75, 1.5, .5), "Grey", "SmoothPlastic", 0, false, false, "WedgePart")
- Weld(Head, Ear2, CN(0, 1.75, -.5) * CA(0, Pi, 0))
- local Ear3 = Part(Model2, CF, V3(.75, 1.5, .5), "Grey", "SmoothPlastic", 0, false, false, "WedgePart")
- Weld(Ear1, Ear3, CN(0, 0, .5) * CA(0, Pi, 0))
- local Ear3 = Part(Model2, CF, V3(.75, 1.5, .5), "Grey", "SmoothPlastic", 0, false, false, "WedgePart")
- Weld(Ear2, Ear3, CN(0, 0, .5) * CA(0, Pi, 0))
- local Tail = Part(Model2, CF, V3(5, 2, 2), "Grey", "SmoothPlastic", 0, false, false)
- local TailW = Weld(Body, Tail, CA(0, 0, Pi/8) * CN(-2.5, .5, 0), CN(2.5, -.5, 0))
- HandleW.Part0 = Snout
- HandleW.C0 = CA(Pi/2, 0, 0)
- -- > Left Leg
- local B1LegP1 = Part(Model2, CF, V3(2, 2.5, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP1W = Weld(Body, B1LegP1, CN(-1, -.25, -1), CN(1, .25, 1))
- local B1LegP2 = Part(Model2, CF, V3(1.5, 2, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP2W = Weld(B1LegP1, B1LegP2, CA(0, 0, -Pi/6) * CN(0, -.75, 0), CN(0, .75, 0))
- local B1LegP3 = Part(Model2, CF, V3(1, 2.5, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP3W = Weld(B1LegP2, B1LegP3, CA(0, 0, Pi/7) * CN(0, -1, 0), CN(0, 1, 0))
- local B1Paw = Part(Model2, CF, V3(1.5, .75, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1PawW = Weld(B1LegP3, B1Paw, CA(0, 0, Pi/18) * CN(0, -.75, 0), CN(0, .75, 0))
- LeftBLeg = {
- Paw = B1PawW,
- P1 = B1LegP1W,
- P2 = B1LegP2W,
- P3 = B1LegP3W
- }
- -- > Right Leg
- local B1LegP1 = Part(Model2, CF, V3(2, 2.5, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP1W = Weld(Body, B1LegP1, CN(-1, -.25, 1), CN(1, .25, -1))
- local B1LegP2 = Part(Model2, CF, V3(1.5, 2, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP2W = Weld(B1LegP1, B1LegP2, CA(0, 0, -Pi/6) * CN(0, -.75, 0), CN(0, .75, 0))
- local B1LegP3 = Part(Model2, CF, V3(1, 2.5, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP3W = Weld(B1LegP2, B1LegP3, CA(0, 0, Pi/7) * CN(0, -1, 0), CN(0, 1, 0))
- local B1Paw = Part(Model2, CF, V3(1.5, .75, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1PawW = Weld(B1LegP3, B1Paw, CA(0, 0, Pi/18) * CN(0, -.75, 0), CN(0, .75, 0))
- RightBLeg = {
- Paw = B1PawW,
- P1 = B1LegP1W,
- P2 = B1LegP2W,
- P3 = B1LegP3W
- }
- -- > Left Leg Front
- local B1LegP1 = Part(Model2, CF, V3(1.5, 3, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP1W = Weld(Body, B1LegP1, CN(1, -.5, -1), CN(-1, .5, 1))
- local B1LegP2 = Part(Model2, CF, V3(1.25, 3, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP2W = Weld(B1LegP1, B1LegP2, CN(0, -1.25, 0), CN(0, 1.25, 0))
- local B1Paw = Part(Model2, CF, V3(1.5, .75, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1PawW = Weld(B1LegP2, B1Paw, CN(.25, -.75, 0), CN(-.25, .75, 0))
- LeftFLeg = {
- Paw = B1PawW,
- P1 = B1LegP1W,
- P2 = B1LegP2W,
- }
- -- > Right Leg Front
- local B1LegP1 = Part(Model2, CF, V3(1.5, 3, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP1W = Weld(Body, B1LegP1, CN(1, -.5, 1), CN(-1, .5, -1))
- local B1LegP2 = Part(Model2, CF, V3(1.25, 3, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1LegP2W = Weld(B1LegP1, B1LegP2, CN(0, -1.25, 0), CN(0, 1.25, 0))
- local B1Paw = Part(Model2, CF, V3(1.5, .75, 1), "Grey", "SmoothPlastic", 0, false, false)
- local B1PawW = Weld(B1LegP2, B1Paw, CN(.25, -.75, 0), CN(-.25, .75, 0))
- RightFLeg = {
- Paw = B1PawW,
- P1 = B1LegP1W,
- P2 = B1LegP2W,
- }
- -- > Humanoid
- local Lupin = New("Humanoid", Model2, { Name = "Lupin", MaxHealth = 1/0 })
- -- > Effects
- Spawn(function()
- for i = 1, 5 do
- wait()
- SphereExplode(Body.CFrame * CN(0, -3, 0), math.random(2, 6), "White")
- CrownSpin(Body.CFrame * CN(0, -3, 0), math.random(5, 15), "White")
- for _ = 1, 2 do
- BrickTo(Body.CFrame * CA(Random(1), Random(1), Random(1)), Body.CFrame * CN(Random(5), Random(5), Random(5)), math.random(2, 7), "White")
- end
- end
- end)
- -- > Animations < --
- local Loop
- local Count = 0
- local CountTime = 50
- local Speed = .175
- local LookAround = tick()
- local Looks = 0
- local IsLooking = false
- local Slash1 = false
- local Follow = true
- local Target = nil
- local Human = nil
- local LastSlash = tick()
- SlashOne = function()
- Slash1 = true
- Attacking = true
- TweenWeld(BWeld, 0, BWeld.C0, CN(0, 2.5, 0) * CA(0, Pi/2, 0) * CN(0, 7.5, 0), 4, true)
- TweenWeld(NeckW, 0, NeckW.C0, CA(0, 0, Pi/8) * CN(.75, 0, 0) * CA(0, -Pi/4, Pi/24), 4, true)
- TweenWeld(HandleW, 0, HandleW.C0, CA(Pi/4, 0, 0), 5, false)
- StartTrail(Blade, "Light red")
- Slash1 = false
- TweenWeld(BWeld, 0, BWeld.C0, CN(0, 2.5, 0) * CA(0, Pi/2, 0), 4, true)
- TweenWeld(NeckW, 0, NeckW.C0, CA(0, 0, Pi/8) * CN(.75, 0, 0) * CA(0, Pi/4, -Pi/24), 4, true)
- TweenWeld(HandleW, 0, HandleW.C0, CA(Pi/1.25, 0, -Pi/3), 5, false)
- DamageNearby(Handle.CFrame, 25, 10)
- StopTrail()
- TweenWeld(NeckW, 0, NeckW.C0, CA(0, 0, Pi/8) * CN(.75, 0, 0), 4, true)
- TweenWeld(HandleW, 0, HandleW.C0, CA(Pi/2, 0, 0), 5, false)
- Attacking = false
- end
- ChangeFollow = function(TargetRequest, HumanRequest)
- if not TargetRequest then
- Follow = true
- Target = nil
- HumanRequest = nil
- elseif TargetRequest and TargetRequest:IsA("Model") then
- Target = TargetRequest
- Human = HumanRequest
- Follow = false
- end
- end
- IsFollowing = function()
- return Follow
- end
- Loop = game:service("RunService").Stepped:connect(function()
- local RootMag = V3(FakeHRP.Velocity.X, 0, FakeHRP.Velocity.Z).magnitude
- if RootMag > 2 then
- if Follow then
- Mode = "Walking"
- Lupin.WalkSpeed = Humanoid.WalkSpeed
- else
- Mode = "Running"
- Lupin.WalkSpeed = 75
- end
- elseif RootMag < 2 then
- Mode = "Idle"
- end
- if Slash1 then Mode = "Jump" end
- local CF = Torso.CFrame * CN(0, 0, 10)
- if Follow then
- Lupin:MoveTo(CF.p, workspace.Terrain)
- else
- if not Target or Human.Health == 0 then
- Follow = true
- Target = nil
- Human = nil
- else
- local TargCF = Target:GetModelCFrame()
- local CF = CFrame.new(TargCF * CN(0, 0, 10).p, TargCF.p)
- Lupin:MoveTo(CF.p, workspace.Terrain)
- local Mag = (CF.p - Vector3.new(Stand.CFrame.X, CF.Y, Stand.CFrame.Z)).magnitude
- if Mag < 7.5 and not Attacking and (tick()-LastSlash) > 3 then
- game:service("Debris"):AddItem(New("BodyGyro", Stand, { maxTorque = V3(1, 1, 1) * 10^6, P = 10^4, cframe = CF }), 1)
- LastSlash = tick()
- Spawn(function() SlashOne() end)
- end
- end
- end
- Count = (Count%CountTime)+Speed
- local Sine = math.sin(Count)
- if Mode == "Walking" then
- CountTime = 50
- Speed = .175
- RightFLeg.P1.C0 = cslerp(RightFLeg.P1.C0, CN(1, -.5, 1) * CA(0, 0, -Sine*.35), Speed)
- RightFLeg.P2.C0 = cslerp(RightFLeg.P2.C0, CN(0, -1.25, 0) * CA(0, 0, -Sine*.25), Speed)
- RightFLeg.Paw.C0 = cslerp(RightFLeg.Paw.C0, CN(.25, -.75, 0) * CA(0, 0, Sine*.5), Speed)
- LeftFLeg.P1.C0 = cslerp(LeftFLeg.P1.C0, CN(1, -.5, -1) * CA(0, 0, Sine*.35), Speed)
- LeftFLeg.P2.C0 = cslerp(LeftFLeg.P2.C0, CN(0, -1.25, 0) * CA(0, 0, Sine*.25), Speed)
- LeftFLeg.Paw.C0 = cslerp(LeftFLeg.Paw.C0, CN(.25, -.75, 0) * CA(0, 0, -Sine*.5), Speed)
- RightBLeg.P1.C0 = cslerp(RightBLeg.P1.C0, CN(-1, -.25, 1) * CA(0, 0, Sine*.15), Speed)
- RightBLeg.P2.C0 = cslerp(RightBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0) * CA(0, 0, Sine*.15), Speed)
- RightBLeg.P3.C0 = cslerp(RightBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0) * CA(0, 0, Sine*.15), Speed)
- RightBLeg.Paw.C0 = cslerp(RightBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0) * CA(0, 0, -Sine*.15), Speed)
- LeftBLeg.P1.C0 = cslerp(LeftBLeg.P1.C0, CN(-1, -.25, -1) * CA(0, 0, -Sine*.15), Speed)
- LeftBLeg.P2.C0 = cslerp(LeftBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0) * CA(0, 0, -Sine*.15), Speed)
- LeftBLeg.P3.C0 = cslerp(LeftBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0) * CA(0, 0, -Sine*.15), Speed)
- LeftBLeg.Paw.C0 = cslerp(LeftBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0) * CA(0, 0, Sine*.15), Speed)
- TailW.C0 = cslerp(TailW.C0, CA(0, 0, Pi/8) * CN(-2.5, .5, 0) * CA(0, Sine*.25, 0), Speed)
- BTWeld.C0 = cslerp(BTWeld.C0, CN(1, 0, 0) * CA(0, Sine*.125, 0), Speed)
- if not Slash1 then NeckW.C0 = cslerp(NeckW.C0, CA(0, 0, Pi/8) * CN(.75, 0, 0), Speed) end
- elseif Mode == "Running" then
- CountTime = 50
- Speed = .4
- RightFLeg.P1.C0 = cslerp(RightFLeg.P1.C0, CN(1, -.5, 1) * CA(0, 0, -Sine*.35), Speed)
- RightFLeg.P2.C0 = cslerp(RightFLeg.P2.C0, CN(0, -1.25, 0) * CA(0, 0, -Sine*.25), Speed)
- RightFLeg.Paw.C0 = cslerp(RightFLeg.Paw.C0, CN(.25, -.75, 0) * CA(0, 0, -Sine*.5), Speed)
- LeftFLeg.P1.C0 = cslerp(LeftFLeg.P1.C0, CN(1, -.5, -1) * CA(0, 0, -Sine*.35), Speed)
- LeftFLeg.P2.C0 = cslerp(LeftFLeg.P2.C0, CN(0, -1.25, 0) * CA(0, 0, -Sine*.25), Speed)
- LeftFLeg.Paw.C0 = cslerp(LeftFLeg.Paw.C0, CN(.25, -.75, 0) * CA(0, 0, -Sine*.5), Speed)
- RightBLeg.P1.C0 = cslerp(RightBLeg.P1.C0, CN(-1, -.25, 1) * CA(0, 0, Sine*.25), Speed)
- RightBLeg.P2.C0 = cslerp(RightBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0) * CA(0, 0, Sine*.25), Speed)
- RightBLeg.P3.C0 = cslerp(RightBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0) * CA(0, 0, Sine*.25), Speed)
- RightBLeg.Paw.C0 = cslerp(RightBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0) * CA(0, 0, Sine*.25), Speed)
- LeftBLeg.P1.C0 = cslerp(LeftBLeg.P1.C0, CN(-1, -.25, -1) * CA(0, 0, Sine*.25), Speed)
- LeftBLeg.P2.C0 = cslerp(LeftBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0) * CA(0, 0, Sine*.25), Speed)
- LeftBLeg.P3.C0 = cslerp(LeftBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0) * CA(0, 0, Sine*.25), Speed)
- LeftBLeg.Paw.C0 = cslerp(LeftBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0) * CA(0, 0, Sine*.25), Speed)
- TailW.C0 = cslerp(TailW.C0, CA(0, 0, Pi/8) * CN(-2.5, .5, 0) * CA(0, Sine*.125, 0), Speed)
- BTWeld.C0 = cslerp(BTWeld.C0, CN(1, 0, 0) * CA(0, Sine*.075, 0), Speed)
- if not Slash1 then NeckW.C0 = cslerp(NeckW.C0, CA(0, 0, Pi/8) * CN(.75, 0, 0), Speed) end
- elseif Mode == "Idle" then
- CountTime = 75
- Speed = .175
- RightFLeg.P1.C0 = cslerp(RightFLeg.P1.C0, CN(1, -.5, 1), Speed)
- RightFLeg.P2.C0 = cslerp(RightFLeg.P2.C0, CN(0, -1.25, 0), Speed)
- RightFLeg.Paw.C0 = cslerp(RightFLeg.Paw.C0, CN(.25, -.75, 0), Speed)
- LeftFLeg.P1.C0 = cslerp(LeftFLeg.P1.C0, CN(1, -.5, -1), Speed)
- LeftFLeg.P2.C0 = cslerp(LeftFLeg.P2.C0, CN(0, -1.25, 0), Speed)
- LeftFLeg.Paw.C0 = cslerp(LeftFLeg.Paw.C0, CN(.25, -.75, 0), Speed)
- RightBLeg.P1.C0 = cslerp(RightBLeg.P1.C0, CN(-1, -.25, 1), Speed)
- RightBLeg.P2.C0 = cslerp(RightBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0), Speed)
- RightBLeg.P3.C0 = cslerp(RightBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0), Speed)
- RightBLeg.Paw.C0 = cslerp(RightBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0), Speed)
- LeftBLeg.P1.C0 = cslerp(LeftBLeg.P1.C0, CN(-1, -.25, -1), Speed)
- LeftBLeg.P2.C0 = cslerp(LeftBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0), Speed)
- LeftBLeg.P3.C0 = cslerp(LeftBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0), Speed)
- LeftBLeg.Paw.C0 = cslerp(LeftBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0), Speed)
- TailW.C0 = cslerp(TailW.C0, CA(0, 0, Pi/8) * CN(-2.5, .5, 0), Speed)
- BTWeld.C0 = cslerp(BTWeld.C0, CN(1, 0, 0), Speed)
- if (tick()-LookAround) > 7.5 and not IsLooking then
- IsLooking = true
- Looks = Looks + 1
- elseif (tick()-LookAround) > 10 then
- IsLooking = false
- LookAround = tick()
- end
- if not Slash1 then NeckW.C0 = cslerp(NeckW.C0, CA(0, 0, Pi/8) * CN(.75, 0, 0) * CA(0, IsLooking and (Looks % 2 == 0 and -.375 or .375) or 0, 0), Speed) end
- elseif Mode == "Jump" then
- CountTime = 50
- Speed = .75
- RightFLeg.P1.C0 = cslerp(RightFLeg.P1.C0, CN(1, -.5, 1) * CA(0, 0, Pi/5), Speed)
- RightFLeg.P2.C0 = cslerp(RightFLeg.P2.C0, CN(0, -1.25, 0), Speed)
- RightFLeg.Paw.C0 = cslerp(RightFLeg.Paw.C0, CN(.25, -.75, 0), Speed)
- LeftFLeg.P1.C0 = cslerp(LeftFLeg.P1.C0, CN(1, -.5, -1) * CA(0, 0, Pi/5), Speed)
- LeftFLeg.P2.C0 = cslerp(LeftFLeg.P2.C0, CN(0, -1.25, 0), Speed)
- LeftFLeg.Paw.C0 = cslerp(LeftFLeg.Paw.C0, CN(.25, -.75, 0), Speed)
- RightBLeg.P1.C0 = cslerp(RightBLeg.P1.C0, CN(-1, -.25, 1) * CA(0, 0, -Pi/5), Speed)
- RightBLeg.P2.C0 = cslerp(RightBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0), Speed)
- RightBLeg.P3.C0 = cslerp(RightBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0), Speed)
- RightBLeg.Paw.C0 = cslerp(RightBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0), Speed)
- LeftBLeg.P1.C0 = cslerp(LeftBLeg.P1.C0, CN(-1, -.25, -1) * CA(0, 0, -Pi/5), Speed)
- LeftBLeg.P2.C0 = cslerp(LeftBLeg.P2.C0, CA(0, 0, -Pi/6) * CN(0, -.75, 0), Speed)
- LeftBLeg.P3.C0 = cslerp(LeftBLeg.P3.C0, CA(0, 0, Pi/7) * CN(0, -1, 0), Speed)
- LeftBLeg.Paw.C0 = cslerp(LeftBLeg.Paw.C0, CA(0, 0, Pi/18) * CN(0, -.75, 0), Speed)
- TailW.C0 = cslerp(TailW.C0, CA(0, 0, Pi/8) * CN(-2.5, .5, 0), Speed)
- BTWeld.C0 = cslerp(BTWeld.C0, CN(1, 0, 0), Speed)
- end
- end)
- Spawn(function()
- repeat wait() until not WolfOn
- DiamondExplode(Body.CFrame * CA(Random(1), Random(1), Random(1)), 5, "White")
- end)
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(-.125, 0 , 0) * CA(0, 0, Pi/16), 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(.125, 0 , 0) * CA(0, 0, -Pi/16), 5, false)
- wait()
- Attacking = false
- end
- function Unwolf()
- Attacking = true
- HandleW.Part0 = RA
- HandleW.C0 = CN(0, 0, -.5)
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(-.125, 0 , 0) * CA(Pi/1.625, 0, Pi/8), 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(.125, 0 , 0) * CA(0, 0, -Pi/16), 5, false)
- Model2:FindFirstChild("Stand"):Destroy()
- WolfOn = false
- Attacking = false
- end
- function Slash1()
- Attacking = true
- TweenWeld(TW, 0, TW.C0, C0.TW * CA(0, -Pi/5, 0), 7, true)
- TweenWeld(NK, 0, NK.C0, C0.NK * CA(0, Pi/5, 0), 7, true)
- TweenWeld(RS, 0, RS.C0, C0.RS * CA(Pi/1.75, 0, Pi/10), 7, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(.75, 0, 0) * CA(Pi/2, 0, Pi/3), 7, false)
- StartTrail(Blade, "Light red")
- wait()
- TweenWeld(HandleW, 0, HandleW.C0, C0.HW * CN(0, -.75, 0) * CA(0, 0, -Pi), 4, true)
- TweenWeld(TW, 0, TW.C0, C0.TW * CA(0, Pi/3, 0), 4, true)
- TweenWeld(NK, 0, NK.C0, C0.NK * CA(0, -Pi/3, 0), 4, true)
- TweenWeld(RS, 0, RS.C0, C0.RS * CA(Pi/2.25, 0, 0), 4, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CA(Pi/2.75, 0, Pi/4), 4, false)
- DamageNearby(Handle.CFrame, 10, 10)
- StopTrail()
- wait()
- ReturnToDefault(7)
- wait()
- Attacking = false
- end
- function DRAGAWN()
- Attacking = true
- HandleW.Parent = nil
- local DragonMesh = Asset .. "58430372"
- local CF0 = CN(Torso.CFrame.X, Torso.CFrame.Y, Torso.CFrame.Z)
- local HBP = New("BodyPosition", Handle, { maxForce = V3(math.huge, math.huge, math.huge), position = (CF0 * CN(0, 10, 0)).p })
- local HBG = New("BodyGyro", Handle, { P = 10^4, maxTorque = V3(1, 1, 1) * 10 ^ 6, cframe = CF0 })
- local HRPBG = New("BodyGyro", HRP, { P = 10^4, maxTorque = V3(1, 1, 1) * 10 ^ 6, cframe = HRP.CFrame })
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(.375, 0, -.5) * CA(Pi/2, 0, Pi/2), 5, true)
- TweenWeld(NK, 0, NK.C0, C0.NK * CA(0, -Pi/2, 0), 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(0, 0, 0) * CA(0, 0, -Pi/16), 5, false)
- local Going = true
- local Hit = nil
- Spawn(function()
- while wait() and Going do
- Hit = Mouse.Hit
- local CF0 = CN(Torso.CFrame.X, Torso.CFrame.Y, Torso.CFrame.Z)
- local POS = (CF0 * CN(0, 10, 0)).p
- HBG.cframe = CN(Handle.CFrame.p, Hit.p) * CA(-Pi/2, 0, 0)
- HBP.position = POS
- HRPBG.cframe = CN(HRP.CFrame.p, V3(Hit.X, HRP.CFrame.Y, Hit.Z)) * CA(0, Pi/2, 0)
- Glitter(Blade.CFrame * CN(Random(10), Random(10), Random(10)), "Phosph. White", .25)
- end
- end)
- Mouse.Button1Down:wait()
- Going = false
- HRPBG.cframe = CN(HRP.CFrame.p, V3(Hit.X, HRP.CFrame.Y, Hit.Z))
- TweenWeld(RS, 0, RS.C0, C0.RS * CN(0, .5, 0) * CA(Pi/1.25, 0, Pi/8), 5, true)
- TweenWeld(NK, 0, NK.C0, C0.NK, 5, true)
- TweenWeld(LS, 0, LS.C0, C0.LS * CN(0, .5, 0) * CA(Pi/1.25, 0, -Pi/8), 5, false)
- local DragonHead = Part(workspace, Blade.CFrame * CA(Pi/2, 0, 0), V3(5, 20, 10), "Bright violet", "SmoothPlastic", 1, true, false)
- local DHCF = DragonHead.CFrame * CN(0, 0, -10) * CA(-Pi/2, 0, 0)
- DragonHead.CFrame = DragonHead.CFrame * CN(0, 2.5, 0)
- local Mag = (Hit.p - DHCF * CN(0, 5, 0).p).magnitude
- local BP1 = Part(workspace, CN(DHCF.p, Hit.p) * CN(0, 0, -Mag/2) * CA(0, Pi/2, 0), V3(Mag, 7.5, 7.5), "Bright violet", "SmoothPlastic", 1, true, false)
- local BP2 = Part(workspace, CN(DHCF.p, Hit.p) * CN(0, 0, -Mag/2) * CA(0, Pi/2, 0), V3(Mag, 5, 5), "Phosph. White", "SmoothPlastic", 1, true, false)
- New("SpecialMesh", BP1, { MeshType = "Cylinder" })
- New("SpecialMesh", BP2, { MeshType = "Cylinder" })
- New("FileMesh", DragonHead, { Scale = V3(7.5, 7.5, 7.5), MeshId = DragonMesh })
- local Amount = math.random(10, 20)
- Spawn(function()
- for i = 1, .3, -.15 do
- wait()
- BP1.Transparency = i
- BP2.Transparency = i
- DragonHead.Transparency = i
- end
- BP1.Transparency = .3
- BP2.Transparency = .3
- DragonHead.Transparency = .3
- end)
- Delay(Amount*wait(.1), function()
- for i = 0.3, 1.05, .05 do
- DragonHead.Transparency = i
- BP1.Transparency = i
- BP2.Transparency = i
- wait()
- end
- DragonHead:Destroy()
- BP1:Destroy()
- BP2:Destroy()
- end)
- for i = 1, Amount do
- local Size = math.random(10, 20)
- DiamondExplode(Torso.CFrame * CN(Random(10), -Size, Random(10)), Size, "Bright violet")
- SpikeUp(Torso.CFrame * CA(Random(Pi/8), 0, Random(Pi/8)) * CN(Random(20), -Size, Random(20)), Size, "Bright violet")
- SphereExplode(Hit, 5, "Bright violet")
- DiamondExplode(Hit, 1, "Phosph. White")
- Delay(Random(.1), function() CrownSpin(DHCF, 10, "Bright violet") end)
- DamageNearby(Hit, 7.5, 7.5)
- wait(.1)
- end
- Shooting = false
- wait()
- HBG:Destroy()
- HBP:Destroy()
- HRPBG:Destroy()
- HandleW.Parent = Model
- HandleW.Part0 = RA
- HandleW.C0 = CN(0, 0, -.5)
- ReturnToDefault(10)
- wait()
- Attacking = false
- end
- -----------------------------------------------------------------------------------------------------
- TW = HRP:WaitForChild("RootJoint")
- NK = Weld(Torso, Head, C0.NK, C1.NK)
- Equip = function(Mouse)
- if not SpiritOn and not WolfOn and not Attacking and not SwordInactive then
- HandleW.Part0 = RA
- HandleW.C0 = CN(0, 0, -.5)
- OLS.Parent = nil
- ORS.Parent = nil
- TW.C0 = CN()
- TW.C1 = CN()
- RS = Weld(Torso, RA, C0.RS * CN(-.125, 0 , 0) * CA(Pi/1.625, 0, Pi/8), C1.RS)
- LS = Weld(Torso, LA, C0.LS * CN(.125, 0 , 0) * CA(0, 0, -Pi/16), C1.LS)
- end
- Mouse.Button1Down:connect(function()
- if Attacking then return end
- if not SpiritOn and not WolfOn then Slash1() end
- if WolfOn and IsFollowing() then
- pcall(SlashOne)
- end
- end)
- Mouse.KeyDown:connect(function(Key)
- Key:lower()
- if Attacking then return end
- if not SwordInactive then
- if Key == "f" and not SpiritOn and not WolfOn then
- Spirit()
- elseif Key == "f" and SpiritOn and not WolfOn then
- Unspirit()
- elseif Key == "q" and SpiritOn and not WolfOn then
- _SpiritEvent:fire("Slam")
- elseif Key == "e" and SpiritOn and not WolfOn then
- _SpiritEvent:fire("Throw")
- elseif Key == "q" and not SpiritOn and not WolfOn then
- DRAGAWN()
- elseif Key == "e" and not SpiritOn and not WolfOn then
- Wolf()
- elseif Key == "e" and not SpiritOn and WolfOn then
- Unwolf()
- elseif Key == "r" and not SpiritOn and WolfOn then
- local Target = Mouse.Target
- if Target.Parent:FindFirstChild("Torso") then
- local Hum
- for i, v in pairs(Target.Parent:children()) do
- if v:IsA("Humanoid") then
- Hum = v
- break
- end
- end
- if Hum then
- ChangeFollow(Target.Parent, Hum)
- end
- else
- ChangeFollow()
- end
- end
- else
- end
- end)
- end
- Unequip = function()
- if SpiritOn or WolfOn or SwordInactive then return end
- if Attacking then
- repeat wait() until not Attacking
- end
- RS:Destroy()
- LS:Destroy()
- OLS.Parent = Torso
- OLS.Part0, OLS.Part1 = Torso, LA
- ORS.Parent = Torso
- ORS.Part0, ORS.Part1 = Torso, RA
- TW.C0 = C0.TW
- NK.C0 = C0.NK
- HandleW.Part0 = Torso
- HandleW.C0 = CN(1, -1, .5) * CA(0, 0, Pi/4)
- end
- pcall(game.Destroy, Backpack:FindFirstChild("Sword"))
- Tool = New("HopperBin", Backpack, { Name = "Sword" })
- Tool.Selected:connect(Equip)
- Tool.Deselected:connect(Unequip)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement