Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Created by PointCoded and dylanjenner13]]--
- --[[Credits to the respectable owners for different functions and work]]--
- wait(1 / 60)
- Effects = { }
- local Player = game.Players.localPlayer
- local PGui = Player:findFirstChild("PlayerGui")
- local Character = Player.Character
- local Humanoid = Character.Humanoid
- Humanoid.WalkSpeed = 25
- local mouse = Player:GetMouse()
- local m = Instance.new('Model', Character)
- m.Name = "WeaponModel"
- 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 grabbed = false
- local cn = CFrame.new
- local mr = math.rad
- local angles = CFrame.Angles
- local ud = UDim2.new
- local c3 = Color3.new
- local euler = CFrame.fromEulerAnglesXYZ
- local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- 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)
- function clerp(a, b, t)
- return a:lerp(b, t)
- end
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- frame = 1 / 30
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.Heartbeat:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.Heartbeat:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function swait(num)
- if num == 0 or num == nil then
- ArtificialHB.Event:wait()
- else
- for i = 0, num do
- ArtificialHB.Event:wait()
- end
- end
- end
- local RbxUtility = LoadLibrary("RbxUtility")
- local Create = RbxUtility.Create
- --[[ Credits to Fenrier for Outline-Remover, Part, Mesh, Weld, Raycase and Sound Creation functions ]]--
- function RemoveOutlines(part)
- part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function CreatePart(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
- function CreateMesh(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
- function CreateWeld(Parent, Part0, Part1, C0, C1)
- local Weld = Create("Weld"){
- Parent = Parent,
- Part0 = Part0,
- Part1 = Part1,
- C0 = C0,
- C1 = C1,
- }
- return Weld
- end
- function CreateBillBoardGui(Img, Pos, Siz) --returns a basic billboard gui object for further manipulation
- local billpar = Create("Part"){
- Transparency = 1,
- Size = Vector3.new(1, 1, 1),
- Anchored = true,
- CanCollide = false,
- CFrame = CFrame.new(Pos),
- Name = "BillboardGuiPart",
- }
- local bill = Create("BillboardGui"){
- Parent = billpar,
- Adornee = billpar,
- Size = UDim2.new(1, 0, 1, 0),
- SizeOffset = Vector2.new(Siz, Siz),
- }
- local d = Create("ImageLabel"){
- Parent = bill,
- BackgroundTransparency = 1,
- Size = UDim2.new(1, 0, 1, 0),
- Image = Img,
- }
- return billpar
- end
- function rayCast(Position, Direction, Range, Ignore)
- return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
- end
- function CreateSound(id, par, vol, pit)
- coroutine.resume(coroutine.create(function()
- local S = Create("Sound"){
- Volume = vol or 3,
- Pitch = pit or 1,
- SoundId = id,
- Parent = par or workspace,
- }
- swait()
- S:play()
- game:GetService("Debris"):AddItem(S, 6)
- end))
- end
- local function GetNearest(obj, distance)
- local last, lastx = distance + 1
- 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 then
- if dist < last then
- last = dist
- lastx = v
- end
- end
- end
- end
- return lastx
- end
- -- do wat u want xd just dont delete any funcs ples <3 <3 well idk how to change the colours to math.random anyways so xD
- function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
- if hit and hit.Parent then
- for i, v in pairs(hit:GetChildren()) do
- if v and v.ClassName == "Humanoid" and hit and hit.Parent and hit.Name ~= Character.Name then
- local find = v:FindFirstChild("DebounceHit")
- if not find then
- if v.Parent:findFirstChild("Head") then
- local BillG = Create("BillboardGui"){
- Parent = v.Parent.Head,
- Size = UDim2.new(1, 0, 1, 0),
- Adornee = v.Parent.Head,
- StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
- }
- local TL = Create("TextLabel"){
- Parent = BillG,
- Size = UDim2.new(3, 3, 3, 3),
- BackgroundTransparency = 1,
- Text = tostring(damage).."-",
- TextColor3 = Color1.Color,
- TextStrokeColor3 = Color3.new(0, 0, 0),
- TextStrokeTransparency = 0,
- TextXAlignment = Enum.TextXAlignment.Center,
- TextYAlignment = Enum.TextYAlignment.Center,
- FontSize = Enum.FontSize.Size18,
- Font = "ArialBold",
- }
- coroutine.resume(coroutine.create(function()
- swait(1)
- for i = 0, 1, .1 do
- swait(.1)
- BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
- end
- BillG:Destroy()
- end))
- end
- v.Health = v.Health - damage
- local H = Humanoid.Health + damage
- Humanoid.MaxHealth = Humanoid.MaxHealth + 10
- wait()
- Humanoid.Health = H
- Humanoid.WalkSpeed = Humanoid.WalkSpeed + 1
- local bool = Create("BoolValue"){
- Parent = v,
- Name = "DebounceHit",
- }
- if HSound ~= nil and HPitch ~= nil then
- CreateSound(HSound, hit, 1, HPitch)
- end
- game:GetService("Debris"):AddItem(bool, cooldown)
- end
- end
- end
- end
- end
- function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
- 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
- Damage(head.Parent, math.random(93717241, 93717241), 0.5, Color1, Color2, HSound, HPitch)
- end
- end
- end
- end
- end
- function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
- local prt = CreatePart(Character, "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
- })
- elseif Type == 2 then
- table.insert(Effects, {
- prt,
- "Block2",
- delay,
- x3,
- y3,
- z3,
- msh
- })
- end
- end
- function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(Character, "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
- function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(Character, "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
- function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(Character, "Neon", 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
- function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(Character, "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
- function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
- local prt = CreatePart(Character, "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
- function BreakEffect(brickcolor, cframe, x1, y1, z1)
- local prt = CreatePart(Character, "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
- local Sniper = Instance.new("Part", m)
- Sniper.Name = "Sniper"
- Sniper.CanCollide = false
- Sniper.Locked = true
- local M = Instance.new("SpecialMesh", Sniper)
- M.MeshId = "http://www.roblox.com/asset/?id=72012972"
- M.TextureId = "http://www.roblox.com/asset/?id=72012935"
- M.VertexColor = Vector3.new(2, 0, 2)
- M.Scale = Vector3.new(1.2, 1.2, 1.2)
- local WeaponWeld = Instance.new("Weld", Sniper)
- WeaponWeld.Part0 = Sniper
- WeaponWeld.Part1 = RightArm
- WeaponWeld.C0 = CFrame.new(0, -1.6, -0.6) * CFrame.Angles(math.rad(180), math.rad(0), math.rad(-360))
- local EndOfGun = Instance.new("Part", m)
- EndOfGun.Name = "End Of Gun"
- EndOfGun.CanCollide = false
- EndOfGun.Locked = true
- EndOfGun.Transparency = 1
- EndOfGun.Size = Vector3.new(0.1, 0.1, 0.1)
- local EOGW = Instance.new("Weld", EndOfGun)
- EOGW.Part0 = EndOfGun
- EOGW.Part1 = RightArm
- EOGW.C0 = CFrame.new(0, 3.5, 0.8)
- local G = Instance.new("ScreenGui", PGui)
- G.Name = "PointCoded+dylanjenner13's sniper"
- local F = Instance.new("Frame", G)
- F.BackgroundColor3 = Color3.new(0, 0, 0)
- F.BackgroundTransparency = 0.3
- F.BorderSizePixel = 0
- F.Position = UDim2.new(0.5, -100, 0.2, 0)
- F.Size = UDim2.new(0, 200, 0, 28)
- local Fill = Instance.new("Frame", F)
- Fill.Name = "Fill"
- Fill.BackgroundColor3 = Color3.new(170, 0, 0)
- Fill.BackgroundTransparency = 0.3
- Fill.BorderSizePixel = 0
- Fill.Size = UDim2.new(0, 0, 0, 0)
- local HeatLabel = Instance.new("TextLabel", G)
- HeatLabel.BackgroundTransparency = 1
- HeatLabel.Position = UDim2.new(0.5, -75, 0.2, -22)
- HeatLabel.Size = UDim2.new(0, 150, 0, 20)
- HeatLabel.Font = Enum.Font.SourceSansBold
- HeatLabel.FontSize = Enum.FontSize.Size18
- HeatLabel.Text = "Heat: 0/100"
- HeatLabel.TextColor3 = Color3.new(0, 0, 0)
- HeatLabel.TextScaled = false
- HeatLabel.TextStrokeColor3 = Color3.new(255, 0, 0)
- HeatLabel.TextStrokeTransparency = 0.9
- local CurrentHeat = 0
- local MaxHeat = 10000
- local CoolingDown = false
- --[[ Attack Functions ]]--
- local Mode = "Normal"
- RSH = Torso["Right Shoulder"]
- LSH = Torso["Left Shoulder"]
- RH = Torso["Right Hip"]
- LH = Torso["Left Hip"]
- local RHCW0 = RH.C0
- local LHCW0 = LH.C0
- Animate = Character.Animate
- Animator = Humanoid.Animator
- function Equip()
- attack = true
- equipped = true
- RSH.Parent = nil
- LSH.Parent = nil
- Animator.Parent = nil
- Animate.Disabled = true
- change = 3
- RW = Create("Weld"){
- Name = "Right Shoulder",
- Part0 = Torso ,
- C0 = CFrame.new(1.5, 0.5, 0),
- C1 = CFrame.new(0, 0.5, 0),
- Part1 = RightArm ,
- Parent = Torso ,
- }
- LW = Create("Weld"){
- Name = "Left Shoulder",
- Part0 = Torso ,
- C0 = CFrame.new(-1.5, 0.5, 0),
- C1 = CFrame.new(0, 0.5, 0) ,
- Part1 = LeftArm ,
- Parent = Torso ,
- }
- CreateSound("http://roblox.com/asset/?id=346134880", Torso, 1, 1)
- for i = 0, 1, 0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.3, -.5) * angles(math.rad(0), math.rad(170), math.rad(90)), .25)
- end
- CreateSound("http://roblox.com/asset/?id=346134880", Torso, 1, .9)
- attack = false
- end
- Equip()
- function Unequip()
- for i = 0, 1, 0.1 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(0), math.rad(0), math.rad(0)), .2)
- end
- LH.C0 = LHCW0
- attack = true
- equipped = false
- RW.Parent = nil
- LW.Parent = nil
- RSH.Parent = Torso
- LSH.Parent = Torso
- Torso.Neck.C0 = NeckCF
- RootJoint.C0 = RootCF
- Animator.Parent = Humanoid
- Animate.Disabled = false
- RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
- RW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
- LW.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
- LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
- attack = false
- end
- function FindNearestTorso(Position,Distance)
- local List = {}
- for i,v in pairs(workspace:GetChildren())do
- if v:IsA("Model")then
- if v:findFirstChild("Torso")then
- if v ~= Character then
- if (v.Torso.Position -Position).magnitude <= Distance then
- table.insert(List,v)
- end
- end
- end
- end
- end
- if #List > 0 then
- return List[math.random(1, #List)]
- else
- return nil
- end
- end
- --[[Attacks]]--
- Grenade = function()
- if Anim ~= "Idle" then return nil end
- if not equipped then return nil end
- if attack then return nil end
- local HeatFromMove = 18
- if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
- CurrentHeat = CurrentHeat + HeatFromMove
- attack = true
- local Grenade = Instance.new("Part", Character)
- Grenade.Size = Vector3.new(1, 1, 1)
- Grenade.CanCollide = false
- Grenade.CFrame = LeftArm.CFrame
- local M = Instance.new("SpecialMesh", Grenade)
- M.MeshId = "http://www.roblox.com/asset/?id=16975131"
- M.Scale = Vector3.new(0.9, 0.9, 0.9)
- M.TextureId = "http://www.roblox.com/asset/?id=16975111"
- local W = Instance.new("Weld", Grenade)
- W.Part0 = Grenade
- W.Part1 = LeftArm
- W.C0 = CFrame.new(0, 0.3, 1.2) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
- wait(0.5)
- for i=0,1,0.2 do
- swait()
- LW.C0=clerp(LW.C0,cn(-1.5,0.5,0)*angles(math.rad(150),math.rad(0),math.rad(0)),.3)
- end
- W:Destroy()
- Grenade.CanCollide = true
- Grenade.Velocity = Torso.CFrame.lookVector * 80 + Vector3.new(0,5,0)
- wait(3)
- if Grenade and Grenade ~= nil then
- local E = Instance.new("Explosion", workspace)
- E.Position = Grenade.Position
- E.BlastPressure = 0
- E.DestroyJointRadiusPercent = 0
- E.BlastRadius = 25
- Grenade.Anchored = true
- CreateSound("rbxassetid://259048528", nil, 2, 1.2)
- E.Hit:connect(function(hit)
- if hit and hit.Parent and hit.Parent.Parent then
- if hit.Parent ~= Character and hit.Parent.Parent ~= Character then
- if hit.Parent:findFirstChild("Humanoid") then
- Damage(hit.Parent, 5000, 20000, BrickColor.new("Institutional white"), BrickColor.new("Institutional white"), "rbxassetid://199149186" , 1)
- end
- end
- end
- end)
- Grenade:Destroy()
- end
- attack = false
- end
- Cannon = function()
- if Anim ~= "Idle" then return nil end
- if not equipped then return nil end
- if attack then return nil end
- -- if CoolingDown then return nil end
- local HeatFromMove = 30
- if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
- CurrentHeat = CurrentHeat + HeatFromMove
- attack = true
- local P = Instance.new("Part", Character)
- P.Shape = "Ball"
- P.Anchored = true
- P.CanCollide = false
- P.Locked = true
- P.BrickColor = BrickColor.new("Really black")
- P.Size = Vector3.new(1, 1, 1)
- P.CFrame = EndOfGun.CFrame
- P.Transparency = 0.9
- for i=0,8 do
- swait()
- P.Transparency = P.Transparency - 0.05
- P.Size = Vector3.new(P.Size.X + 0.15, P.Size.Y + 0.15, P.Size.Z + 0.15)
- P.CFrame = EndOfGun.CFrame
- BlockEffect(BrickColor.new("Institutional white"), P.CFrame, 1, 1, 1, 1.5, 1.5, 1.5, 0.1)
- end
- wait(0.5)
- for i=0,8 do
- swait()
- P.Transparency = P.Transparency + 0.05
- P.Size = Vector3.new(P.Size.X - 0.15, P.Size.Y - 0.15, P.Size.Z - 0.15)
- P.CFrame = EndOfGun.CFrame
- BlockEffect(BrickColor.new("Really black"), P.CFrame, 1, 1, 1, 1.5, 1.5, 1.5, 0.1)
- end
- wait(0.3)
- P:Destroy()
- CreateSound("rbxassetid://411274847", nil, 5, 0.8)
- local P1 = EndOfGun.Position
- local P2 = mouse.Hit.p
- local MouseLook = CFrame.new((P1 + P2) / 2, P2)
- local Continue = 100
- coroutine.resume(coroutine.create(function()
- repeat
- swait()
- local hit, pos = rayCast(P1, MouseLook.lookVector, 10, RootPart.Parent)
- local mag = (P1 - pos).magnitude
- local Colours = {"Really black", "Institutional white"}
- CylinderEffect(BrickColor.new(Colours[math.random(1, #Colours)]), CFrame.new((P1 + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), math.random(3, 7), mag * math.random(5, 7), math.random(95, 100), .1, 0, 1.5, 0.1)
- P1 = P1 + (MouseLook.lookVector * 10)
- Continue = Continue - 1
- if hit ~= nil then
- Continue = 0
- CreateSound("rbxassetid://156444949", nil, 5, 0.5)
- local ref = CreatePart(Character, "SmoothPlastic", 0, 1, BrickColor.new(Colours[math.random(1, #Colours)]), "Reference", Vector3.new())
- ref.Anchored = true
- ref.CFrame = CFrame.new(pos)
- BlockEffect(BrickColor.new(Colours[math.random(1, #Colours)]), CFrame.new(pos), 20, 20, 20, 5, 5, 5, 0.1)
- SpecialEffect(BrickColor.new("Really black"), ref.CFrame, 4, 4, 4, 8, 8, 8, 2)
- MagnitudeDamage(ref, 50000, 900000, 500000, BrickColor.new("Institutional white"), BrickColor.new("Really black"), "rbxassetid://199149186" ,1)
- wait()
- for i = 1, 5 do
- local Color = hit.BrickColor
- local Materials = hit.Material
- local groundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(50, 100) / 100, math.random(50, 100) / 100, math.random(50, 100) / 100))
- groundpart.Anchored = false
- groundpart.Material = Materials
- groundpart.CanCollide = true
- groundpart.Friction = 0.1
- groundpart.Velocity = Vector3.new(math.random(-50, 50), math.random(25, 50), math.random(-50, 50))
- groundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-250, 250) / 100, 0.5, math.random(-250, 250) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- game:GetService("Debris"):AddItem(groundpart, 10)
- end
- for i = 1, 6 do
- local Color = hit.BrickColor
- local Materials = hit.Material
- local actualgroundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(100, 200) / 100, math.random(100, 200) / 100, math.random(100, 200) / 100))
- actualgroundpart.Anchored = true
- actualgroundpart.Material = Materials
- actualgroundpart.CanCollide = true
- actualgroundpart.Friction = 1
- actualgroundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- game:GetService("Debris"):AddItem(actualgroundpart, 10)
- end
- game:GetService("Debris"):AddItem(ref, 1)
- end
- until Continue <= 0
- end))
- wait(1)
- attack = false
- end
- --So explain how this works? not yet not done xd k
- SpinShot = function()
- if Anim ~= "Idle" then return nil end
- if not equipped then return nil end
- if attack then return nil end
- -- if CoolingDown then return nil end
- local HeatFromMove = 50
- if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
- CurrentHeat = CurrentHeat + HeatFromMove
- attack = true
- for i=0,1,0.2 do
- swait()
- RW.C0=clerp(RW.C0,cn(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
- LW.C0=clerp(LW.C0,cn(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
- Torso.Neck.C0=clerp(Torso.Neck.C0,NeckCF*angles(math.rad(-10),math.rad(0),math.rad(0)),.3)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cn(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3)
- end
- local LastTarget = nil
- for i=0,1,1 do
- swait()
- for i=0,1,0.1 do
- swait()
- RW.C0=clerp(RW.C0,cn(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(90)),.3)
- LW.C0=clerp(LW.C0,cn(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-90)),.3)
- RootJoint.C0=clerp(RootJoint.C0,RootCF*cn(0,0,0)*euler(0, 0, 6*i),.3)
- spawn(function()
- local Target = nil
- repeat
- wait()
- Target = FindNearestTorso(Torso.CFrame.p, 200)
- until Target ~= LastTarget or attack == false
- if Target and Target ~= nil then
- if attack == false then return nil end
- LastTarget = Target
- if Target:findFirstChild("Torso") then
- Target = Target:findFirstChild("Torso")
- CreateSound("rbxassetid://383602395", nil, 0.5)
- local Bullet = Instance.new("Part", Character)
- Bullet.Anchored = true
- Bullet.BrickColor = BrickColor.new("Really black")
- Bullet.Locked = true
- Bullet.Transparency = 1
- Bullet.CanCollide = false
- Bullet.Material = "Neon"
- Bullet.Name = "Bullet"
- local P1 = EndOfGun.Position
- local P2 = Target.Position
- local Look = CFrame.new((P1 + P2) / 2, P2)
- local hit, pos = rayCast(P1, Look.lookVector, 1500, RootPart.Parent)
- local mag = (P1 - pos).magnitude
- mag = mag + 2
- Bullet.Transparency = 0.1
- Bullet.Size = Vector3.new(0.2, 0.2, mag)
- Bullet.CFrame = CFrame.new(P1, pos) * CFrame.new(0, 0, -mag / 2)
- if hit then
- local Dmg = 80
- if hit.Name == "Head" then CreateSound("rbxassetid://147936251") Dmg = 420 end
- if hit and hit.Parent and hit.Parent.ClassName == "Hat" or hit.ClassName == "Hat" then CreateSound("rbxassetid://147936251") Dmg = 420 end
- Damage(hit.Parent, Dmg, 2, BrickColor.new("Institutional white"), BrickColor.new("Institutional white"), "rbxassetid://199149186" , 1)
- end
- Bullet.Touched:connect(function(hit) local Dmg = 500 Damage(hit.Parent, Dmg, 300, BrickColor.new("Institutional white"), BrickColor.new("Institutional white"), "rbxassetid://199149186" , 1) end)
- for i = 0, 18 do
- wait()
- Bullet.Transparency = Bullet.Transparency + 0.05
- end
- swait()
- Bullet:Destroy()
- end
- end
- end)
- end
- end
- wait(1)
- attack = false
- end
- AimbotBullet = function()
- if Anim ~= "Idle" then return nil end
- if not equipped then return nil end
- if attack then return nil end
- -- if CoolingDown then return nil end
- local HeatFromMove = 40
- if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
- CurrentHeat = CurrentHeat + HeatFromMove
- attack = true
- CreateSound("rbxassetid://153613030", nil, 5)
- local Target = FindNearestTorso(Torso.CFrame.p, 100)
- if Target and Target ~= nil then
- if Target:findFirstChild("Torso") then
- Target = Target:findFirstChild("Torso")
- local B = Instance.new("Part", Character)
- B.Size = Vector3.new(2.5, 2.5, 2.5)
- B.BrickColor = BrickColor.new("Really black")
- B.Material = "SmoothPlastic"
- B.Locked = true
- B.CanCollide = false
- B.CFrame = EndOfGun.CFrame
- B.Anchored = true
- spawn(function()
- wait(12)
- if B and B ~= nil then B:Destroy() end
- end)
- for i = 0, 1, 0.1 do
- swait()
- BlockEffect(BrickColor.new("Really black"), B.CFrame, 0.2, 0.2, 0.2, 2, 2, 2, 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(150 + 3 * math.cos(sine / 23)), math.rad(40)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.6 + .07 * math.cos(sine / 23), -.5) * angles(math.rad(-20 + 2 * math.cos(sine / 24)), math.rad(150 + 3 * math.cos(sine / 23)), math.rad(60)), .3)
- end
- for i = 0, 1, 0.1 do
- swait()
- BlockEffect(BrickColor.new("Really black"), B.CFrame, 0.2, 0.2, 0.2, 1, 1, 1, 0.1)
- RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(20 + 3 * math.cos(sine / 23)), math.rad(30)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.6 + .07 * math.cos(sine / 23), -.5) * angles(math.rad(-20 + 2 * math.cos(sine / 24)), math.rad(150 + 3 * math.cos(sine / 23)), math.rad(60)), .3)
- end
- for i=0, 52 do
- swait()
- local P1 = EndOfGun.Position
- local P2 = Target.CFrame.p
- local Look = CFrame.new((P1 + P2) / 2, P2)
- local hit, pos = rayCast(P1, Look.lookVector, 1500, RootPart.Parent)
- local mag = (P1 - pos).magnitude
- BlockEffect(BrickColor.new("Really black"), B.CFrame, 2, 2, 2, 2.5, 2.5, 2.5, 0.1)
- BlockEffect(BrickColor.new("Institutional white"), B.CFrame, 1, 1, 1, 1.5, 1.5, 1.5, 0.1)
- B.CFrame = CFrame.new(P1, pos) * CFrame.new(0, 0, -mag / (52 - i))
- end
- B:Destroy()
- BlockEffect(BrickColor.new("Really red"), Target.CFrame, 1, 1, 1, 1.2, 1.2, 1.2, 0.1)
- Damage(Target.Parent, 85000, 20000, BrickColor.new("Royal purple"), BrickColor.new("Plum"), "rbxassetid://199149186" , 1)
- end
- end
- wait()
- attack = false
- end
- local ShotColours = {"Carnation pink", "Toothpaste", "Really blue", "Really Red", "Eggplant", "Alder", "Persimmon", "Teal", "Royal purple", "Pastel blue-green", "Magenta", "Olive", "Lime green", "Dark blue", "Gold", "Bright yellow"}
- Shoot = function()
- if Anim ~= "Idle" then return nil end
- if not equipped then return nil end
- if attack then return nil end
- --if CoolingDown then return nil end
- local HeatFromMove = 20
- if CurrentHeat + HeatFromMove > MaxHeat then CreateSound("rbxassetid://134969396") return nil end
- CurrentHeat = CurrentHeat + HeatFromMove
- attack = true
- local Bullet = Instance.new("Part", Character)
- Bullet.Anchored = true
- Bullet.BrickColor = BrickColor.new(ShotColours[math.random(1, #ShotColours)])
- Bullet.Locked = true
- Bullet.Transparency = 1
- Bullet.Material = "Neon"
- Bullet.Name = "Bullet"
- --hmmmmm Where is the damage? Also when we do moves? xD Soon y u always rush xd Cats rush :3 ofc they do xd
- --Ima make a dequip quickly okay <3 So what we doing now? :3 Movey move = Z So we do moves after?
- -- Why you leave bby? well private server code is 123 Pointcoded did you crash or something?
- Bullet.CanCollide = false
- for i = 0, 1, 0.1 do
- swait()
- RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(40 + 3 * math.cos(sine / 23)), math.rad(40)), .3)
- end
- CreateSound("rbxassetid://383602395")
- local P1 = EndOfGun.Position
- local P2 = mouse.Hit.p
- local Look = CFrame.new((P1 + P2) / 2, P2)
- local hit, pos = rayCast(P1, Look.lookVector, 1500, RootPart.Parent)
- local mag = (P1 - pos).magnitude
- mag = mag + 2
- Bullet.Transparency = 0.1
- Bullet.Size = Vector3.new(0.2, 0.2, mag)
- Bullet.CFrame = CFrame.new(P1, pos) * CFrame.new(0, 0, -mag / 2)
- if hit then
- local Dmg = 800
- if hit.Name == "Head" then CreateSound("rbxassetid://147936251") Dmg = 420 end
- if hit and hit.Parent and hit.Parent.ClassName == "Hat" or hit.ClassName == "Hat" then CreateSound("rbxassetid://147936251") Dmg = 420 end
- Damage(hit.Parent, Dmg, 2, BrickColor.new(ShotColours[math.random(1, #ShotColours)]), BrickColor.new(ShotColours[math.random(1, #ShotColours)]), "rbxassetid://199149186" , 1)
- end
- Bullet.Touched:connect(function(hit) local Dmg = 600 Damage(hit.Parent, Dmg, 3, BrickColor.new(ShotColours[math.random(1, #ShotColours)]), BrickColor.new(ShotColours[math.random(1, #ShotColours)]), "rbxassetid://199149186" , 1) end)
- for i = 0, 18 do
- wait()
- Bullet.Transparency = Bullet.Transparency + 0.05
- end
- swait()
- Bullet:Destroy()
- attack = false
- end
- local Guide = nil
- local Down = false
- mouse.Button1Down:connect(function()
- Down = true
- spawn(function()
- if Guide and Guide ~= nil then Guide:Destroy() end
- Guide = Instance.new("Part", Character)
- Guide.Shape = "Ball"
- Guide.Anchored = true
- Guide.Locked = true
- Guide.BrickColor = BrickColor.new("Really red")
- Guide.Transparency = 0.4
- Guide.CanCollide = false
- Guide.Material = "SmoothPlastic"
- Guide.Size = Vector3.new(0.3, 0.3, 0.3)
- repeat swait()
- Guide.CFrame = mouse.Hit
- until Down == false or attack == true
- if Guide and Guide ~= nil then Guide:Destroy() end
- end)
- end)
- mouse.Button1Up:connect(function()
- Down = false
- Shoot()
- end)
- mouse.KeyDown:connect(function(k)
- k = k:lower()
- if k == "f" and not attack then
- if equipped == true then
- Sniper.Transparency = 1
- Unequip()
- else
- Sniper.Transparency = 0
- Equip()
- end
- elseif k == "z" and not attack then
- AimbotBullet()
- elseif k == "e" and not attack then
- SpinShot()
- elseif k == "r" and not attack then
- Cannon()
- elseif k == "t" and not attack then
- Grenade()
- end
- end)
- DoubleJump = function()
- if not equipped then return nil end
- if attack then return nil end
- attack = true
- Torso.Velocity = Vector3.new(0, 100, 0)
- Humanoid.Jump = true
- CreateSound("http://roblox.com/asset/?id=199145327", Torso, 1, .8)
- for i = 0, 1, 0.12 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(6 * i, math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(-40)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.5, -.5) * angles(math.rad(90), math.rad(0), math.rad(40)), .3)
- RH.C0 = clerp(RH.C0, cn(1, -.2, -.5) * RHCF * angles(math.rad(0), math.rad(0), math.rad(-20)), .3)
- LH.C0 = clerp(LH.C0, cn(-1, -.1, -.5) * LHCF * angles(math.rad(0), math.rad(0), math.rad(20)), .3)
- end
- for i = 0, 1, 0.12 do
- swait()
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10 * i), math.rad(0), math.rad(0)), .5)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(0)), .5)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(60)), .5)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-60)), .5)
- RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(0), math.rad(0), math.rad(40)), .5)
- LH.C0 = clerp(LH.C0, cn(-1, 0, -.5) * LHCF * angles(math.rad(0), math.rad(0), math.rad(20)), .5)
- end
- local hitfloor = nil
- while hitfloor == nil do
- swait()
- hitfloor, posfloor = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 3, Character)
- end
- MagnitudeDamage(RootPart, 30, 20, 35, BrickColor.new("Institutional white"), BrickColor.new("Really black"), "rbxassetid://199149186" ,1)
- local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 6, Character)
- if hit ~= nil then
- local Color = hit.BrickColor
- local refpart = CreatePart(Character, "SmoothPlastic", 0, 1, "Institutional white", "Effect", Vector3.new())
- refpart.Anchored = true
- refpart.CFrame = CFrame.new(pos)
- game:GetService("Debris"):AddItem(refpart, 1)
- CreateSound("http://www.roblox.com/asset/?id=199145477", refpart, .8, 1)
- for i = 1, 5 do
- local Color = hit.BrickColor
- local Materials = hit.Material
- local groundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(50, 100) / 100, math.random(50, 100) / 100, math.random(50, 100) / 100))
- groundpart.Anchored = false
- groundpart.Material = Materials
- groundpart.CanCollide = true
- groundpart.Friction = 0.1
- groundpart.Velocity = Vector3.new(math.random(-50, 50), math.random(25, 50), math.random(-50, 50))
- groundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-250, 250) / 100, 0.5, math.random(-250, 250) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- game:GetService("Debris"):AddItem(groundpart, 10)
- end
- for i = 1, 6 do
- local Color = hit.BrickColor
- local Materials = hit.Material
- local actualgroundpart = CreatePart(Character, "SmoothPlastic", 0, 0, Color, "Ground", Vector3.new(math.random(100, 200) / 100, math.random(100, 200) / 100, math.random(100, 200) / 100))
- actualgroundpart.Anchored = true
- actualgroundpart.Material = Materials
- actualgroundpart.CanCollide = true
- actualgroundpart.Friction = 1
- actualgroundpart.CFrame = CFrame.new(pos) * CFrame.new(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
- game:GetService("Debris"):AddItem(actualgroundpart, 10)
- end
- WaveEffect(hit.BrickColor, refpart.CFrame, 2, 2, 2, .5, .5, .5, 2)
- SphereEffect(hit.BrickColor, refpart.CFrame, 3, 3, 3, 3, 3, 3, 2)
- RingEffect(hit.BrickColor, refpart.CFrame * CFrame.Angles(math.random(5, 6), math.random(2, 7), math.random(3, 6)), 2, 2, .2, 1, 1, 1, 1)
- end
- attack = false
- end
- local canDoubleJump = true
- game:GetService("UserInputService").InputBegan:connect(function(Input)
- if Input.UserInputType == Enum.UserInputType.Keyboard then
- Input = tostring(Input.KeyCode)
- Input = string.sub(Input, 14)
- if Input == "Space" then
- if Humanoid.Jump == true and canDoubleJump then
- canDoubleJump = false
- DoubleJump()
- end
- end
- end
- end)
- spawn(function()
- while wait(5) do
- canDoubleJump = true
- if CurrentHeat > 0 then
- CurrentHeat = CurrentHeat - 5
- end
- end
- end)
- --[[ Credits to Fenrier for the Movement Detection and Effects table. ]]-- so dud you add dmg
- while true do
- swait()
- for i, v in pairs(Character:GetChildren()) do
- if v:IsA("Part") then
- v.Material = "SmoothPlastic"
- elseif v:IsA("Hat") then
- v:WaitForChild("Handle").Material = "SmoothPlastic"
- end
- end
- local X = CurrentHeat / MaxHeat
- Fill:TweenSize(UDim2.new(X, 0, 1, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Linear, 0.2)
- HeatLabel.Text = "Heat: "..CurrentHeat.."/"..MaxHeat
- 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 then
- if RootPart.Velocity.y > 1 and hit == nil then
- Anim = "Jump"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(30)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-30)), .3)
- RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(-20)), .3)
- LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(20)), .3)
- end
- elseif RootPart.Velocity.y < -1 and hit == nil then
- Anim = "Fall"
- if attack == false then
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(0)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(50)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .3)
- RH.C0 = clerp(RH.C0, cn(1, -.8, 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(20)), .3)
- LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(-20)), .3)
- end
- elseif Torsovelocity < 1 and hit ~= nil then
- Anim = "Idle"
- if attack == false then
- change = 1
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.1 + .1 * math.sin(sine / 27)) * angles(math.rad(0), math.rad(0), math.rad(30)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 + 3 * math.cos(sine / 23)), math.rad(-2 - 3 * math.cos(sine / 23)), math.rad(-30)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(80 + 2 * math.cos(sine / 24)), math.rad(20 + 3 * math.cos(sine / 23)), math.rad(30)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.6 + .07 * math.cos(sine / 23), -.5) * angles(math.rad(-20 + 2 * math.cos(sine / 24)), math.rad(-40 + 3 * math.cos(sine / 23)), math.rad(-40)), .3)
- RH.C0 = clerp(RH.C0, cn(1, -.9 - .1 * math.sin(sine / 27), 0) * RHCF * angles(math.rad(-4 + 1 * math.cos(sine / 23)), math.rad(-30), math.rad(0)), .3)
- LH.C0 = clerp(LH.C0, cn(-1, -.9 - .1 * math.sin(sine / 27), 0) * LHCF * angles(math.rad(-4 + 1 * math.cos(sine / 23)), math.rad(-30), math.rad(0)), .3)
- end
- elseif Torsovelocity > 2 and hit ~= nil then
- Anim = "Walk"
- if attack == false then
- change = 3
- RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.2) * angles(math.rad(20), math.rad(0), math.rad(1 * math.cos(sine / 10) / 2)), .3)
- Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(-5 * math.cos(sine / 10) / 2)), .3)
- RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(5), math.rad(-30), math.rad(25)), .3)
- LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6 + .07 * math.cos(sine / 23), -.2) * angles(math.rad(5), math.rad(40), math.rad(-20)), .3)
- RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 8) / 2, -.05 + math.sin(sine / 8) / 2) * RHCF * angles(math.rad(-4), math.rad(0), math.rad(10) - math.sin(sine / 8)), .3)
- LH.C0 = clerp(LH.C0, cn(-1, -.9 + 0.3 * math.cos(sine / 8) / 2, -.05 - math.sin(sine / 8) / 2) * LHCF * angles(math.rad(-4), math.rad(0), math.rad(-10) - math.sin(sine / 8)), .3)
- end
- end
- end
- if #Effects > 0 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]
- elseif 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]
- elseif 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]
- elseif Thing[2] == "Blood" then
- Mesh = Thing[7]
- Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
- Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif 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]
- elseif Thing[2] == "Disappear" then
- Thing[1].Transparency = Thing[1].Transparency + Thing[3]
- elseif 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
- else
- Part.Parent = nil
- table.remove(Effects, e)
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement