Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- wait(0.016666666666667)
- Effects = {}
- local Player = game.Players.localPlayer
- local Character = Player.Character
- local cn = CFrame.new
- local Humanoid = Character.Humanoid
- local mouse = Player:GetMouse()
- local m = Instance.new("Model", Character)
- m.Name = "WeaponModel"
- local effect = Instance.new("Model", Character)
- effect.Name = "Effect"
- local LeftArm = Character["Left Arm"]
- local RightArm = Character["Right Arm"]
- local LeftLeg = Character["Left Leg"]
- local RightLeg = Character["Right Leg"]
- local Head = Character.Head
- local Torso = Character.Torso
- local cam = game.Workspace.CurrentCamera
- local RootPart = Character.HumanoidRootPart
- local RootJoint = RootPart.RootJoint
- local equipped = false
- local attack = false
- local Anim = "Idle"
- local idle = 0
- local attacktype = 1
- local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- local velocity = RootPart.Velocity.y
- local sine = 0
- local change = 1
- local mana = 0
- local it = Instance.new
- vt = Vector3.new
- local grabbed = false
- local cf = CFrame.new
- local mr = math.rad
- local angles = CFrame.Angles
- local ud = UDim2.new
- local c3 = Color3.new
- local NeckCF = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
- Humanoid.Animator:Destroy()
- Humanoid.WalkSpeed = 32
- Character.Animate:Destroy()
- local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
- local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
- local LHCF = (CFrame.fromEulerAnglesXYZ(0, -1.6, 0))
- RSH = nil
- RW = Instance.new("Weld")
- LW = Instance.new("Weld")
- RH = Torso["Right Hip"]
- LH = Torso["Left Hip"]
- RSH = Torso["Right Shoulder"]
- LSH = Torso["Left Shoulder"]
- RSH.Parent = nil
- LSH.Parent = nil
- RW.Name = "RW"
- RW.Part0 = Torso
- RW.C0 = cf(1.5, 0.5, 0)
- RW.C1 = cf(0, 0.5, 0)
- RW.Part1 = RightArm
- RW.Parent = Torso
- LW.Name = "LW"
- LW.Part0 = Torso
- LW.C0 = cf(-1.5, 0.5, 0)
- LW.C1 = cf(0, 0.5, 0)
- LW.Part1 = LeftArm
- LW.Parent = Torso
- clerp = function(a, b, t)
- return a:lerp(b, t)
- end
- local RbxUtility = LoadLibrary("RbxUtility")
- local Create = RbxUtility.Create
- RemoveOutlines = function(part)
- part.TopSurface = 10
- end
- CreatePart = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
- local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material})
- RemoveOutlines(Part)
- return Part
- end
- CreateMesh = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
- local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
- if Mesh == "SpecialMesh" then
- Msh.MeshType = MeshType
- Msh.MeshId = MeshId
- end
- return Msh
- end
- local co1 = 10
- local co2 = 30
- local co3 = 15
- local co4 = 60
- local co5 = 1
- local cooldown1 = 10
- local cooldown2 = 30
- local cooldown3 = 15
- local cooldown4 = 60
- local cooldown5 = 0
- local maxEnergy = 0
- local Energy = 0
- local skill1stam = 14
- local skill2stam = 0
- local skill3stam = 0
- local skill4stam = 0
- local recovermana = 5
- local skillcolorscheme = BrickColor.new("Pastel Blue").Color
- local scrn = Instance.new("ScreenGui", Player.PlayerGui)
- makeframe = function(par, trans, pos, size, color)
- local frame = Instance.new("Frame", par)
- frame.BackgroundTransparency = trans
- frame.BorderSizePixel = 0
- frame.Position = pos
- frame.Size = size
- frame.BackgroundColor3 = color
- return frame
- end
- makelabel = function(par, text)
- local label = Instance.new("TextLabel", par)
- label.BackgroundTransparency = 1
- label.Size = UDim2.new(1, 0, 1, 0)
- label.Position = UDim2.new(0, 0, 0, 0)
- label.TextColor3 = Color3.new(255, 255, 255)
- label.TextStrokeTransparency = 0
- label.FontSize = Enum.FontSize.Size32
- label.Font = Enum.Font.SourceSansBold
- label.BorderSizePixel = 0
- label.TextScaled = true
- label.Text = text
- end
- outsideframe1 = makeframe(scrn, 0.5, UDim2.new(0.05, 0, 0.8, 0), UDim2.new(0.3, 0, 0.1, 0), skillcolorscheme)
- outsideframe2 = makeframe(scrn, 0.5, UDim2.new(0.4, 0, 0.8, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
- outsideframe3 = makeframe(scrn, 0.5, UDim2.new(0.6, 0, 0.8, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
- outsideframe4 = makeframe(scrn, 0.5, UDim2.new(.8, 0, 0.8, 0), UDim2.new(0.16, 0, 0.1, 0), skillcolorscheme)
- outsideframe5 = makeframe(scrn, 0.5, UDim2.new(.05, 0, 0.9, 0), UDim2.new(0.91, 0, 0.1, 0), skillcolorscheme)
- bar1 = makeframe(outsideframe1, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
- bar2 = makeframe(outsideframe2, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
- bar3 = makeframe(outsideframe3, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
- bar4 = makeframe(outsideframe4, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
- bar5 = makeframe(outsideframe5, 0, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme)
- text1 = Instance.new("TextLabel", outsideframe1)
- text1.BackgroundTransparency = 1
- text1.Size = UDim2.new(1, 0, 1, 0)
- text1.Position = UDim2.new(0, 0, 0, 0)
- text1.TextColor3 = Color3.new(255, 255, 255)
- text1.TextStrokeTransparency = 0
- text1.FontSize = Enum.FontSize.Size18
- text1.Font = Enum.Font.SourceSansLight
- text1.BorderSizePixel = 0
- text1.TextScaled = true
- text1.Text = "[Z]\n Reload (ammo)"
- text2 = Instance.new("TextLabel", outsideframe2)
- text2.BackgroundTransparency = 1
- text2.Size = UDim2.new(1, 0, 1, 0)
- text2.Position = UDim2.new(0, 0, 0, 0)
- text2.TextColor3 = Color3.new(255, 255, 255)
- text2.TextStrokeTransparency = 0
- text2.FontSize = Enum.FontSize.Size18
- text2.Font = Enum.Font.SourceSansLight
- text2.BorderSizePixel = 0
- text2.TextScaled = true
- text2.Text = "[X]\n Teleport"
- text3 = Instance.new("TextLabel", outsideframe3)
- text3.BackgroundTransparency = 1
- text3.Size = UDim2.new(1, 0, 1, 0)
- text3.Position = UDim2.new(0, 0, 0, 0)
- text3.TextColor3 = Color3.new(255, 255, 255)
- text3.TextStrokeTransparency = 0
- text3.FontSize = Enum.FontSize.Size18
- text3.Font = Enum.Font.SourceSansLight
- text3.BorderSizePixel = 0
- text3.TextScaled = true
- text3.Text = "[C]\n Explosive Shot"
- text4 = Instance.new("TextLabel", outsideframe4)
- text4.BackgroundTransparency = 1
- text4.Size = UDim2.new(1, 0, 1, 0)
- text4.Position = UDim2.new(0, 0, 0, 0)
- text4.TextColor3 = Color3.new(255, 255, 255)
- text4.TextStrokeTransparency = 0
- text4.FontSize = Enum.FontSize.Size18
- text4.Font = Enum.Font.SourceSansLight
- text4.BorderSizePixel = 0
- text4.TextScaled = true
- text4.Text = "[V]\n Decoy"
- text5 = Instance.new("TextLabel", outsideframe5)
- text5.BackgroundTransparency = 1
- text5.Size = UDim2.new(1, 0, 1, 0)
- text5.Position = UDim2.new(0, 0, 0, 0)
- text5.TextColor3 = Color3.new(255, 255, 255)
- text5.TextStrokeTransparency = 0
- text5.FontSize = Enum.FontSize.Size18
- text5.Font = Enum.Font.SourceSansLight
- text5.BorderSizePixel = 0
- text5.TextScaled = true
- text5.Text = "Damage Multiplier = 1"
- ArtificialHB = Instance.new("BindableEvent", Player.PlayerGui)
- ArtificialHB.Name = "Heartbeat"
- Player.PlayerGui:WaitForChild("Heartbeat")
- frame = 0.033333333333333
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- Player.PlayerGui.Heartbeat:Fire()
- local gg = false
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- if Player.PlayerGui:FindFirstChild("Heartbeat") == nil then
- gg = true
- end
- if gg == true then
- return
- end
- tf = tf + s
- if frame <= tf then
- if allowframeloss then
- Player.PlayerGui.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- Player.PlayerGui.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end
- )
- swait = function(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- CreateWeld = function(Parent, Part0, Part1, C0, C1)
- local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1})
- return Weld
- end
- rayCast = function(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- CreateSound = function(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local sou = Instance.new("Sound", par or workspace)
- sou.Volume = vol
- sou.Pitch = 1
- sou.SoundId = id
- swait()
- sou:play()
- game:GetService("Debris"):AddItem(sou, 6)
- end
- ))
- end
- local getclosest = function(obj, distance)
- local last, lastx = distance + 1, nil
- for i,v in pairs(workspace:GetChildren()) do
- if v:IsA("Model") and v ~= Character and v:findFirstChild("Humanoid") and v:findFirstChild("Torso") and v:findFirstChild("Humanoid").Health > 0 then
- local t = v.Torso
- local dist = (t.Position - obj.Position).magnitude
- if dist <= distance and dist < last then
- last = dist
- lastx = v
- end
- end
- end
- return lastx
- end
- Handle = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "FakeHandle", Vector3.new(0.210000008, 0.690000117, 0.280000001))
- HandleWeld = CreateWeld(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.09519327, -0.237398148, 0.0399169922, 0, -1, 0, 0, 0, -1, 1, 0, 0))
- FakeHandle = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "FakeHandle", Vector3.new(0.210000008, 0.690000117, 0.280000001))
- FakeHandleWeld = CreateWeld(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Motor = CreatePart(m, Enum.Material.SmoothPlastic, 0, 1, "Black", "Motor", Vector3.new(0.50999999, 0.430000126, 0.460000008))
- MotorWeld = CreateWeld(m, FakeHandle, Motor, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.565002441, 0, -0.155000687, 0, 1, 0, 0, 0, 1, 1, 0, 0))
- CreateMesh("CylinderMesh", Motor, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
- Guhn = CreatePart(m, Enum.Material.Ice, 0, 0, "Bright blue", "Guhn", Vector3.new(1.5,.8,.6))
- GuhnWeld = CreateWeld(m, Handle, Guhn, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-.2, -.4, .1, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Barrel = CreatePart(m, Enum.Material.Plastic, 0, 0, "Really black", "Barrel", Vector3.new(0.200000003, 0.420000021, 0.420000017))
- BarrelWeld = CreateWeld(m, Guhn, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-.7,0,0, 1, 0, 0, 0, -1, 0, 0, 0, -1))
- CreateMesh("BlockMesh", Barrel, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
- Part2 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Hitbox", Vector3.new(.3, 1.00000003, 0.3))
- Part2 = CreateWeld(m, Guhn, Part2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(.209000206, .5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Part5 = CreateWeld(m, Guhn, Part5, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.29000206, -0.1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Hitbox = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "Hitbox", Vector3.new(4,.8,.6))
- HitboxWeld = CreateWeld(m, Guhn, Hitbox, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0,0,0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Handle2 = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "FakeHandle", Vector3.new(0.210000008, 0.690000117, 0.280000001))
- HandleWeld2 = CreateWeld(m, Character["Left Arm"], Handle2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.09519327, -0.237398148, 0.0399169922, 0, -1, 0, 0, 0, -1, 1, 0, 0))
- FakeHandle2 = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "FakeHandle", Vector3.new(0.210000008, 0.690000117, 0.280000001))
- FakeHandleWeld2 = CreateWeld(m, Handle2, FakeHandle2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Motor2 = CreatePart(m, Enum.Material.SmoothPlastic, 0, 1, "Black", "Motor", Vector3.new(0.50999999, 0.430000126, 0.460000008))
- MotorWeld2 = CreateWeld(m, FakeHandle2, Motor2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.565002441, 0, -0.155000687, 0, 1, 0, 0, 0, 1, 1, 0, 0))
- CreateMesh("CylinderMesh", Motor2, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
- Guhn2 = CreatePart(m, Enum.Material.Ice, 0, 0, "Bright blue", "Guhn", Vector3.new(1.5,.8,.6))
- GuhnWeld2 = CreateWeld(m, Handle2, Guhn2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-.2, -.4, -.1, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Barrel2 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Really black", "Barrel", Vector3.new(0.200000003, 0.420000021, 0.420000017))
- BarrelWeld2 = CreateWeld(m, Guhn2, Barrel2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-.7,0,0, 1, 0, 0, 0, -1, 0, 0, 0, -1))
- CreateMesh("BlockMesh", Barrel2, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
- Part22 = CreatePart(m, Enum.Material.Plastic, 0, 0, "Black", "Hitbox", Vector3.new(.3, 1.00000003, 0.3))
- Part2weld2 = CreateWeld(m, Guhn2, Part22, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(.209000206, .5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Part52 = CreateWeld(m, Guhn2, Part52, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.29000206, -0.1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Hitbox2 = CreatePart(m, Enum.Material.Plastic, 0, 1, "Black", "Hitbox", Vector3.new(4,.8,.6))
- HitboxWeld2 = CreateWeld(m, Guhn2, Hitbox2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0,0,0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
- Damagefunc = function(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
- if hit.Parent == nil then
- return
- end
- local h = hit.Parent:FindFirstChild("Humanoid")
- for _,v in pairs(hit.Parent:children()) do
- if v:IsA("Humanoid") then
- h = v
- end
- end
- if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
- if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
- return
- end
- local c = Create("ObjectValue")({Name = "creator", Value = game:service("Players").LocalPlayer, Parent = h})
- game:GetService("Debris"):AddItem(c, 0.5)
- if HitSound ~= nil and HitPitch ~= nil then
- CreateSound(HitSound, hit, 1, HitPitch)
- end
- local Damage = math.random(minim, maxim)
- local blocked = false
- local block = hit.Parent:findFirstChild("Block")
- if block ~= nil and block.className == "IntValue" and block.Value > 0 then
- blocked = true
- block.Value = block.Value - 1
- print(block.Value)
- end
- if blocked == false then
- HitHealth = h.Health
- h.Health = h.Health - Damage*(cooldown5+1)
- if cooldown5 <= 1 then
- cooldown5 = cooldown5 + (Damage/200)
- end
- if HitHealth ~= h.Health and HitHealth ~= 0 and h.Health <= 0 and h.Parent.Name ~= "Hologram" then
- print("cooldowns reset")
- cooldown1 = 10
- cooldown2 = 30
- cooldown3 = 15
- cooldown4 = 60
- end
- if HitHealth ~= h.Health and HitHealth ~= 0 and h.Health <= 0 then
- print("Killed a goob")
- end
- ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
- else
- h.Health = h.Health - Damage / 2
- ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color)
- end
- if Type == "Knockdown" then
- local hum = hit.Parent.Humanoid
- hum.PlatformStand = true
- coroutine.resume(coroutine.create(function(HHumanoid)
- swait(1)
- HHumanoid.PlatformStand = false
- end
- ), hum)
- local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
- local bodvol = Create("BodyVelocity")({velocity = angle * knockback, P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
- local rl = Create("BodyAngularVelocity")({P = 3000, maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), Parent = hit})
- game:GetService("Debris"):AddItem(bodvol, 0.5)
- game:GetService("Debris"):AddItem(rl, 0.5)
- elseif Type == "Normal" then
- local vp = Create("BodyVelocity")({P = 500, maxForce = Vector3.new(math.huge, 0, math.huge), velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05})
- if knockback > 0 then
- vp.Parent = hit.Parent.Torso
- end
- game:GetService("Debris"):AddItem(vp, 0.5)
- elseif Type == "Up" then
- local bodyVelocity = Create("BodyVelocity")({velocity = vt(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
- game:GetService("Debris"):AddItem(bodyVelocity, 0.5)
- elseif Type == "DarkUp" then
- coroutine.resume(coroutine.create(function()
- for i = 0, 1, 0.1 do
- swait()
- BlockEffect(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1)
- end
- end
- ))
- local bodyVelocity = Create("BodyVelocity")({velocity = vt(0, 20, 0), P = 5000, maxForce = Vector3.new(8000, 8000, 8000), Parent = hit})
- game:GetService("Debris"):AddItem(bodyVelocity, 1)
- elseif Type == "Snare" then
- local bp = Create("BodyPosition")({P = 2000, D = 100, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
- game:GetService("Debris"):AddItem(bp, 0.5)
- elseif Type == "Fire" then
- shoottrail2(mouse, hit.Parent.Torso, 0, 1, "Explosive")
- end
- elseif Type == "Freeze" then
- local BodPos = Create("BodyPosition")({P = 50000, D = 1000, maxForce = Vector3.new(math.huge, math.huge, math.huge), position = hit.Parent.Torso.Position, Parent = hit.Parent.Torso})
- local BodGy = Create("BodyGyro")({maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, P = 20000, Parent = hit.Parent.Torso, cframe = hit.Parent.Torso.CFrame})
- hit.Parent.Torso.Anchored = true
- coroutine.resume(coroutine.create(function(Part)
- swait(1.5)
- Part.Anchored = false
- end
- ), hit.Parent.Torso)
- game:GetService("Debris"):AddItem(BodPos, 3)
- game:GetService("Debris"):AddItem(BodGy, 3)
- end
- local debounce = Create("BoolValue")({Name = "DebounceHit", Parent = hit.Parent, Value = true})
- game:GetService("Debris"):AddItem(debounce, Delay)
- c = Instance.new("ObjectValue")
- c.Name = "creator"
- c.Value = Player
- c.Parent = h
- game:GetService("Debris"):AddItem(c, 0.5)
- end
- ShowDamage = function(Pos, Text, Time, Color)
- local Rate = 0.033333333333333 --framerate
- if not Pos then
- local Pos = Vector3.new(0, 0, 0)
- end
- local Text = Text or ""
- local Time = Time or 2
- if not Color then
- local Color = Color3.new(1, 0, 1)
- end
- local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", vt(0, 0, 0))
- EffectPart.Anchored = true
- local BillboardGui = Create("BillboardGui")({Size = UDim2.new(3, 0, 3, 0), Adornee = EffectPart, Parent = EffectPart})
- local TextLabel = Create("TextLabel")({BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Text = Text, TextColor3 = Color, TextScaled = true, Font = Enum.Font.ArialBold, Parent = BillboardGui})
- game.Debris:AddItem(EffectPart, Time + 0.1)
- EffectPart.Parent = game:GetService("Workspace")
- delay(0, function()
- local Frames = Time / Rate
- for Frame = 1, Frames do
- wait(Rate)
- local Percent = Frame / Frames
- EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
- TextLabel.TextTransparency = Percent
- end
- if EffectPart and EffectPart.Parent then
- EffectPart:Destroy()
- end
- end
- )
- end
- MagniDamage = function(Part, magni, mindam, maxdam, knock, Type)
- for _,c in pairs(workspace:children()) do
- local hum = c:findFirstChild("Humanoid")
- if hum ~= nil then
- local head = c:findFirstChild("Torso")
- if head ~= nil then
- local targ = head.Position - Part.Position
- local mag = targ.magnitude
- if mag <= magni and c.Name ~= Player.Name then
- Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "http://www.roblox.com/asset/?id=231917784", 1)
- end
- end
- end
- end
- end
- BlockEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
- local prt = CreatePart(effect, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- if Type == 1 or Type == nil then
- table.insert(Effects, {prt, "Block1", delay, x3, y3, z3, msh})
- else
- if Type == 2 then
- table.insert(Effects, {prt, "Block2", delay, x3, y3, z3, msh})
- end
- end
- end
- SphereEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
- end
- RingEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
- prt.Anchored = true
- prt.CFrame = cframe * CFrame.new(x1, y1, z1)
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
- end
- CylinderEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
- end
- WaveEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
- end
- SpecialEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
- end
- BreakEffect = function(brickcolor, cframe, x1, y1, z1)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
- prt.Anchored = true
- prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- local num = math.random(10, 50) / 1000
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Shatter", num, prt.CFrame, math.random() - math.random(), 0, math.random(50, 100) / 100})
- end
- CloudEffect = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
- prt.Anchored = true
- prt.CFrame = cframe
- local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://1095708", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3, msh})
- end
- Laser = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(effect, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
- prt.Anchored = true
- prt.CFrame = cframe
- prt.Material = "Neon"
- local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
- game:GetService("Debris"):AddItem(prt, 10)
- coroutine.resume(coroutine.create(function(Part, Mesh)
- for i = 0, 1, delay do
- swait()
- Part.Transparency = i
- Mesh.Scale = Mesh.Scale + Vector3.new(x3, y3, z3)
- end
- Part.Parent = nil
- end
- ), prt, msh)
- end
- shoottrail2 = function(mouse, partt, SpreadAmount, multiply, Type)
- local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
- local MainPos = partt.Position
- local MainPos2 = mouse.Hit.p + SpreadVectors
- local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
- local speed = 10
- local num = 50
- coroutine.resume(coroutine.create(function()
- repeat
- swait()
- local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
- local mag = (MainPos - pos).magnitude
- if Type == "Explosive" then
- Laser(BrickColor.new("Crimson"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -1, 0, -1, 0.15)
- else
- if Type == "Poison" then
- Laser(BrickColor.new("Bright violet"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -1, 0, -1, 0.15)
- SphereEffect(BrickColor.new("Bright violet"), CFrame.new((MainPos + pos) / 2, pos), 1, 1, 1, 2, 2, 2, 0.07)
- else
- if Type == "Stun" then
- Laser(BrickColor.new("White"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 1, mag * (speed / (speed / 2)), 1, -1, 0, -1, 0.15)
- end
- end
- end
- MainPos = MainPos + MouseLook.lookVector * speed
- num = num - 1
- MouseLook = MouseLook * angles(-.05, 0, 0)
- if hit ~= nil then
- num = 0
- local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
- refpart.Anchored = true
- refpart.CFrame = CFrame.new(pos)
- game:GetService("Debris"):AddItem(refpart, 2)
- end
- do
- if num <= 1 then
- local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new())
- refpart.Anchored = true
- refpart.CFrame = CFrame.new(pos)
- if Type == "Explosive" then
- for i = 0, 5 do
- CreateSound("rbxassetid://181004943", refpart, 1, 1)
- BlockEffect(BrickColor.new("Really red"), refpart.CFrame, 1, 1, 1, 10, 10, 10, 0.05)
- BlockEffect(BrickColor.new("Institutional white"), refpart.CFrame, 1, 1, 1, 10, 10, 10, 0.07)
- BlockEffect(BrickColor.new("Bright orange"), refpart.CFrame, 1, 1, 1, 1, 1, 25, 0.07)
- MagniDamage(refpart, 5, 1 * multiply, 3 * multiply, 5, "Normal")
- swait(5)
- end
- for i = 0,9,1 do
- BlockEffect(BrickColor.new("Really red"), hit.Parent.Torso.CFrame, 1, 1, 1, 10,10,10, 0.07)
- hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - 2
- swait(10)
- end
- else
- if Type == "Poison" then
- if hit.Name == "memes" then
- SphereEffect(BrickColor.new("Bright violet"), refpart.CFrame, 1, 1, 1, 1, 1, 1, 0.07)
- MagniDamage(refpart, 5, 18 * multiply, 20 * multiply, 0, "Curse")
- else
- SphereEffect(BrickColor.new("Bright violet"), refpart.CFrame, 1, 1, 1, 1, 1, 1, 0.07)
- MagniDamage(refpart, 5, 3 * multiply, 4 * multiply, 0, "Curse")
- for i = 0,100,5 do
- hit.Parent.Humanoid.MaxHealth = hit.Parent.Humanoid.MaxHealth-1
- hit.Parent.Humanoid.WalkSpeed = 5
- swait(2.5)
- hit.Parent.Humanoid.WalkSpeed = 16
- end
- end
- else
- if Type == "Stun" then
- BlockEffect(BrickColor.new("White"), refpart.CFrame, 1, 1, 1, 1, 1, 1, 0.07)
- MagniDamage(refpart, 5, -10 * multiply, -5 * multiply, 0, "Normal")
- for i = 0,100,5 do
- hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health+2
- hit.Parent.Humanoid.WalkSpeed = 16
- swait(.5)
- end
- end
- end
- end
- end
- game:GetService("Debris"):AddItem(refpart, 0)
- end
- until num <= 0
- end
- ))
- end
- shoottrail = function(mouse, partt, SpreadAmount, multiply)
- local SpreadVectors = Vector3.new(math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount), math.random(-SpreadAmount, SpreadAmount))
- local MainPos = partt.Position
- local MainPos2 = mouse.Hit.p + SpreadVectors
- local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2)
- local speed = 4.5
- local num = 200
- CreateSound("rbxassetid://256172142", partt, 1, 1)
- coroutine.resume(coroutine.create(function()
- repeat
- swait()
- local hit, pos = rayCast(MainPos, MouseLook.lookVector, speed, RootPart.Parent)
- local mag = (MainPos - pos).magnitude
- Laser(BrickColor.new("Really blue"), CFrame.new((MainPos + pos) / 2, pos) * angles(1.57, 0, 0), 2, mag *(-speed / (speed / 2)), 1, -1, 0, -1, 0.15)
- MainPos = MainPos + MouseLook.lookVector * speed
- num = num - 1
- MouseLook = MouseLook * angles(-.002,0, 0)
- if hit ~= nil then
- num = 0
- local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new(2,2,2))
- refpart.Anchored = true
- refpart.CFrame = CFrame.new(pos)
- game:GetService("Debris"):AddItem(refpart, 2)
- end
- do
- if num <= 0 then
- local refpart = CreatePart(effect, "SmoothPlastic", 0, 1, BrickColor.new("Really black"), "Effect", Vector3.new(2,2,2))
- refpart.Anchored = true
- refpart.CFrame = CFrame.new(pos)
- if hit ~= nil then
- MagniDamage(refpart, 5, 10,10, 0, "Normal")
- end
- game:GetService("Debris"):AddItem(refpart, 0)
- end
- end
- until num <= 0
- end
- ))
- end
- attackthree = function()
- attack = true
- MagniDamage(Barrel, 0, 0, 0, 0, "Normal")
- shoottrail(mouse, Barrel, 0, 0.7)
- BlockEffect(BrickColor.new("Really blue"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
- BlockEffect(BrickColor.new("Really blue"), Barrel.CFrame, 5, 5, 5, 5, 5, 5, 0.07)
- attack = false
- end
- attackthree2 = function()
- attack = true
- MagniDamage(Barrel, 0, 0, 0, 0, "Normal")
- shoottrail(mouse, Barrel2, 0, 0.7)
- BlockEffect(BrickColor.new("Really blue"), Barrel2.CFrame, 5, 5, 5, 5,5,5, 0.07)
- BlockEffect(BrickColor.new("Really blue"), Barrel2.CFrame, 5, 5, 5, 5, 5, 5, 0.07)
- attack = false
- end
- reload = function()
- Humanoid.WalkSpeed=0
- swait(15)
- attack = true
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(120), math.rad(0), math.rad(0)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(120), math.rad(0), math.rad(0)), 0.3)
- RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos((sine) / 2), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0 - 50 * math.cos((sine) / 3))), 0.3)
- LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos((sine) / 2), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0 - 50 * math.cos((sine) / 3))), 0.3)
- MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, -0.3, -0.2) * angles(math.rad(0), math.rad(50), math.rad(-60 - 0.5 * math.cos((sine) / 25))), 0.3)
- Humanoid.WalkSpeed=32
- CreateSound("rbxassetid://174295321", Barrel, 3, 1.6)
- cooldown1 = cooldown1 + 5
- swait(50)
- CreateSound("rbxassetid://174295321", Barrel2, 3, 1.6)
- cooldown1 = cooldown1 + 5
- swait(50)
- attack = false
- Humanoid.WalkSpeed=32
- end
- FireDamageOverTime = function()
- attack = true
- for i = 0,1,1 do
- CreateSound("http://www.roblox.com/asset/?id=134626404", Barrel, 1, 1.6)
- shoottrail2(mouse, Barrel, 0, 1, "Explosive")
- BlockEffect(BrickColor.new("Really red"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
- BlockEffect(BrickColor.new("Bright orange"), Barrel.CFrame, 5, 5, 5, 5,5,5, 0.07)
- BlockEffect(BrickColor.new("Institutional white"), Barrel.CFrame, 5, 5, 5, 14,1,1, 0.07)
- swait(10)
- CreateSound("http://www.roblox.com/asset/?id=134626404", Barrel2, 1, 1.6)
- shoottrail2(mouse, Barrel2, 0, 1, "Explosive")
- BlockEffect(BrickColor.new("Really red"), Barrel2.CFrame, 5, 5, 5, 5,5,5, 0.07)
- BlockEffect(BrickColor.new("Bright orange"), Barrel2.CFrame, 5, 5, 5, 5,5,5, 0.07)
- BlockEffect(BrickColor.new("Institutional white"), Barrel2.CFrame, 5, 5, 5, 14,1,1, 0.07)
- swait(10)
- end
- attack = false
- end
- tele = function()
- BlockEffect(BrickColor.new("Really blue"), Torso.CFrame * cn(0, 0, 0), 15, 15, 15, 15,15,15, 0.07)
- RingEffect(BrickColor.new("Really blue"), Torso.CFrame * cn(0, 0, 0) * angles(1.57, 0, 0), 1, 10, 1, 1, 0, 1, 0.07)
- RootPart.CFrame = RootPart.CFrame * cn(0, 0, -20)
- BlockEffect(BrickColor.new("Really blue"), Torso.CFrame * cn(0, 0, 0), 15, 15, 15, 15,15,15, 0.07)
- RingEffect(BrickColor.new("Really blue"), Torso.CFrame * cn(-7, -5, 0), 7, 5, 7, 0.5, -0.01, 0.5, 0.07)
- end
- Decoy = function()
- MagniDamage(Torso, 20, 15,30, 5, "Fire")
- BlockEffect(BrickColor.new("Really red"), Torso.CFrame * cn(0, 0, 0), 15, 15, 15, 25,25,25, 0.07)
- BlockEffect(BrickColor.new("Bright orange"), Torso.CFrame * cn(0, 0, 0), 15, 15, 15, 25,25,25, 0.07)
- BlockEffect(BrickColor.new("Institutional white"), Torso.CFrame * cn(0, 0, 0), 15, 15, 15, 60,3,3, 0.07)
- RingEffect(BrickColor.new("Really black"), Torso.CFrame * cn(0, 0, 0) * angles(1.57, 0, 0), 1, 10, 1, 1, 0, 1, 0.07)
- RootPart.CFrame = RootPart.CFrame * cn(0, 0, 40)
- end
- mouse.Button1Down:connect(function()
- if attack == false and attacktype == 1 and cooldown1 >= 1 then
- attacktype = 2
- cooldown1 = cooldown1 - 1
- attackthree()
- else
- if attack == false and attacktype == 2 and cooldown1 >= 1 then
- attacktype = 1
- cooldown1 = cooldown1 - 1
- attackthree2()
- else
- if attack == false and attacktype == 2 and cooldown1 == 0 or attack == false and attacktype == 1 and cooldown1 == 0 then
- cooldown1 = 0.01
- reload()
- cooldown1 = 10
- end
- end
- end
- end
- )
- mouse.KeyDown:connect(function(k)
- k = k:lower()
- if attack == false and k == "z" then
- cooldown1 = 0.01
- reload()
- cooldown1 = 10
- else
- if attack == false and 10 <= cooldown2 and k == "x" then
- cooldown2 = cooldown2 - 10
- tele()
- else
- if attack == false and co3 <= cooldown3 and k == "c" then
- cooldown3 = 0
- FireDamageOverTime()
- else
- if attack == false and co4 <= cooldown4 and k == "v" then
- cooldown4 = 0
- Decoy()
- end
- end
- end
- end
- end
- )
- updateskills = function()
- if cooldown2 <= co2 then
- cooldown2 = cooldown2 + 0.033333333333333
- end
- if cooldown3 <= co3 then
- cooldown3 = cooldown3 + 0.033333333333333
- end
- if cooldown4 <= co4 then
- cooldown4 = cooldown4 + 0.033333333333333
- end
- if cooldown5 >= .002 then
- cooldown5 = cooldown5 - 0.002
- text5.Text = "Damage Multiplier = (" .. cooldown5+1 .. ")"
- end
- if cooldown5 >= 1 then
- cooldown5 = 1
- end
- if cooldown1 >= 11 then
- cooldown1 = 10
- end
- end
- while true do
- swait()
- if aiming == true then
- local aim = CFrame.new(RootPart.Position, mouse.Hit.p)
- local direction = aim.lookVector
- local headingA = math.atan2(direction.x, direction.z)
- headingA = math.deg(headingA)
- Humanoid.AutoRotate = false
- RootPart.CFrame = CFrame.new(RootPart.Position) * angles(math.rad(0), math.rad(headingA - 180), math.rad(0))
- else
- do
- Humanoid.AutoRotate = true
- updateskills()
- bar5:TweenSize(UDim2.new(1 * (cooldown5 / co5), 0, 1, 0), "Out", "Quad", 0.5)
- bar4:TweenSize(UDim2.new(1 * (cooldown4 / co4), 0, 1, 0), "Out", "Quad", 0.5)
- bar3:TweenSize(UDim2.new(1 * (cooldown3 / co3), 0, 1, 0), "Out", "Quad", 0.5)
- bar1:TweenSize(UDim2.new(1 * (cooldown1 / co1), 0, 1, 0), "Out", "Quad", 0.5)
- bar2:TweenSize(UDim2.new(1 * (cooldown2 / co2), 0, 1, 0), "Out", "Quad", 0.5)
- Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
- velocity = RootPart.Velocity.y
- sine = sine + change
- local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
- if equipped == true or equipped == false then
- if 1 < RootPart.Velocity.y and hit == nil then
- Anim = "Jump"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos((sine) / 20)) * angles(-180, math.rad(0), math.rad(0)), 0.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-20), math.rad(0), math.rad(0)), 0.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(160,0,0), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos((sine) / 25), 0) * angles(160,0,0), 0.3)
- RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos((sine) / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos((sine) / 20), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, -0.3, -0.2) * angles(math.rad(0), math.rad(50), math.rad(-60 - 0.5 * math.cos((sine) / 25))), 0.3)
- end
- else
- if RootPart.Velocity.y < -1 and hit == nil then
- Anim = "Fall"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos((sine) / 20)) * angles(90, 0, 0), 0.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(0)), 0.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(180,0,0), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos((sine) / 25), 0) * angles(180,0,0), 0.3)
- RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos((sine) / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos((sine) / 20), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, -0.3, -0.2) * angles(math.rad(0), math.rad(50), math.rad(-60 - 0.5 * math.cos((sine) / 25))), 0.3)
- end
- else
- if Torsovelocity < 1 and hit ~= nil then
- Anim = "Idle"
- if attack == false then
- change = 1
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(90), math.rad(0), math.rad(0)), 0.3)
- RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos(sine / 20), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos(sine / 20), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)), 0.3)
- end
- else
- if 2 < Torsovelocity and hit ~= nil then
- Anim = "Walk"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0 - 0.15 * math.cos(sine / 20)) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-30), math.rad(0), math.rad(0)), 0.3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(120), math.rad(0), math.rad(0)), 0.3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5 - 0.1 * math.cos(sine / 25), 0) * angles(math.rad(120), math.rad(0), math.rad(0)), 0.3)
- RH.C0 = clerp(RH.C0, cf(1, -1 + 0.15 * math.cos((sine) / 2), 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0 - 50 * math.cos((sine) / 3))), 0.3)
- LH.C0 = clerp(LH.C0, cf(-1, -1 + 0.15 * math.cos((sine) / 2), 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0 - 50 * math.cos((sine) / 3))), 0.3)
- MotorWeld.C0 = clerp(MotorWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.3)
- FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, -0.3, -0.2) * angles(math.rad(0), math.rad(50), math.rad(-60 - 0.5 * math.cos((sine) / 25))), 0.3)
- end
- end
- end
- end
- end
- end
- end
- end
- if 0 < #Effects then
- for e = 1, #Effects do
- if Effects[e] ~= nil then
- local Thing = Effects[e]
- if Thing ~= nil then
- local Part = Thing[1]
- local Mode = Thing[2]
- local Delay = Thing[3]
- local IncX = Thing[4]
- local IncY = Thing[5]
- local IncZ = Thing[6]
- if Thing[1].Transparency <= 1 then
- if Thing[2] == "Block1" then
- Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- Mesh = Thing[1].Mesh
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- else
- if Thing[2] == "Block2" then
- Thing[1].CFrame = Thing[1].CFrame
- Mesh = Thing[7]
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- else
- if Thing[2] == "Cylinder" then
- Mesh = Thing[1].Mesh
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- else
- if Thing[2] == "Blood" then
- Mesh = Thing[7]
- Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- else
- if Thing[2] == "Elec" then
- Mesh = Thing[1].Mesh
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- else
- if Thing[2] == "Disappear" then
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- else
- if Thing[2] == "Shatter" then
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
- Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
- Thing[6] = Thing[6] + Thing[5]
- end
- end
- end
- end
- end
- end
- end
- else
- Part.Parent = nil
- table.remove(Effects, e)
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement