Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//====================================================\\--
- --|| CREATED BY SHACKLUSTER ||--
- --|| CONVERTED BY BASSTRACKER1970 ||--
- --\\====================================================//--
- function Create()
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- ParticleEmitter0 = Instance.new("ParticleEmitter")
- ParticleEmitter1 = Instance.new("ParticleEmitter")
- Model2 = Instance.new("Model")
- Part3 = Instance.new("Part")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Part5 = Instance.new("Part")
- Weld6 = Instance.new("Weld")
- SpecialMesh7 = Instance.new("SpecialMesh")
- UnionOperation8 = Instance.new("UnionOperation")
- Weld9 = Instance.new("Weld")
- UnionOperation10 = Instance.new("UnionOperation")
- Weld11 = Instance.new("Weld")
- Model12 = Instance.new("Model")
- Part13 = Instance.new("Part")
- UnionOperation14 = Instance.new("UnionOperation")
- Weld15 = Instance.new("Weld")
- Model16 = Instance.new("Model")
- Part17 = Instance.new("Part")
- UnionOperation18 = Instance.new("UnionOperation")
- Weld19 = Instance.new("Weld")
- UnionOperation20 = Instance.new("UnionOperation")
- Weld21 = Instance.new("Weld")
- Model22 = Instance.new("Model")
- MeshPart23 = Instance.new("MeshPart")
- Trail24 = Instance.new("Trail")
- Weld25 = Instance.new("Weld")
- MeshPart26 = Instance.new("MeshPart")
- Weld27 = Instance.new("Weld")
- MeshPart28 = Instance.new("MeshPart")
- Weld29 = Instance.new("Weld")
- UnionOperation30 = Instance.new("UnionOperation")
- Weld31 = Instance.new("Weld")
- Part32 = Instance.new("Part")
- ParticleEmitter0.Name = "Vortex"
- ParticleEmitter0.Parent = mas
- ParticleEmitter0.Speed = NumberRange.new(0, 0)
- ParticleEmitter0.Rotation = NumberRange.new(0, 360)
- ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.423529, 0.345098, 0.294118),Color3.new(0.423529, 0.345098, 0.294118))
- ParticleEmitter0.Enabled = false
- ParticleEmitter0.LightEmission = 1
- ParticleEmitter0.Texture = "rbxassetid://1084969997"
- ParticleEmitter0.Transparency = NumberSequence.new(1,0.5,0.5)
- ParticleEmitter0.ZOffset = -2
- ParticleEmitter0.Size = NumberSequence.new(0,0)
- ParticleEmitter0.Lifetime = NumberRange.new(1, 1)
- ParticleEmitter0.LockedToPart = true
- ParticleEmitter0.Rate = 0
- ParticleEmitter0.RotSpeed = NumberRange.new(360, 360)
- ParticleEmitter1.Name = "Wave"
- ParticleEmitter1.Parent = mas
- ParticleEmitter1.Speed = NumberRange.new(0, 0)
- ParticleEmitter1.Rotation = NumberRange.new(-180, 180)
- ParticleEmitter1.Enabled = false
- ParticleEmitter1.LightEmission = 1
- ParticleEmitter1.Texture = "rbxassetid://1084991215"
- ParticleEmitter1.Transparency = NumberSequence.new(0,0.39344263076782,0.66120219230652,0.83606559038162,1)
- ParticleEmitter1.ZOffset = 1
- ParticleEmitter1.Size = NumberSequence.new(0,0)
- ParticleEmitter1.Lifetime = NumberRange.new(0.30000001192093, 0.30000001192093)
- ParticleEmitter1.Rate = 1
- Model2.Name = "Head"
- Model2.Parent = mas
- Model2.PrimaryPart = Part5
- Part3.Name = "Hood"
- Part3.Parent = Model2
- Part3.CFrame = CFrame.new(-5.39999914, 1.61983001, -6.17999601, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part3.Position = Vector3.new(-5.39999914, 1.61983001, -6.17999601)
- Part3.Size = Vector3.new(1.79999924, 2.20000052, 2.00000024)
- Part3.Anchored = true
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.CanCollide = false
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.FormFactor = Enum.FormFactor.Custom
- Part3.formFactor = Enum.FormFactor.Custom
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=93129244"
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=93129336"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Part5.Name = "Base"
- Part5.Parent = Model2
- Part5.CFrame = CFrame.new(-5.39999914, 1.219836, -6.12999296, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part5.Position = Vector3.new(-5.39999914, 1.219836, -6.12999296)
- Part5.Transparency = 1
- Part5.Size = Vector3.new(2, 1, 1)
- Part5.Anchored = true
- Part5.BottomSurface = Enum.SurfaceType.Smooth
- Part5.CanCollide = false
- Part5.Material = Enum.Material.SmoothPlastic
- Part5.TopSurface = Enum.SurfaceType.Smooth
- Weld6.Name = "Joint"
- Weld6.Parent = Part5
- Weld6.C0 = CFrame.new(0, 0.399993896, -0.0500011444, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld6.Part0 = Part5
- Weld6.Part1 = Part3
- Weld6.part1 = Part3
- SpecialMesh7.Parent = Part5
- SpecialMesh7.Scale = Vector3.new(1.25, 1.25, 1.25)
- UnionOperation8.Parent = Model2
- UnionOperation8.CFrame = CFrame.new(-5.6099968, 1.41984105, -6.55999708, 0.984807849, -0.173647985, 0, 0.173647985, 0.984807849, 0, 0, 0, 1)
- UnionOperation8.Orientation = Vector3.new(0, 0, 10)
- UnionOperation8.Position = Vector3.new(-5.6099968, 1.41984105, -6.55999708)
- UnionOperation8.Rotation = Vector3.new(0, 0, 10)
- UnionOperation8.Color = Color3.new(0.972549, 0.972549, 0.972549)
- UnionOperation8.Size = Vector3.new(0.299999148, 0.150003329, 0.299999297)
- UnionOperation8.Anchored = true
- UnionOperation8.CanCollide = false
- UnionOperation8.Material = Enum.Material.Neon
- Weld9.Name = "Joint"
- Weld9.Parent = UnionOperation8
- Weld9.C0 = CFrame.new(0.241538048, 0.160499573, 0.380000114, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849, 0, 0, 0, 1)
- Weld9.Part0 = UnionOperation8
- Weld9.Part1 = Part3
- Weld9.part1 = Part3
- UnionOperation10.Parent = Model2
- UnionOperation10.CFrame = CFrame.new(-5.33529711, 1.56131196, -6.12999678, 0.866025388, 0.500000238, 0, -0.500000238, 0.866025388, 0, 0, 0, 1)
- UnionOperation10.Orientation = Vector3.new(0, 0, -30)
- UnionOperation10.Position = Vector3.new(-5.33529711, 1.56131196, -6.12999678)
- UnionOperation10.Rotation = Vector3.new(0, 0, -30)
- UnionOperation10.Size = Vector3.new(1.30000305, 0.300018311, 1.29999924)
- UnionOperation10.Anchored = true
- UnionOperation10.CanCollide = false
- UnionOperation10.Material = Enum.Material.Fabric
- Weld11.Name = "Joint"
- Weld11.Parent = UnionOperation10
- Weld11.C0 = CFrame.new(-0.0853004456, 0.0183410645, -0.0499992371, 0.866025388, -0.500000238, 0, 0.500000238, 0.866025388, 0, 0, 0, 1)
- Weld11.Part0 = UnionOperation10
- Weld11.Part1 = Part3
- Weld11.part1 = Part3
- Model12.Name = "Right Arm"
- Model12.Parent = mas
- Model12.PrimaryPart = Part13
- Part13.Name = "Base"
- Part13.Parent = Model12
- Part13.CFrame = CFrame.new(2.90001798, 1.719836, -6.17999601, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part13.Position = Vector3.new(2.90001798, 1.719836, -6.17999601)
- Part13.Transparency = 1
- Part13.Size = Vector3.new(1, 2, 1)
- Part13.Anchored = true
- Part13.BottomSurface = Enum.SurfaceType.Smooth
- Part13.CanCollide = false
- Part13.Material = Enum.Material.SmoothPlastic
- Part13.TopSurface = Enum.SurfaceType.Smooth
- UnionOperation14.Parent = Model12
- UnionOperation14.CFrame = CFrame.new(2.89999008, 1.21986496, -6.1798892, -1, 0, -0, 0, 0, -1, 0, -1, -0)
- UnionOperation14.Orientation = Vector3.new(90, 180, 0)
- UnionOperation14.Position = Vector3.new(2.89999008, 1.21986496, -6.1798892)
- UnionOperation14.Rotation = Vector3.new(90, 0, -180)
- UnionOperation14.Color = Color3.new(0.972549, 0.972549, 0.972549)
- UnionOperation14.Size = Vector3.new(1.92824566, 1.928262, 0.199996948)
- UnionOperation14.Material = Enum.Material.Metal
- Weld15.Name = "Joint"
- Weld15.Parent = UnionOperation14
- Weld15.C0 = CFrame.new(-2.78949738e-05, 0.000108242035, -0.499984741, -1, 0, -0, 0, 0, -1, 0, -1, -0)
- Weld15.Part0 = UnionOperation14
- Weld15.Part1 = Part13
- Weld15.part1 = Part13
- Model16.Name = "Torso"
- Model16.Parent = mas
- Model16.PrimaryPart = Part17
- Part17.Name = "Base"
- Part17.Parent = Model16
- Part17.CFrame = CFrame.new(0.194646001, 1.78298295, -4.42007017, 0.990866959, 0, -0.134853125, 0, 1, 0, 0.134853125, 0, 0.990866959)
- Part17.Orientation = Vector3.new(0, -7.75, 0)
- Part17.Position = Vector3.new(0.194646001, 1.78298295, -4.42007017)
- Part17.Rotation = Vector3.new(0, -7.75, 0)
- Part17.Transparency = 1
- Part17.Size = Vector3.new(2.00000143, 2.00000024, 0.999999523)
- Part17.Anchored = true
- Part17.BottomSurface = Enum.SurfaceType.Smooth
- Part17.Material = Enum.Material.SmoothPlastic
- Part17.TopSurface = Enum.SurfaceType.Smooth
- UnionOperation18.Parent = Model16
- UnionOperation18.CFrame = CFrame.new(0.25771001, 1.85151994, -4.46697617, 0.418757796, 0.898028553, -0.13485226, -0.906306803, 0.422617823, 6.83113285e-07, 0.0569899194, 0.12221811, 0.990865886)
- UnionOperation18.Orientation = Vector3.new(0, -7.75, -65)
- UnionOperation18.Position = Vector3.new(0.25771001, 1.85151994, -4.46697617)
- UnionOperation18.Rotation = Vector3.new(0, -7.75, -65)
- UnionOperation18.Color = Color3.new(0.972549, 0.972549, 0.972549)
- UnionOperation18.Size = Vector3.new(1.78060913, 1.4895668, 0.910001755)
- UnionOperation18.CanCollide = false
- UnionOperation18.Material = Enum.Material.SmoothPlastic
- Weld19.Name = "Joint"
- Weld19.Parent = UnionOperation18
- Weld19.C0 = CFrame.new(0.0383834839, -0.079864502, 0.0549826622, 0.422618538, -0.906306803, -1.36718154e-06, 0.906308353, 0.422617823, -6.70552254e-08, 7.15255737e-07, 6.83113285e-07, 1.00000155)
- Weld19.Part0 = UnionOperation18
- Weld19.Part1 = Part17
- Weld19.part1 = Part17
- UnionOperation20.Parent = Model16
- UnionOperation20.CFrame = CFrame.new(0.194999993, 2.8828299, -4.41999388, -1, -5.96046448e-08, 0, 0, 0, -0.99999994, 5.96046448e-08, -1, 0)
- UnionOperation20.Orientation = Vector3.new(89.9799957, 0, 0)
- UnionOperation20.Position = Vector3.new(0.194999993, 2.8828299, -4.41999388)
- UnionOperation20.Rotation = Vector3.new(90, 0, 180)
- UnionOperation20.Color = Color3.new(0.639216, 0.635294, 0.647059)
- UnionOperation20.Size = Vector3.new(2.05999804, 2.06000805, 0.200012207)
- UnionOperation20.BrickColor = BrickColor.new("Medium stone grey")
- UnionOperation20.Material = Enum.Material.Metal
- UnionOperation20.brickColor = BrickColor.new("Medium stone grey")
- Weld21.Name = "Joint"
- Weld21.Parent = UnionOperation20
- Weld21.C0 = CFrame.new(0.00035405159, 7.34329224e-05, 1.09985352, -0.990866959, 0, 0.134853184, -0.134853184, 0, -0.990866959, 0, -0.99999994, 0)
- Weld21.Part0 = UnionOperation20
- Weld21.Part1 = Part17
- Weld21.part1 = Part17
- Model22.Name = "Weapon"
- Model22.Parent = mas
- Model22.PrimaryPart = UnionOperation30
- MeshPart23.Name = "TrailBlade"
- MeshPart23.Parent = Model22
- MeshPart23.CFrame = CFrame.new(8.69999886, 7.97447968, -18.380003, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- MeshPart23.Orientation = Vector3.new(0, 180, 180)
- MeshPart23.Position = Vector3.new(8.69999886, 7.97447968, -18.380003)
- MeshPart23.Rotation = Vector3.new(-180, 0, 0)
- MeshPart23.Color = Color3.new(0, 0, 0)
- MeshPart23.Velocity = Vector3.new(0, -16.3500004, 0)
- MeshPart23.Size = Vector3.new(0.200000003, 2.12599993, 0.600000024)
- MeshPart23.BrickColor = BrickColor.new("Really black")
- MeshPart23.CanCollide = false
- MeshPart23.Material = Enum.Material.Neon
- MeshPart23.brickColor = BrickColor.new("Really black")
- Trail24.Parent = MeshPart23
- Trail24.Attachment0 = nil
- Trail24.Attachment1 = nil
- Trail24.Color = ColorSequence.new(Color3.new(0, 0, 0),Color3.new(0, 0, 0))
- Trail24.Transparency = NumberSequence.new(0.5,0.76249998807907,0.91874998807907,1)
- Trail24.Lifetime = 0.10000000149012
- Weld25.Name = "Joint"
- Weld25.Parent = MeshPart23
- Weld25.C0 = CFrame.new(9.53674316e-07, 1.91990662, -4.29153442e-06, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- Weld25.Part0 = MeshPart23
- Weld25.Part1 = Part32
- Weld25.part1 = Part32
- MeshPart26.Name = "Blade"
- MeshPart26.Parent = Model22
- MeshPart26.CFrame = CFrame.new(8.69999886, 7.62445831, -18.380003, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- MeshPart26.Orientation = Vector3.new(0, 180, 180)
- MeshPart26.Position = Vector3.new(8.69999886, 7.62445831, -18.380003)
- MeshPart26.Rotation = Vector3.new(-180, 0, 0)
- MeshPart26.Color = Color3.new(0.972549, 0.972549, 0.972549)
- MeshPart26.Velocity = Vector3.new(0, -16.3500004, 0)
- MeshPart26.Size = Vector3.new(0.200000003, 1.22599995, 0.600000024)
- MeshPart26.BrickColor = BrickColor.new("Institutional white")
- MeshPart26.CanCollide = false
- MeshPart26.Material = Enum.Material.Wood
- MeshPart26.brickColor = BrickColor.new("Institutional white")
- Weld27.Name = "Joint"
- Weld27.Parent = MeshPart26
- Weld27.C0 = CFrame.new(9.53674316e-07, 1.56988525, -4.29153442e-06, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- Weld27.Part0 = MeshPart26
- Weld27.Part1 = Part32
- Weld27.part1 = Part32
- MeshPart28.Name = "Blade"
- MeshPart28.Parent = Model22
- MeshPart28.CFrame = CFrame.new(8.69999886, 7.62445831, -18.380003, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- MeshPart28.Orientation = Vector3.new(0, 180, 180)
- MeshPart28.Position = Vector3.new(8.69999886, 7.62445831, -18.380003)
- MeshPart28.Rotation = Vector3.new(-180, 0, 0)
- MeshPart28.Color = Color3.new(0.972549, 0.972549, 0.972549)
- MeshPart28.Velocity = Vector3.new(0, -16.3500004, 0)
- MeshPart28.Size = Vector3.new(0.300000012, 1.22599995, 0.0500000007)
- MeshPart28.BrickColor = BrickColor.new("Institutional white")
- MeshPart28.CanCollide = false
- MeshPart28.Material = Enum.Material.Wood
- MeshPart28.brickColor = BrickColor.new("Institutional white")
- Weld29.Name = "Joint"
- Weld29.Parent = MeshPart28
- Weld29.C0 = CFrame.new(9.53674316e-07, 1.56988525, -4.29153442e-06, 1, 0, 0, 0, -1, 0, 0, 0, -1)
- Weld29.Part0 = MeshPart28
- Weld29.Part1 = Part32
- Weld29.part1 = Part32
- UnionOperation30.Name = "Bostaff"
- UnionOperation30.Parent = Model22
- UnionOperation30.CFrame = CFrame.new(8.69999981, 3.45453644, -18.3800049, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- UnionOperation30.Position = Vector3.new(8.69999981, 3.45453644, -18.3800049)
- UnionOperation30.Color = Color3.new(0.972549, 0.972549, 0.972549)
- UnionOperation30.Velocity = Vector3.new(0, -16.3500004, 0)
- UnionOperation30.Size = Vector3.new(0.250000954, 6.90002441, 0.25)
- UnionOperation30.CanCollide = false
- UnionOperation30.Material = Enum.Material.Wood
- Weld31.Name = "Joint"
- Weld31.Parent = UnionOperation30
- Weld31.C0 = CFrame.new(0, 2.60003662, 6.19888306e-06, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld31.Part0 = UnionOperation30
- Weld31.Part1 = Part32
- Weld31.part1 = Part32
- Part32.Name = "MainBlade"
- Part32.Parent = Model22
- Part32.CFrame = CFrame.new(8.69999981, 6.05457306, -18.3799992, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part32.Position = Vector3.new(8.69999981, 6.05457306, -18.3799992)
- Part32.Transparency = 1
- Part32.Velocity = Vector3.new(0, -16.3500004, 0)
- Part32.Size = Vector3.new(0.400000006, 6.19999838, 0.800000072)
- Part32.BottomSurface = Enum.SurfaceType.Smooth
- Part32.CanCollide = false
- Part32.Material = Enum.Material.SmoothPlastic
- Part32.TopSurface = Enum.SurfaceType.Smooth
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end
- Create()
- wait(1)
- Player = game:GetService("Players").LocalPlayer
- PlayerGui = Player.PlayerGui
- Cam = workspace.CurrentCamera
- Backpack = Player.Backpack
- Character = Player.Character
- Humanoid = Character.Humanoid
- Mouse = Player:GetMouse()
- RootPart = Character["HumanoidRootPart"]
- Torso = Character["Torso"]
- Head = Character["Head"]
- RightArm = Character["Right Arm"]
- LeftArm = Character["Left Arm"]
- RightLeg = Character["Right Leg"]
- LeftLeg = Character["Left Leg"]
- RootJoint = RootPart["RootJoint"]
- Neck = Torso["Neck"]
- RightShoulder = Torso["Right Shoulder"]
- LeftShoulder = Torso["Left Shoulder"]
- RightHip = Torso["Right Hip"]
- LeftHip = Torso["Left Hip"]
- local sick = Instance.new("Sound",Character)
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- --//=================================\\
- --|| USEFUL VALUES
- --\\=================================//
- Animation_Speed = 3
- Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
- local Speed = 16
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- local DAMAGEMULTIPLIER = 1
- local ANIM = "Idle"
- local ATTACK = false
- local MELEE = false
- local EQUIPPED = false
- local HOLD = false
- local COMBO = 1
- local Rooted = false
- local SINE = 0
- local KEYHOLD = false
- local CHANGE = 2 / Animation_Speed
- local WALKINGANIM = false
- local VALUE1 = false
- local VALUE2 = false
- local ROBLOXIDLEANIMATION = IT("Animation")
- ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
- ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- --ROBLOXIDLEANIMATION.Parent = Humanoid
- local WEAPONGUI = IT("ScreenGui", PlayerGui)
- WEAPONGUI.Name = "Weapon GUI"
- local Effects = IT("Folder", Character)
- Effects.Name = "Effects"
- local ANIMATOR = Humanoid.Animator
- local ANIMATE = Character.Animate
- local UNANCHOR = true
- local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
- local EXTRATRANS = 0
- local DASHING = false
- --//=================================\\
- --\\=================================//
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = Frame_Speed
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- --//=================================\\
- --\\=================================//
- --//=================================\\
- --|| SOME FUNCTIONS
- --\\=================================//
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- function PositiveAngle(NUMBER)
- if NUMBER >= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function NegativeAngle(NUMBER)
- if NUMBER <= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- local function weldBetween(a, b)
- local weldd = Instance.new("ManualWeld")
- weldd.Part0 = a
- weldd.Part1 = b
- weldd.C0 = CFrame.new()
- weldd.C1 = b.CFrame:inverse() * a.CFrame
- weldd.Parent = a
- return weldd
- 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 = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
- end
- function 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 CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
- local frame = IT("Frame")
- frame.BackgroundTransparency = TRANSPARENCY
- frame.BorderSizePixel = BORDERSIZEPIXEL
- frame.Position = POSITION
- frame.Size = SIZE
- frame.BackgroundColor3 = COLOR
- frame.BorderColor3 = BORDERCOLOR
- frame.Name = NAME
- frame.Parent = PARENT
- return frame
- end
- function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
- local label = IT("TextLabel")
- label.BackgroundTransparency = 1
- label.Size = UD2(1, 0, 1, 0)
- label.Position = UD2(0, 0, 0, 0)
- label.TextColor3 = TEXTCOLOR
- label.TextStrokeTransparency = STROKETRANSPARENCY
- label.TextTransparency = TRANSPARENCY
- label.FontSize = TEXTFONTSIZE
- label.Font = TEXTFONT
- label.BorderSizePixel = BORDERSIZEPIXEL
- label.TextScaled = false
- label.Text = TEXT
- label.Name = NAME
- label.Parent = PARENT
- return label
- end
- function NoOutlines(PART)
- PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
- local NEWWELD = IT(TYPE)
- NEWWELD.Part0 = PART0
- NEWWELD.Part1 = PART1
- NEWWELD.C0 = C0
- NEWWELD.C1 = C1
- NEWWELD.Parent = PARENT
- return NEWWELD
- end
- local S = IT("Sound")
- function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = S:Clone()
- NEWSOUND.Parent = PARENT
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- NEWSOUND:play()
- if DOESLOOP == true then
- NEWSOUND.Looped = true
- else
- repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
- NEWSOUND.Playing = false
- NEWSOUND:remove()
- end
- end))
- return NEWSOUND
- end
- function CFrameFromTopBack(at, top, back)
- local right = top:Cross(back)
- return CF(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
- --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- function WACKYEFFECT(Table)
- local TYPE = (Table.EffectType or "Sphere")
- local SIZE = (Table.Size or VT(1,1,1))
- local ENDSIZE = (Table.Size2 or VT(0,0,0))
- local TRANSPARENCY = (Table.Transparency or 0)
- local ENDTRANSPARENCY = (Table.Transparency2 or 1)
- local CFRAME = (Table.CFrame or Torso.CFrame)
- local MOVEDIRECTION = (Table.MoveToPos or nil)
- local ROTATION1 = (Table.RotationX or 0)
- local ROTATION2 = (Table.RotationY or 0)
- local ROTATION3 = (Table.RotationZ or 0)
- local MATERIAL = (Table.Material or "Neon")
- local COLOR = (Table.Color or C3(1,1,1))
- local TIME = (Table.Time or 45)
- local SOUNDID = (Table.SoundID or nil)
- local SOUNDPITCH = (Table.SoundPitch or nil)
- local SOUNDVOLUME = (Table.SoundVolume or nil)
- coroutine.resume(coroutine.create(function()
- local PLAYSSOUND = false
- local SOUND = nil
- local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
- if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
- PLAYSSOUND = true
- SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
- end
- EFFECT.Color = COLOR
- local MSH = nil
- if TYPE == "Sphere" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
- elseif TYPE == "Block" then
- MSH = IT("BlockMesh",EFFECT)
- MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
- elseif TYPE == "Wave" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
- elseif TYPE == "Ring" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
- elseif TYPE == "Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Round Slash" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
- elseif TYPE == "Swirl" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
- elseif TYPE == "Skull" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
- elseif TYPE == "Crystal" then
- MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
- end
- if MSH ~= nil then
- local MOVESPEED = nil
- if MOVEDIRECTION ~= nil then
- MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
- end
- local GROWTH = SIZE - ENDSIZE
- local TRANS = TRANSPARENCY - ENDTRANSPARENCY
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = CFRAME
- end
- for LOOP = 1, TIME+1 do
- Swait()
- MSH.Scale = MSH.Scale - GROWTH/TIME
- if TYPE == "Wave" then
- MSH.Offset = VT(0,0,-MSH.Scale.X/8)
- end
- EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
- if TYPE == "Block" then
- EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
- else
- EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
- end
- if MOVEDIRECTION ~= nil then
- local ORI = EFFECT.Orientation
- EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
- EFFECT.Orientation = ORI
- end
- end
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until SOUND.Playing == false
- EFFECT:remove()
- end
- else
- if PLAYSSOUND == false then
- EFFECT:remove()
- else
- repeat Swait() until SOUND.Playing == false
- EFFECT:remove()
- end
- end
- end))
- end
- function MakeForm(PART,TYPE)
- if TYPE == "Cyl" then
- local MSH = IT("CylinderMesh",PART)
- elseif TYPE == "Ball" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Sphere"
- elseif TYPE == "Wedge" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Wedge"
- end
- end
- Debris = game:GetService("Debris")
- function CastProperRay(StartPos, EndPos, Distance, Ignore)
- local DIRECTION = CF(StartPos,EndPos).lookVector
- return Raycast(StartPos, DIRECTION, Distance, Ignore)
- end
- function turnto(position)
- RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
- end
- function WaveParticles(Position,Size,Color)
- local BASE = CreatePart(3, Effects, "Neon", 0, 1, BRICKC("Pearl"), "Shockwave", VT(0,0,0), true)
- BASE.CFrame = CF(Position)
- local A = IT("Attachment",BASE)
- local WAVE = script.Wave:Clone()
- WAVE.Parent = A
- WAVE.Size = NumberSequence.new(0,Size)
- WAVE.Color = ColorSequence.new(Color)
- Debris:AddItem(BASE,0.5)
- WAVE:Emit(1)
- end
- --//=================================\\
- --|| WEAPON CREATION
- --\\=================================//
- for _, c in pairs(Character:GetChildren()) do
- if script:FindFirstChild(c.Name) then
- local Part = script[c.Name]
- Part.Parent = Character
- Part.Base.Anchored = false
- Part:SetPrimaryPartCFrame(c.CFrame)
- weldBetween(c,Part.Base)
- for _, e in pairs(Part:GetChildren()) do
- if e:IsA("BasePart") and e.Name ~= "Base" then
- e.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- e.Locked = true
- e.Anchored = false
- e.Parent = Character
- weldBetween(c,e)
- end
- end
- Part:remove()
- end
- end
- local Weapon = script.Weapon
- Weapon.Parent = Character
- local Grip = CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, Weapon.Bostaff, CF(0, -1, 0)*ANGLES(RAD(-90),RAD(0),RAD(0)), CF(0, 0, 0))
- --[[local BONE = CreatePart(3, nil, "SmoothPlastic", 0, 0, BRICKC("Bright yellow"), "Tail", VT(0.3,0.5,0.3), false)
- MakeForm(BONE,"Cyl")
- local TAIL = {}
- local LASTPART = Torso
- local SIZE = BONE.Size
- for i = 1, 15 do
- local PART = BONE:Clone()
- PART.Anchored = false
- PART.Parent = Character
- PART.Size = SIZE*((17-i)/10)/1.6
- if LASTPART == Torso then
- local WELD = CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, PART, CF(0,-1,0.6)* ANGLES(RAD(-55), RAD(0), RAD(0)), CF(0, 0, 0))
- LASTPART = PART
- table.insert(TAIL,WELD)
- else
- local WELD = CreateWeldOrSnapOrMotor("Weld", LASTPART, LASTPART, PART, CF(0,-PART.Size.Y/2,0), CF(0, PART.Size.Y/2, 0))
- LASTPART = PART
- table.insert(TAIL,WELD)
- end
- end]]--
- for _, c in pairs(Character:GetChildren()) do
- if c.ClassName == "Part" and c.Name ~= "Eye" then
- c.Material = "SmoothPlastic"
- if c:FindFirstChildOfClass("ParticleEmitter") then
- c:FindFirstChildOfClass("ParticleEmitter"):remove()
- end
- if c == LeftLeg or c == RightLeg then
- c.Color = C3(0.12,0.12,0.12)
- elseif c == Torso then
- c.Color = C3(0.15,0.15,0.15)
- else
- c.BrickColor = BRICKC"Bright yellow"
- end
- if c == Head then
- if c:FindFirstChild("face") then
- c.face:remove()
- end
- end
- elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.Name == "Body Colors" then
- c:remove()
- elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
- c:remove()
- end
- end
- local BODY = {}
- for _, c in pairs(Character:GetDescendants()) do
- if c:IsA("BasePart") and c.Name ~= "Handle" then
- if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
- c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- end
- table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
- elseif c:IsA("JointInstance") then
- table.insert(BODY,{c,c.Parent,nil,nil,nil})
- end
- end
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- if PART.ClassName == "Part" and PART ~= RootPart then
- PART.Material = MATERIAL
- PART.Color = COLOR
- PART.Transparency = TRANSPARENCY
- end
- PART.AncestryChanged:Connect(function()
- PART.Parent = PARENT
- end)
- end
- end
- function refit()
- Character.Parent = workspace
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- if PART:IsA("BasePart") and PART ~= RootPart then
- PART.Material = MATERIAL
- PART.Color = COLOR
- PART.Transparency = TRANSPARENCY+EXTRATRANS
- end
- if PART.Parent ~= PARENT then
- Humanoid:remove()
- PART.Parent = PARENT
- Humanoid = IT("Humanoid",Character)
- end
- end
- end
- end
- Humanoid.Died:connect(function()
- refit()
- end)
- local SKILLTEXTCOLOR = C3(1,1,1)
- local SKILLFONT = "Fantasy"
- local SKILLTEXTSIZE = 5
- local MOBILITY = {"Z","B","C","G","H"}
- local ATTACKS = {"Mouse","Q","E","V","X","M"}
- local MOBILITYFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.71, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
- local TEXT = CreateLabel(MOBILITYFRAME, "[MOBILITY]", SKILLTEXTCOLOR, SKILLTEXTSIZE+1, SKILLFONT, 0, 2, 0.5, "Skill text")
- local ATTACKSFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
- local TEXT = CreateLabel(ATTACKSFRAME, "[ATTACKS]", SKILLTEXTCOLOR, SKILLTEXTSIZE+1, SKILLFONT, 0, 2, 0.5, "Skill text")
- for i = 1, #MOBILITY do
- local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.71, 0, 0.90-(0.04*i), 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
- local SKILLTEXT = CreateLabel(SKILLFRAME, "["..MOBILITY[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Skill text")
- end
- for i = 1, #ATTACKS do
- local SKILLFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.90-(0.04*i), 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill Frame")
- local SKILLTEXT = CreateLabel(SKILLFRAME, "["..ATTACKS[i].."]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Skill text")
- end
- --//=================================\\
- --|| DAMAGING
- --\\=================================//
- function ApplyDamage(Humanoid,Damage)
- Damage = Damage * DAMAGEMULTIPLIER
- if Humanoid.Health < 2000 then
- if Humanoid.Health - Damage > 0 then
- Humanoid.Health = Humanoid.Health - Damage
- else
- Humanoid.Parent:BreakJoints()
- end
- else
- Humanoid.Parent:BreakJoints()
- end
- end
- function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,INSTAKILL)
- local CHILDREN = workspace:GetDescendants()
- for index, CHILD in pairs(CHILDREN) do
- if CHILD.ClassName == "Model" and CHILD ~= Character then
- local HUM = CHILD:FindFirstChildOfClass("Humanoid")
- if HUM then
- local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
- if TORSO then
- if (TORSO.Position - POSITION).Magnitude <= RANGE then
- if INSTAKILL == true then
- CHILD:BreakJoints()
- else
- local DMG = MRANDOM(MINDMG,MAXDMG)
- ApplyDamage(HUM,DMG)
- end
- if FLING > 0 then
- for _, c in pairs(CHILD:GetChildren()) do
- if c:IsA("BasePart") then
- local bv = Instance.new("BodyVelocity")
- bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
- bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
- bv.Parent = c
- Debris:AddItem(bv,0.05)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- function APPLYMELEE(PART,MINDMG,MAXDMG,CANSTUN)
- local HITS = {}
- local TOUCH = PART.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChildOfClass("Humanoid") then
- local HUM = hit.Parent:FindFirstChildOfClass("Humanoid")
- local TORSO = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso")
- if TORSO and HUM.Health > 0 then
- local PASS = true
- for i = 1, #HITS do
- if HITS[i] == hit.Parent then
- PASS = false
- end
- end
- table.insert(HITS,hit.Parent)
- if PASS == true then
- for i = 1, 3 do
- WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(0.3,0.3,0.3), Size2 = VT(0,25,0), Transparency = 0, Transparency2 = 1, CFrame = CF(TORSO.Position) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = MRANDOM(-35,35), RotationZ = 0, Material = "Glass", Color = C3(0.3,0,0), SoundID = nil, SoundPitch = MRANDOM(7,15)/10, SoundVolume = 10})
- end
- ApplyDamage(HUM,MRANDOM(MINDMG,MAXDMG),TORSO,CANSTUN)
- CreateSound(HITPLAYERSOUNDS[MRANDOM(1,#HITPLAYERSOUNDS)],TORSO,2,MRANDOM(8,12)/10,false)
- end
- end
- end
- end)
- return TOUCH
- end
- --//=================================\\
- --|| MOBILITY STUFF
- --\\=================================//
- function Mobility(CFR)
- Weapon.TrailBlade.Trail.Enabled = false
- local POS = RootPart.Position
- EXTRATRANS = 1
- DASHING = true
- WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(5,5,5), Size2 = VT(12,12,12), Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = 182765513, SoundPitch = 1, SoundVolume = 3})
- repeat
- RootPart.CFrame = RootPart.CFrame*CFR
- for i = 1, 5 do
- WACKYEFFECT({Time = MRANDOM(10,40), EffectType = "Sphere", Size = VT(2,2,0.7), Size2 = VT(0,0,10), Transparency = 0, Transparency2 = 1, CFrame = CF(CF(POS) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)))*CF(0,0,2).p,RootPart.Position), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- end
- WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(6,8,6), Size2 = VT(0,4,0), Transparency = 1, Transparency2 = 0.8, CFrame = CF(RootPart.Position,POS) * ANGLES(RAD(-90), RAD(0), RAD(0)), MoveToPos = CF(RootPart.Position,POS)*CF(0,0,-35).p, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
- POS = RootPart.Position
- RootPart.Velocity = VT(0,0,0)
- Swait()
- until KEYHOLD == false or ATTACK == true or MELEE == true
- EXTRATRANS = 0
- DASHING = false
- WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(5,5,5), Size2 = VT(12,12,12), Transparency = 0, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = 182765513, SoundPitch = 1, SoundVolume = 3})
- RootPart.Velocity = VT(0,0,0)
- Weapon.TrailBlade.Trail.Enabled = true
- end
- --//=================================\\
- --|| ATTACK FUNCTIONS AND STUFF
- --\\=================================//
- function Clicks()
- MELEE = true
- Rooted = false
- Weapon.MainBlade.CanCollide = true
- repeat
- if COMBO == 1 and ATTACK == false then
- COMBO = 2
- for i=0, 0.15, 0.1 / Animation_Speed do
- Swait()
- if ATTACK == true then
- break
- end
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-45)), 2 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(40)), 2 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.15, 0.5, -0.5) * ANGLES(RAD(90), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 2 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 2 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 2 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-60), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 2 / Animation_Speed)
- end
- CreateSound(143501853,Weapon.TrailBlade,2,MRANDOM(8,13)/10,false)
- local DMGER = APPLYMELEE(Weapon.MainBlade,8,12,false)
- for i=0, 0.4, 0.1 / Animation_Speed do
- Swait()
- if ATTACK == true then
- break
- end
- Grip.C1 = Clerp(Grip.C1,CF(0, -1, 0.35) * ANGLES(RAD(80), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(80)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(-50)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- DMGER:Disconnect()
- elseif COMBO == 2 and ATTACK == false then
- COMBO = 3
- local DMGER = APPLYMELEE(Weapon.MainBlade,25,35,false)
- CreateSound(134012322,Weapon.TrailBlade,4,MRANDOM(8,13)/10,false)
- for i = 1, 15 do
- Swait()
- if ATTACK == true then
- break
- end
- RootPart.CFrame = RootPart.CFrame * CF(0,0,-0.02)
- Grip.C1 = Clerp(Grip.C1,CF(0, 1, 0) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(80-(i*(360/15)))), 2.5 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(30), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(0), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.25, -0.6) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- DMGER:Disconnect()
- elseif COMBO == 3 and ATTACK == false then
- COMBO = 1
- for i=0, 0.5, 0.1 / Animation_Speed do
- Swait()
- if ATTACK == true then
- break
- end
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(60), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-25)), 2 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(25)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(45)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- CreateSound(143501853,Weapon.TrailBlade,2,MRANDOM(8,13)/10,false)
- local DMGER = APPLYMELEE(Weapon.MainBlade,10,15,false)
- for i=0, 0.6, 0.1 / Animation_Speed do
- Swait()
- if ATTACK == true then
- break
- end
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(55), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(80)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(-40)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(0)) * ANGLES(RAD(0), RAD(120), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- DMGER:Disconnect()
- end
- until HOLD == false or ATTACK == true
- if COMBO == 2 and ATTACK == false then
- for i=0, 0.5, 0.1 / Animation_Speed do
- Swait()
- if ATTACK == true then
- break
- end
- Grip.C1 = Clerp(Grip.C1,CF(0, -1, 0.35) * ANGLES(RAD(80), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(80)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(-50)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- end
- Weapon.MainBlade.CanCollide = false
- coroutine.resume(coroutine.create(function()
- for i = 1, 50 do
- Swait()
- if MELEE == true then
- break
- end
- end
- if MELEE == false then
- COMBO = 1
- end
- end))
- MELEE = false
- Rooted = false
- end
- function Aerial()
- ATTACK = true
- Rooted = false
- local DMGER = APPLYMELEE(Weapon.MainBlade,35,45,false)
- CreateSound(134012322,Weapon.TrailBlade,4,MRANDOM(8,13)/10,false)
- for i = 1, 12 do
- Swait()
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(-i*(360/10))), 2 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(-65)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- DMGER:Disconnect()
- ATTACK = false
- Rooted = false
- end
- function ZenBullet()
- ATTACK = true
- Rooted = false
- if MELEE == true then
- for i=0, 0.3, 0.1 / Animation_Speed do
- Swait()
- local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(95), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- else
- local GYRO = IT("BodyGyro",RootPart)
- GYRO.D = 2
- GYRO.P = 2000
- GYRO.MaxTorque = VT(0,4000000,0)
- coroutine.resume(coroutine.create(function()
- repeat
- Swait()
- GYRO.CFrame = CF(RootPart.Position,Mouse.Hit.p)
- until ATTACK == false
- GYRO:Remove()
- end))
- for i=0, 1, 0.1 / Animation_Speed do
- Swait()
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(95), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- end
- ATTACK = false
- Rooted = false
- end
- function AttackTemplate()
- ATTACK = true
- Rooted = false
- for i=0, 1, 0.1 / Animation_Speed do
- Swait()
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(95), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- ATTACK = false
- Rooted = false
- end
- --//=================================\\
- --|| ASSIGN THINGS TO KEYS
- --\\=================================//
- function MouseDown(Mouse)
- HOLD = true
- local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
- if HITFLOOR then
- if ATTACK == false and MELEE == false then
- Clicks()
- end
- elseif ATTACK == false then
- Aerial()
- end
- end
- function MouseUp(Mouse)
- HOLD = false
- end
- function KeyDown(Key)
- KEYHOLD = true
- --MOBILITY--
- if DASHING == false and MELEE == false then
- if Key == "z" and ATTACK == false then
- Mobility(CF(0,5,0))
- end
- if Key == "b" and ATTACK == false then
- Mobility(CF(0,0,-5))
- end
- if Key == "c" and ATTACK == false then
- Mobility(CF(0,0,5))
- end
- if Key == "g" and ATTACK == false then
- Mobility(CF(5,0,0))
- end
- if Key == "h" and ATTACK == false then
- Mobility(CF(-5,0,0))
- end
- end
- --ATTACKS--
- if Key == "q" and ATTACK == false then
- end
- if Key == "e" and ATTACK == false then
- end
- if Key == "v" and ATTACK == false then
- end
- if Key == "x" and ATTACK == false then
- end
- if Key == "m" and ATTACK == false then
- end
- end
- function KeyUp(Key)
- KEYHOLD = false
- end
- Mouse.Button1Down:connect(function(NEWKEY)
- MouseDown(NEWKEY)
- end)
- Mouse.Button1Up:connect(function(NEWKEY)
- MouseUp(NEWKEY)
- end)
- Mouse.KeyDown:connect(function(NEWKEY)
- KeyDown(NEWKEY)
- end)
- Mouse.KeyUp:connect(function(NEWKEY)
- KeyUp(NEWKEY)
- end)
- --//=================================\\
- --\\=================================//
- function unanchor()
- for _, c in pairs(Character:GetChildren()) do
- if c:IsA("BasePart") and c ~= RootPart then
- c.Anchored = false
- end
- end
- if UNANCHOR == true then
- RootPart.Anchored = false
- else
- RootPart.Anchored = true
- end
- end
- --//=================================\\
- --|| WRAP THE WHOLE SCRIPT UP
- --\\=================================//
- Humanoid.Changed:connect(function(Jump)
- if Jump == "Jump" and (Disable_Jump == true) then
- Humanoid.Jump = false
- end
- end)
- while true do
- Swait()
- script.Parent = WEAPONGUI
- ANIMATE.Parent = nil
- for _,v in next, Humanoid:GetPlayingAnimationTracks() do
- v:Stop();
- end
- if Character:FindFirstChildOfClass("Humanoid") == nil then
- Humanoid = IT("Humanoid",Character)
- end
- SINE = SINE + CHANGE
- local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
- local TORSOVERTICALVELOCITY = RootPart.Velocity.y
- local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
- local WALKSPEEDVALUE = 4
- if ANIM == "Walk" and TORSOVELOCITY > 1 then
- RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.05 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2- 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
- elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
- RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
- ANIM = "Jump"
- if ATTACK == false and MELEE == false then
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(25 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-35), RAD(0), RAD(-25 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.4, -0.6) * ANGLES(RAD(1), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
- ANIM = "Fall"
- if ATTACK == false and MELEE == false then
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(45 + 10 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(35 - 4 * COS(SINE / 6)), RAD(0), RAD(-45 - 10 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.3, -0.7) * ANGLES(RAD(-25 + 5 * SIN(SINE / 12)), RAD(90), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.8, -0.3) * ANGLES(RAD(-10), RAD(-80), RAD(0)) * ANGLES(RAD(-1 * SIN(SINE / 6)), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
- ANIM = "Idle"
- if ATTACK == false and MELEE == false then
- Grip.C1 = Clerp(Grip.C1,CF(0, 0.2 + 0.1 * SIN(SINE / 12), 0) * ANGLES(RAD(5), RAD(2 * COS(SINE / 12)), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.1 * SIN(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12) + ((1) - 1)) * ANGLES(RAD(10), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5, -0.4) * ANGLES(RAD(95), RAD(0), RAD(15+1 * COS(SINE / 12))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5, 0.4) * ANGLES(RAD(-45-2 * COS(SINE / 12)), RAD(0), RAD(45+2 * COS(SINE / 12))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(-75), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
- ANIM = "Walk"
- if ATTACK == false and MELEE == false then
- Grip.C1 = Clerp(Grip.C1,CF(0, 0, 0) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed)
- RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-5), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(25), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(-5), RAD(85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(-5), RAD(-85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
- end
- end
- --[[for E = 1, #TAIL do
- TAIL[E].C1 = Clerp(TAIL[E].C1,CF(0, 0, 0) * ANGLES(RAD(5-1 * SIN(SINE / 3)), RAD(-2 * COS(SINE / 6)), RAD(4 * SIN(SINE / 6))), 1 / Animation_Speed)
- end]]
- unanchor()
- Humanoid.MaxHealth = 15e15
- Humanoid.Health = 15e15
- if Rooted == false then
- Disable_Jump = false
- Humanoid.WalkSpeed = Speed
- elseif Rooted == true then
- Disable_Jump = true
- Humanoid.WalkSpeed = 0
- end
- refit()
- for _, c in pairs(Character:GetChildren()) do
- if c.ClassName == "Part" and c.Name ~= "Eye" then
- c.Material = "SmoothPlastic"
- if c:FindFirstChildOfClass("ParticleEmitter") then
- c:FindFirstChildOfClass("ParticleEmitter"):remove()
- end
- if c == LeftLeg or c == RightLeg then
- c.Color = C3(0.12,0.12,0.12)
- if c:FindFirstChildOfClass("BlockMesh") == nil then
- IT("BlockMesh",c)
- end
- elseif c == Torso then
- c.Color = C3(0.15,0.15,0.15)
- if c:FindFirstChildOfClass("BlockMesh") == nil then
- IT("BlockMesh",c)
- end
- else
- c.BrickColor = BRICKC"Bright yellow"
- end
- if c == Head then
- if c:FindFirstChild("face") then
- c.face:remove()
- end
- end
- elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.Name == "Body Colors" then
- c:remove()
- elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
- c:remove()
- end
- end
- sick.SoundId = "rbxassetid://601021377"
- sick.Looped = true
- sick.Pitch = 1
- sick.Volume = 1
- sick.Parent = Character
- sick.Playing = true
- Humanoid.Name = "ZenMan"
- Effects.Parent = Character
- for _, c in pairs(Character:GetChildren()) do
- if c:IsA("BasePart") and ATTACK == false then
- for _, e in pairs(c:GetChildren()) do
- if e:IsA("ParticleEmitter") or e:IsA("BodyPosition") or e:IsA("BodyGyro") then
- e:remove()
- end
- end
- end
- end
- if Head:FindFirstChild("face") then
- Head.face:remove()
- elseif Head:FindFirstChildOfClass("Sound") then
- Head:FindFirstChildOfClass("Sound"):remove()
- end
- end
- --//=================================\\
- --\\=================================//
- --//====================================================\\--
- --|| END OF SCRIPT
- --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement