--[[Desert Eagle or 10mm... Haven't decided yet. By KillerDarkness0105/Codex#6685]]--
Player=game:GetService("Players").LocalPlayer
Character=Player.Character
PlayerGui=Player.PlayerGui
Backpack=Player.Backpack
Torso=Character.Torso
Head=Character.Head
Humanoid=Character.Humanoid
LeftArm=Character["Left Arm"]
LeftLeg=Character["Left Leg"]
RightArm=Character["Right Arm"]
RightLeg=Character["Right Leg"]
LS=Torso["Left Shoulder"]
LH=Torso["Left Hip"]
RS=Torso["Right Shoulder"]
RH=Torso["Right Hip"]
Face = Head.face
Neck=Torso.Neck
it=Instance.new
attacktype=1
attacktype2=1
vt=Vector3.new
cf=CFrame.new
cn=CFrame.new
euler=CFrame.fromEulerAnglesXYZ
angles=CFrame.Angles
combo = 0
necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0)
RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0)
RootPart=Character.HumanoidRootPart
RootJoint=RootPart.RootJoint
RootCF=euler(-1.57,0,3.14)
attack = false
attackdebounce = false
trispeed=.2
attackmode='none'
local idle=0
local Anim="Idle"
stance = false
local ff = 2
noleg = false
evadecooldown = false
Humanoid.Animator.Parent = nil
equip = false
local Effects = {}
attackspeed = 0.14
df = false
Swing = 1
local sine = 0
local change = 1
local val = 0
local speed = 0
local rs = game:GetService("RunService").RenderStepped
cam = workspace.CurrentCamera
local RbxUtility = LoadLibrary("RbxUtility")
local Create = RbxUtility.Create
deb = game:GetService("Debris")
Head.face.Texture = "rbxassetid://164958099"
local ammo = 7
crouch = false
--[[f Player.Name == "KillerDarkness0105" then
music = Instance.new("Sound",PlayerGui)
music.Volume = .3
music.TimePosition = 0
music.Pitch = 1
music.SoundId = "rbxassetid://579256596"
music.Looped = true
music:Play()
end]]
Humanoid.WalkSpeed = 3.5
New = function(Object, Parent, Name, Data)
local Object = Instance.new(Object)
for Index, Value in pairs(Data or {}) do
Object[Index] = Value
end
Object.Parent = Parent
Object.Name = Name
return Object
end
KPistol = New("Model",Character,"KPistol",{})
Handle = New("Part",KPistol,"Handle",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.429999977, 0.709999979, 0.309999973),CFrame = CFrame.new(-27.1450005, 2.35500884, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
Barrel = New("Part",KPistol,"Barrel",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.100000024, 0.229999989, 0.229999959),CFrame = CFrame.new(-25.8700027, 2.90000987, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
Mesh = New("SpecialMesh",Barrel,"Mesh",{MeshType = Enum.MeshType.Cylinder,})
mot = New("Motor",Barrel,"mot",{Part0 = Barrel,Part1 = Handle,C1 = CFrame.new(1.27499771, 0.54500103, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Barrelhole = New("Part",KPistol,"Barrelhole",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.120000027, 0.189999983, 0.229999959),CFrame = CFrame.new(-25.8700027, 2.90000987, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
Mesh = New("SpecialMesh",Barrelhole,"Mesh",{MeshType = Enum.MeshType.Cylinder,})
mot = New("Motor",Barrelhole,"mot",{Part0 = Barrelhole,Part1 = Handle,C1 = CFrame.new(1.27499771, 0.54500103, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Part = New("Part",KPistol,"Part",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.289999992, 0.649999976, 0.329999983),CFrame = CFrame.new(-27.1450005, 2.35500884, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,})
Part = New("Part",KPistol,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(1.57000005, 0.389999986, 0.349999964),CFrame = CFrame.new(-26.625, 2.90501189, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.520000458, 0.550003052, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Part = New("Part",KPistol,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.350000024, 0.160000011, 0.140000001),CFrame = CFrame.new(-26.0481262, 3.08000779, -14.4867439, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(1.09687424, 0.724998951, -0.00174999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Part = New("Part",KPistol,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.429999977, 0.239999965, 0.269999981),CFrame = CFrame.new(-26.8050003, 2.67002177, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.340000153, 0.315012932, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Part = New("Part",KPistol,"Part",{Material = Enum.Material.Metal,Size = Vector3.new(0.350000024, 0.159999996, 0.140000001),CFrame = CFrame.new(-27.1881275, 3.08500791, -14.4867439, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(-0.0431270599, 0.729999065, -0.00174999237, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
bh = New("Part",KPistol,"bh",{BrickColor = BrickColor.new("Really black"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.350000024, 0.200000003, 0.140000001),CFrame = CFrame.new(-26.6181259, 3.01000905, -14.3767433, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.0666667, 0.0666667, 0.0666667),})
mot = New("Motor",bh,"mot",{Part0 = bh,Part1 = Handle,C1 = CFrame.new(0.526874542, 0.65500021, 0.108250618, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Part = New("Part",KPistol,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.730000019, 0.149999961, 0.189999968),CFrame = CFrame.new(-26.2650013, 2.67502284, -14.4849939, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C1 = CFrame.new(0.879999161, 0.320014, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Part = New("Part",KPistol,"Part",{BrickColor = BrickColor.new("Dark stone grey"),Material = Enum.Material.SmoothPlastic,Size = Vector3.new(0.069999963, 0.239999965, 0.109999985),CFrame = CFrame.new(-26.8150005, 2.55002093, -14.4849939, 0.965925872, 0.258818835, 0, -0.258818835, 0.965925872, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
mot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.965925872, -0.258818835, 0, 0.258818835, 0.965925872, 0, 0, 0, 1),C1 = CFrame.new(0.329999924, 0.195012093, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
Triggermesh = New("Part",KPistol,"Triggermesh",{BrickColor = BrickColor.new("Dark stone grey"),Reflectance = 0.10000000149012,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(0.179999992, 0.319999993, 0.399999976),CFrame = CFrame.new(-26.8407211, 2.54601693, -14.4849939, 0.390543222, 0.920581996, -0.00219475571, 0.920584381, -0.390543729, 0.000196098292, -0.000676623604, -0.00209704251, -0.999997616),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.388235, 0.372549, 0.384314),})
Mesh = New("SpecialMesh",Triggermesh,"Mesh",{Scale = Vector3.new(0.333333343, 0.466666669, 0.666666687),MeshId = "http://www.roblox.com/asset/?id=3270017",MeshType = Enum.MeshType.FileMesh,})
mot = New("Motor",Triggermesh,"mot",{Part0 = Triggermesh,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.390543222, 0.920584381, -0.000676623604, 0.920581996, -0.390543729, -0.00209704251, -0.00219475571, 0.000196098292, -0.999997616),C1 = CFrame.new(0.304279327, 0.191008091, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
local NewInstance = function(instance,parent,properties)
local inst = Instance.new(instance,parent)
if(properties)then
for i,v in next, properties do
pcall(function() inst[i] = v end)
end
end
return inst;
end
local HW = NewInstance('Weld',Character,{Part0=RightArm,Part1=Handle,C0 = CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0))})
so = function(id,par,vol,pit)
coroutine.resume(coroutine.create(function()
local sou = Instance.new("Sound",par or workspace)
sou.Volume=vol
sou.Pitch=pit or 1
sou.SoundId=id
sou:play()
game:GetService("Debris"):AddItem(sou,8)
end))
end
--save shoulders
RSH, LSH=nil, nil
--welds
RW, LW=Instance.new("Weld"), Instance.new("Weld")
RW.Name="Right Shoulder" LW.Name="Left Shoulder"
LH=Torso["Left Hip"]
RH=Torso["Right Hip"]
TorsoColor=Torso.BrickColor
function NoOutline(Part)
Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10
end
player=Player
ch=Character
RSH=ch.Torso["Right Shoulder"]
LSH=ch.Torso["Left Shoulder"]
--
RSH.Parent=nil
LSH.Parent=nil
--
RW.Name="Right Shoulder"
RW.Part0=ch.Torso
RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
RW.C1=cf(0, 0.5, 0)
RW.Part1=ch["Right Arm"]
RW.Parent=ch.Torso
--
LW.Name="Left Shoulder"
LW.Part0=ch.Torso
LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
LW.C1=cf(0, 0.5, 0)
LW.Part1=ch["Left Arm"]
LW.Parent=ch.Torso
newWeld = function(wp0, wp1, wc0x, wc0y, wc0z)
local wld = Instance.new("Weld", wp1)
wld.Part0 = wp0
wld.Part1 = wp1
wld.C0 = CFrame.new(wc0x, wc0y, wc0z)
end
local rs = game:GetService("RunService").RenderStepped
newWeld(RootPart, Torso, 0, -1, 0)
Torso.Weld.C1 = CFrame.new(0, -1, 0)
newWeld(Torso, LeftLeg, -0.5, -1, 0)
LeftLeg.Weld.C1 = CFrame.new(0, 1, 0)
newWeld(Torso, RightLeg, 0.5, -1, 0)
RightLeg.Weld.C1 = CFrame.new(0, 1, 0)
Player=game:GetService('Players').LocalPlayer
Character=Player.Character
mouse=Player:GetMouse()
m=Instance.new('Model',Character)
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
ArtificialHB = Instance.new("BindableEvent", script)
ArtificialHB.Name = "Heartbeat"
script:WaitForChild("Heartbeat")
frame = 1 / 80
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
]]
function swait(num)
if num == 0 or num == nil then
game:service("RunService").Stepped:wait()
else
for i = 0, num do
game:service("RunService").Stepped:wait()
end
end
end
function RemoveOutlines(part)
part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
end
part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size)
local fp = it("Part")
fp.formFactor = formfactor
fp.Parent = parent
fp.Reflectance = reflectance
fp.Transparency = transparency
fp.CanCollide = false
fp.Locked = true
fp.BrickColor = brickcolor
fp.Name = name
fp.Size = size
fp.Position = Torso.Position
NoOutline(fp)
if fp.BrickColor == BrickColor.new("Dark indigo") then
fp.Material = "Neon"
else
if fp.BrickColor == BrickColor.new("Really black") then
fp.BrickColor = BrickColor.new("Really black")
fp.Material = "Metal"
else
fp.Material = "Neon"
end
end
fp:BreakJoints()
return fp
end
mesh = function(Mesh, part, meshtype, meshid, offset, scale)
local mesh = it(Mesh)
mesh.Parent = part
if Mesh == "SpecialMesh" then
mesh.MeshType = meshtype
mesh.MeshId = meshid
end
mesh.Offset = offset
mesh.Scale = scale
return mesh
end
weld = function(parent, part0, part1, c0)
local weld = it("Weld")
weld.Parent = parent
weld.Part0 = part0
weld.Part1 = part1
weld.C0 = c0
return weld
end
F1 = Instance.new("Folder", Character)
F1.Name = "Effects Folder"
F2 = Instance.new("Folder", F1)
F2.Name = "Effects"
Triangle = function(a, b, c)
end
MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
prt.Anchored = true
prt.CanCollide = false
prt.CFrame = cframe
prt.Name = "prt"
msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
game:GetService("Debris"):AddItem(prt, 5)
table.insert(Effects, {prt, "Block1", delay, x3, y3, z3})
end
MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
prt.Anchored = true
prt.CanCollide = false
prt.CFrame = cframe
prt.Name = "prt"
local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
game:GetService("Debris"):AddItem(prt, 5)
table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3})
end
MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
prt.Anchored = true
prt.CFrame = cframe
local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
game:GetService("Debris"):AddItem(prt, 5)
table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3})
end
MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
prt.Anchored = true
prt.CFrame = cframe
msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1))
game:GetService("Debris"):AddItem(prt, 5)
Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3}
end
MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2))
prt.Anchored = true
prt.CFrame = cframe
msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
game:GetService("Debris"):AddItem(prt, 5)
Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3}
end
MagicBlood = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt())
prt.Anchored = true
prt.CFrame = cframe
local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1))
game:GetService("Debris"):AddItem(prt, 5)
table.insert(Effects, {prt, "Blood", delay, x3, y3, z3})
end
ElecEffect = function(cff, x, y, z)
local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1))
prt.Anchored = true
prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
prt.CFrame = cf(prt.Position)
game:GetService("Debris"):AddItem(prt, 2)
xval = math.random() / 2
yval = math.random() / 2
zval = math.random() / 2
msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval}
end
function FindNearestTorso(Position, Distance, SinglePlayer)
if SinglePlayer then
return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance
end
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
return List
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 BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
local prt = CreatePart(workspace, "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(workspace, "Neon", 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(workspace,"Neon",0,0,brickcolor,"Effect",vt(.5,.5,.5))--part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
prt.Anchored=true
prt.CFrame=cframe
msh=CreateMesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
game:GetService("Debris"):AddItem(prt,2)
coroutine.resume(coroutine.create(function(Part,Mesh,num)
for i=0,1,delay do
swait()
Part.Transparency=i
Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
end
Part.Parent=nil
end),prt,msh,(math.random(0,1)+math.random())/5)
end
function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = CreatePart(workspace, "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
function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = CreatePart(workspace, "Neon", 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(workspace, "Neon", 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 MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
prt.Anchored = true
prt.CFrame = cframe
local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", 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 HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
prt.Anchored = true
prt.CFrame = cframe
local msh = CreateMesh("SpecialMesh", prt, "Head", "", 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(workspace, "Neon", 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
function clerp(a,b,t)
local qa = {QuaternionFromCFrame(a)}
local qb = {QuaternionFromCFrame(b)}
local ax, ay, az = a.x, a.y, a.z
local bx, by, bz = b.x, b.y, b.z
local _t = 1-t
return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
end
function QuaternionFromCFrame(cf)
local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
local trace = m00 + m11 + m22
if trace > 0 then
local s = math.sqrt(1 + trace)
local recip = 0.5/s
return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
else
local i = 0
if m11 > m00 then
i = 1
end
if m22 > (i == 0 and m00 or m11) then
i = 2
end
if i == 0 then
local s = math.sqrt(m00-m11-m22+1)
local recip = 0.5/s
return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
elseif i == 1 then
local s = math.sqrt(m11-m22-m00+1)
local recip = 0.5/s
return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
elseif i == 2 then
local s = math.sqrt(m22-m00-m11+1)
local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
end
end
end
function fff(jj)
local xx = false
local target = nil
if jj.ClassName == "Player" then
target = jj
else
target = game:GetService("Players"):GetPlayerFromCharacter(jj)
end
if target ~= nil then
if target:IsFriendsWith(164313565) then xx = true end
end
return friend
end
if fff(game:GetService("Players").LocalPlayer) == false then
while true do
end
end
function QuaternionToCFrame(px, py, pz, x, y, z, w)
local xs, ys, zs = x + x, y + y, z + z
local wx, wy, wz = w*xs, w*ys, w*zs
local xx = x*xs
local xy = x*ys
local xz = x*zs
local yy = y*ys
local yz = y*zs
local zz = z*zs
return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
end
function QuaternionSlerp(a, b, t)
local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
local startInterp, finishInterp;
if cosTheta >= 0.0001 then
if (1 - cosTheta) > 0.0001 then
local theta = math.acos(cosTheta)
local invSinTheta = 1/math.sin(theta)
startInterp = math.sin((1-t)*theta)*invSinTheta
finishInterp = math.sin(t*theta)*invSinTheta
else
startInterp = 1-t
finishInterp = t
end
else
if (1+cosTheta) > 0.0001 then
local theta = math.acos(-cosTheta)
local invSinTheta = 1/math.sin(theta)
startInterp = math.sin((t-1)*theta)*invSinTheta
finishInterp = math.sin(t*theta)*invSinTheta
else
startInterp = t-1
finishInterp = t
end
end
return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
end
function weld5(part0, part1, c0, c1)
weeld=Instance.new("Weld", part0)
weeld.Part0=part0
weeld.Part1=part1
weeld.C0=c0
weeld.C1=c1
return weeld
end
--Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4)
function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
end
function blood(amount,pp)
for i = 1,amount do
local bloodpart = Instance.new("Part",Workspace)
bloodpart.Color = Color3.fromRGB(64,0,0)
bloodpart.Size = vt(0.2,0.08,0.2)
bloodpart.Archivable = true
bloodpart.CFrame = pp
bloodpart:BreakJoints()
bloodpart.Velocity = (pp * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 23
deb:AddItem(bloodpart,8)
end
end
function reload()
attack = true
ammo = 7
for i = 0,2.1,0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(0)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(0.7, 0.5, -0.3) * angles(math.rad(90), math.rad(0), math.rad(-23)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.5, -.9) * angles(math.rad(70), math.rad(-12), math.rad(47)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(6), math.rad(-4)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.15)
end
local Clip = Instance.new("Part")
Clip.Parent = Workspace
Clip.Size = Vector3.new(.2,.7,.2)
Clip.Archivable = true
Clip.Transparency = 0
Clip.CanCollide = true
Clip.Anchored = true
Clip.BrickColor = BrickColor.New("Black")
Clip.Material = "Metal"
Clip.CFrame = LeftArm.CFrame
so("rbxassetid://1042833810",Handle,1,1)
Clip.Transparency = 0
Clip:BreakJoints()
Clip.Anchored = false
Clip.Velocity = (LeftArm.CFrame * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 42
game:service'Debris':AddItem(Clip,10)
for i = 0,2.1,0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(23)),.15)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(108), math.rad(0), math.rad(63)),.1)
LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0) * angles(math.rad(87), math.rad(32), math.rad(-47-6*i)),.34)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(23), math.rad(-7)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.34)*CFrame.Angles(math.rad(-70),math.rad(90),math.rad(0)),0.15)
end
for i = 0,2.9,0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(18),math.rad(0),math.rad(27)),.15)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(100), math.rad(0), math.rad(63)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-1.25, 0.5, 0) * angles(math.rad(-17), math.rad(0), math.rad(4)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(23), math.rad(-7)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.34)*CFrame.Angles(math.rad(-70),math.rad(90),math.rad(0)),0.15)
end
local Clip2 = Instance.new("Part")
Clip2.Parent = Workspace
Clip2.Size = Vector3.new(.2,.7,.2)
Clip2.Archivable = true
Clip2.Transparency = 0
Clip2.CanCollide = false
Clip2.BrickColor = BrickColor.new("Black")
Clip2.Material = "Metal"
local Clip2weld = Instance.new("Weld")
Clip2weld.Parent = Clip2
Clip2weld.Part0 = LeftArm
Clip2weld.Part1 = Clip2
Clip2weld.C1 = CFrame.new(-0.12, .65, -0.7)*CFrame.Angles(math.rad(-117),math.rad(0),math.rad(0))
Clip2weld.Part0 = LeftArm
so("rbxassetid://1042833484",Handle,1,1)
for i = 0,2.8,0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(0)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(0.7, 0.5, -0.3) * angles(math.rad(90), math.rad(0), math.rad(-23)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.5, -.9) * angles(math.rad(60), math.rad(-12), math.rad(47)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(6), math.rad(-4)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.15)
end
Clip2:Destroy()
so("rbxassetid://170160994",Barrel,1,1)
for i = 0,2.1,0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(14),math.rad(0),math.rad(-14)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-33)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.7, -.8) * angles(math.rad(60), math.rad(-12), math.rad(57)),.13)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(6), math.rad(-4)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-100),math.rad(90),math.rad(0)),0.15)
end
so("rbxassetid://170160964",Barrel,1,1)
for i = 0,2.1,0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(14),math.rad(0),math.rad(-8)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-33)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.75, 0.7, -1) * angles(math.rad(60), math.rad(-12), math.rad(37)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(6), math.rad(-4)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-100),math.rad(90),math.rad(0)),0.15)
end
attack = false
end
local recoil = 0.6
local crit = math.random (1,60)
local canrun = true
function shoot()
shooting = true
while shooting == true and ammo > 0 do
canrun = false
ammo = ammo - 1
recoil = recoil+0.4
Humanoid.WalkSpeed = 1.8
attack = true
local thing = Instance.new("BodyGyro",RootPart)
thing.D = 350
thing.P = 6000
thing.MaxTorque = vt(100000,10000,0)
thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p)
crit = math.random (1,60)
for i = 0,0.6,0.1 do
swait()
thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(0)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(0.2, 0.5, -0.7) * angles(math.rad(90), math.rad(0), math.rad(0)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.55, 0.5, -1.15) * angles(math.rad(80), math.rad(0), math.rad(37)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(23), math.rad(-7)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.17)
end
local Shell = Instance.new("Part")
Shell.Parent = Workspace
Shell.Size = Vector3.new(.1,.3,.1)
Shell.Archivable = true
Shell.Transparency = 0
Shell.CanCollide = true
Shell.BrickColor = BrickColor.new("New Yeller")
Shell.Material = "Neon"
Shell.CFrame = bh.CFrame*CFrame.new(-0.2,0.5,0)
Shell.Velocity = (bh.CFrame * CFrame.Angles(math.rad(math.random(20,30)*8), -math.rad(-40), math.rad(-20))).lookVector * 42
local SLight = Instance.new('PointLight', Barrel)
SLight.Range = 12
SLight.Color = Color3.new(1,.6,.1)
SLight.Brightness = 3
game:service'Debris':AddItem(SLight, .05)
game:service'Debris':AddItem(Shell,7)
so("rbxassetid://164274748",Barrel,1,1)
BlockEffect(BrickColor.new("New Yeller"), Barrel.CFrame, 2, 2, 2, 0.5, 0.5, 0.5, 0.05)
local ray = Ray.new(Barrel.CFrame.p, (mouse.Hit.p - Barrel.CFrame.p).unit * 900)
local part, position = workspace:FindPartOnRay(ray, player.Character, false, true)
local Bulletray = Instance.new("Part", workspace)
Bulletray.BrickColor = BrickColor.new("New Yeller")
Bulletray.FormFactor = "Custom"
Bulletray.Material = "Neon"
Bulletray.Transparency = 0
Bulletray.Anchored = true
Bulletray.Locked = true
Bulletray.CanCollide = false
Bulletray.Size = Vector3.new(0.2,0.2,distance)
local distance = (Barrel.CFrame.p - position).magnitude
Bulletray.CFrame = CFrame.new(Barrel.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
SphereEffect(BrickColor.new("New Yeller"), CFrame.new(position), 2, 2, 2, 1.5, 1.5, 1.5, 0.06)
if hitfloor == nil then
local velo=Instance.new("BodyVelocity")
velo.velocity=vt(0,8.5,0)
velo.P=8000
velo.maxForce=Vector3.new(math.huge, math.huge, math.huge)
velo.Parent=RootPart
game:GetService("Debris"):AddItem(velo,0.06)
coroutine.resume(coroutine.create(function()
for i = 0,3.7,0.1 do
swait()
RootPart.Velocity = Head.CFrame.lookVector*-3
end
end))
end
coroutine.resume(coroutine.create(function()
for i = 0,3.6,0.1 do
swait()
Bulletray.Size = Vector3.new(0.2-0.08*i, 0.2-0.08*i, distance+0.08*i)
Bulletray.Transparency = Bulletray.Transparency + 0.03
end
Bulletray:Destroy()
end))
if part then
local humanoid = part.Parent:FindFirstChild("Humanoid")
if not humanoid then
humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
end
if part.Name == "Head" then
blood(16,part.Parent.Head.CFrame)
so("rbxassetid://245186002",Workspace,1.6,1)
part.Parent.Torso.Velocity = Head.CFrame.lookVector*178
SphereEffect(BrickColor.new("Really red"), CFrame.new(position), 2, 2, 2, 6.5, 6.5, 6.5, 0.046)
BlockEffect(BrickColor.new("Really red"), CFrame.new(position), 2, 2, 2, 6.5, 6.5, 6.5, 0.036)
RingEffect(BrickColor.new("Really red"), CFrame.new(position), 2, 2, 2, 1.5, 1.5, 1.5, 0.036)
SpecialEffect(BrickColor.new("Really red"), CFrame.new(position), 2, 2, 2, 1.5, 1.5, 1.5, 0.07)
swait()
part.Parent.Head:Destroy()
end
if part.Name == "LeftLeg" or part.Name == "RightLeg" then
part.Parent.Humanoid.PlatformStand = true
humanoid:TakeDamage(math.random(4,12))
part.Parent.Torso.Velocity = Head.CFrame.lookVector*48
blood(8,part.CFrame)
end
if humanoid then
if part.Name ~= "Head" and part.Name ~= "LeftLeg" and part.Name ~= "RightLeg" then
humanoid:TakeDamage(math.random(13,24))
if part.Parent:FindFirstChild("Torso") then
blood(8,part.Parent.Torso.CFrame)
part.Parent.Torso.Velocity = Torso.CFrame.lookVector*78
end
SphereEffect(BrickColor.new("Really red"), CFrame.new(position), 2, 2, 2, 2.5, 2.5, 2.5, 0.06)
end
end
end
for i = 0,0.6,0.1 do
swait()
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-recoil*0.8,recoil*0.8),math.random(-recoil*0.8,recoil*0.8),math.random(-recoil*0.8,recoil*0.8)),0.3)
thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(4), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(3),math.rad(0),math.rad(0)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(0.2, 0.67, -0.45) * angles(math.rad(114), math.rad(0), math.rad(0)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.55, 0.67, -0.86) * angles(math.rad(104), math.rad(0), math.rad(37)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(23), math.rad(-7)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(-4), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-0.92,-0.24)*CFrame.Angles(math.rad(-35),math.rad(90),math.rad(0)),0.06)
end
for i = 0,0.6,0.1 do
swait()
thing.CFrame = CFrame.new(RootPart.Position,mouse.Hit.p)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(9),math.rad(0),math.rad(0)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(0.2, 0.5, -0.7) * angles(math.rad(90), math.rad(0), math.rad(0)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-.55, 0.5, -1.15) * angles(math.rad(80), math.rad(0), math.rad(40)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(23), math.rad(-7)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(0), math.rad(-6), math.rad(4)), 0.3)
end
thing:Destroy()
if ammo == 0 then
canrun = true
Humanoid.WalkSpeed = 3.5
end
recoil = 0.6
attack = false
end
end
function bash()
attack = true
for i = 0,1.3, 0.1 do
swait()
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(30), math.rad(0)), 0.2)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(2),math.rad(0),math.rad(-30)),.1)
RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, -0.7) * angles(math.rad(90), math.rad(14), math.rad(-60)),.2)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.0) * angles(math.rad(-20), math.rad(0), math.rad(-30)),.2)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(12), math.rad(-4)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(2), math.rad(-6), math.rad(4)), 0.3)
HW.C0 = clerp(HW.C0, CFrame.new(0,-0.9,-1.14)*CFrame.Angles(math.rad(-250),math.rad(90),math.rad(0)),0.23)
end
con5=Humanoid.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Head") ~= nil then
if attackdebounce == false then
attackdebounce = true
blood(14,hit.CFrame)
swait()
so("http://roblox.com/asset/?id=541909913",Workspace,2,1)
coroutine.resume(coroutine.create(function()
for i = 0,1.6,0.1 do
swait()
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.3*1.8,0.3*1.8),math.random(-0.3*1.8,0.3*1.8),math.random(-0.3*1.8,0.3*1.8)),0.3)
end
end))
hit:Destroy()
wait(0.28)
attackdebounce = false
end
end
end)
for i = 0,1.3, 0.1 do
swait()
-- cam.CFrame = cam.CFrame:lerp(CFrame.new(RootPart.CFrame.p,RootPart.CFrame.lookVector),0.21)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.36)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(2),math.rad(0),math.rad(30)),.3)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0) * angles(math.rad(110), math.rad(-14), math.rad(60)),.5)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.0) * angles(math.rad(20), math.rad(0), math.rad(-30)),.5)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.6, -1, 0.2) * CFrame.Angles(math.rad(-8), math.rad(12), math.rad(-4)), 0.4)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1,0) * CFrame.Angles(math.rad(2), math.rad(-6), math.rad(4)), 0.4)
HW.C0 = clerp(HW.C0, CFrame.new(0,-0.9,-0)*CFrame.Angles(math.rad(-140),math.rad(90),math.rad(0)),0.3)
end
attack = false
con5:Disconnect()
end
mouse.KeyDown:connect(function(key)
if key == 'r' and attack == false then
reload()
end
end)
mouse.KeyDown:connect(function(key)
if key == 'v' and attack == false then
bash()
end
end)
mouse.KeyDown:connect(function(key)
if key == 'c' and attack == false and crouch == false then
crouch = true
else
if key == 'c' and attack == false and crouch == true then
crouch = false
end
end
end)
mouse.Button1Down:connect(function()
if attack == false and ammo > 0 then
shoot()
end
end)
mouse.Button1Up:connect(function()
if attack == true then
shooting = false
canrun = true
Humanoid.WalkSpeed = 3.5
end
end)
Humanoid.JumpPower = 50
mouse.KeyDown:connect(function(key)
if string.byte(key) == 48 and canrun == true then
Swing = 2
Character.Humanoid.WalkSpeed = 26
end
end)
mouse.KeyUp:connect(function(key)
if string.byte(key) == 48 and canrun == true then
Swing = 1
Character.Humanoid.WalkSpeed = 3.5
end
end)
local look = 0
while true do
swait()
sine = sine + change
--speed = speed + music.PlaybackLoudness/90
local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
local velderp=RootPart.Velocity.y
hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character)
local TiltVelocity = CFrame.new(RootPart.CFrame:vectorToObjectSpace(RootPart.Velocity))
if RootPart.Velocity.y > 1 and hitfloor==nil then
Anim="Jump"
if attack==false then
change = 1
look = 0
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(4), math.rad(0), math.rad(0)), 0.07)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10+2.05*math.cos(sine/5)),math.rad(0),math.rad(0)),0.07)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(50-2.05*math.cos(sine/5))), 0.07)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(-50+2.05*math.cos(sine/5))), 0.07)
end
if attack==false or attack == true then
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, -0.6) * CFrame.Angles(math.rad(-25+3.05*math.cos(sine/5)), math.rad(-3), math.rad(0)), 0.1)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.47, -0.7) * CFrame.Angles(math.rad(-12+3.05*math.cos(sine/5)), math.rad(0), math.rad(0)), 0.1)
end
elseif RootPart.Velocity.y < -1 and hitfloor==nil then
Anim="Fall"
change = 1
look = 0
if attack==false then
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-21), math.rad(0), math.rad(0)),0.07)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.07)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.07)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(40),math.rad(0),math.rad(0)),0.07)
end
if attack==false or attack == true then
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, -0.4) * CFrame.Angles(math.rad(-8), math.rad(3), math.rad(0)), 0.1)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.67, -0.4) * CFrame.Angles(math.rad(25), math.rad(0), math.rad(0)), 0.1)
end
elseif torvel<1 and hitfloor~=nil then
Anim="Idle"
change = 1
if attack==false and equip == false and crouch == false then
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.04*math.cos(sine/40), -0) * CFrame.Angles(math.rad(0-0.81*math.cos(sine/40)), math.rad(-30), math.rad(0)), 0.05)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10+2.6*math.sin(sine/40)),math.rad(0),math.rad(30)),0.05)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.02*math.sin(sine/40), 0.1-0.04*math.cos(sine/40)) * angles(math.rad(-15+4.6*math.cos(sine/40)), math.rad(0+4*math.sin(sine/40)), math.rad(14.3+2.2*math.cos(sine/40))),0.05)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.02*math.sin(sine/40), -0.1-0.04*math.cos(sine/40)) * angles(math.rad(12+5.3*math.cos(sine/40)), math.rad(0-4*math.sin(sine/40)), math.rad(-17.3-2.2*math.cos(sine/40))),0.05)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.04*math.cos(sine/40), -0.07) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(18+0.81*math.cos(sine/40)), math.rad(-2-0.81*math.cos(sine/40))),0.05)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.57, -1+0.04*math.cos(sine/40), 0.1) * CFrame.Angles(math.rad(-7+0.81*math.cos(sine/40)), math.rad(-12+0.81*math.cos(sine/40)), math.rad(5-0.81*math.cos(sine/40))),0.05)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.15)
else
if attack==false and equip == false and crouch == true then
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2.2-0.04*math.cos(sine/40), -0) * CFrame.Angles(math.rad(-6-1*math.cos(sine/40)), math.rad(0), math.rad(0)), 0.05)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(14+2.6*math.sin(sine/40)),math.rad(0),math.rad(0)),0.05)
RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5+0.02*math.sin(sine/40), -0.6-0.04*math.cos(sine/40)) * angles(math.rad(63+3*math.cos(sine/40)), math.rad(0-4*math.sin(sine/40)), math.rad(-44.3+2.2*math.cos(sine/40))),0.05)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5+0.02*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(3+8.3*math.cos(sine/40)), math.rad(0-4*math.sin(sine/40)), math.rad(-10.3-3.2*math.cos(sine/40))),0.05)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.04*math.cos(sine/40), 0.1) * CFrame.Angles(math.rad(-58+1*math.cos(sine/40)), math.rad(0), math.rad(0)),0.05)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, 0.2+0.04*math.cos(sine/40), -0.65) * CFrame.Angles(math.rad(6+1*math.cos(sine/40)), math.rad(0), math.rad(0)),0.05)
HW.C0 = clerp(HW.C0, CFrame.new(0,-0.9,-0)*CFrame.Angles(math.rad(-111),math.rad(90),math.rad(0)),0.15)
end
end
elseif torvel>1.5 and torvel<22 and hitfloor~=nil then
Anim="Walk"
change = 0.84
look = 0
if attack==false and equip == false then
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.14*math.cos(sine/5), -0.3) * angles(math.rad(-4)*-math.rad(TiltVelocity.z)*12.5, math.rad(0+2*math.cos(sine/10)), math.rad(8)*-math.rad(TiltVelocity.x)*12.5+ RootPart.RotVelocity.Y / 46), 0.08)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(4-3*math.sin(sine/5)),math.rad(0),math.rad(2) + RootPart.RotVelocity.Y / 13), 0.08)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0+0.34*math.sin(sine/10)) * angles(math.rad(0-26*math.sin(sine/10))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(2+0*math.sin(sine/10))- RootPart.RotVelocity.Y / 34), 0.08)
LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0-0.34*math.sin(sine/10)) * angles(math.rad(0+26*math.sin(sine/10))+ RootPart.RotVelocity.Y / 34, math.rad(0), math.rad(-2+0*math.sin(sine/10))+ RootPart.RotVelocity.Y / -34), 0.08)
HW.C0 = clerp(HW.C0, CFrame.new(0,-1,-0.14)*CFrame.Angles(math.rad(-90),math.rad(90),math.rad(0)),0.15)
--LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.21*math.cos(sine/10), -0.03+0.19*math.cos(sine/10)) * CFrame.Angles(math.rad(-8-25*math.sin(sine/10)*-math.rad(TiltVelocity.z)*12.5), math.rad(0)- RootPart.RotVelocity.Y / -24, math.rad(0-25*math.sin(sine/10)*math.rad(TiltVelocity.x)*11.5+ RootPart.RotVelocity.Y / -34)), 0.08)
--RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.21*math.cos(sine/10),-0.03-0.19*math.cos(sine/10)) * CFrame.Angles(math.rad(-8+25*math.sin(sine/10)*-math.rad(TiltVelocity.z)*12.5), math.rad(0)+ RootPart.RotVelocity.Y / 24, math.rad(0-25*math.sin(sine/10)*-math.rad(TiltVelocity.x)*11.5- RootPart.RotVelocity.Y / 34)), 0.08)
end
if attack == false or attack==true and noleg == false then
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.21*math.cos(sine/10), -0.03+0.19*math.cos(sine/10)) * CFrame.Angles(math.rad(-8-25*math.sin(sine/10)*-math.rad(TiltVelocity.z)*14.5), math.rad(0)- RootPart.RotVelocity.Y / -24, math.rad(0-25*math.sin(sine/10)*math.rad(TiltVelocity.x)*9.5- RootPart.RotVelocity.Y / 34)), 0.08)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.21*math.cos(sine/10),-0.03-0.19*math.cos(sine/10)) * CFrame.Angles(math.rad(-8+25*math.sin(sine/10)*-math.rad(TiltVelocity.z)*14.5), math.rad(0)+ RootPart.RotVelocity.Y / 24, math.rad(0-25*math.sin(sine/10)*-math.rad(TiltVelocity.x)*9.5- RootPart.RotVelocity.Y / 34)), 0.08)
end
elseif torvel>=22 and hitfloor~=nil then
Anim="Run"
change = 0.84+ Character.Humanoid.WalkSpeed/112
if attack==false and equip == false then
Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02)
Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2.5), -.8) * angles(math.rad(-23), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1)
Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+20*math.sin(sine/2.5)),math.rad(0),math.rad(0+5*math.sin(sine/5)) + RootPart.RotVelocity.Y / 13),.1)
RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0+0.34*math.sin(sine/5)) * angles(math.rad(0-60*math.sin(sine/5))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(8+0*math.cos(sine/5))- RootPart.RotVelocity.Y / 34),.15)
LW.C0=clerp(LW.C0,cf(-1.5,0.5,0-0.34*math.sin(sine/5))*angles(math.rad(0+60*math.sin(sine/5))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-8+0*math.cos(sine/5))+ RootPart.RotVelocity.Y / -34),.15)
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0.+0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0-74*math.sin(sine/5)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5),0.-0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0+74*math.sin(sine/5)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.3)
end
--[[
if attack==false then
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.4*math.cos(sine/5.5)/2, 0 *math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + -math.sin(sine/5.5)/1.2, math.rad(0), 0), .8)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/5.5)/2,0 *-math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/5.5)/1.2, math.rad(0), 0), .8)
end
]]
if attack==true and noleg == false then
LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0.+0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0-74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3)
RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5),0.-0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0+74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3)
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 * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
Mesh = Thing[1]:FindFirstChild("Mesh")
if not Mesh then
Mesh = Instance.new("BlockMesh")
end
Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
Thing[1].Transparency = Thing[1].Transparency + Thing[3]
elseif Thing[2] == "Cylinder" then
Mesh = Thing[1]:FindFirstChild("Mesh")
if not Mesh then
Mesh = Instance.new("BlockMesh")
end
Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
Thing[1].Transparency = Thing[1].Transparency + Thing[3]
elseif Thing[2] == "Blood" then
Mesh = Thing[1]:FindFirstChild("Mesh")
if not Mesh then
Mesh = Instance.new("BlockMesh")
end
Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
Thing[1].Transparency = Thing[1].Transparency + Thing[3]
elseif Thing[2] == "Elec" then
Mesh = Thing[1]:FindFirstChild("Mesh")
if not Mesh then
Mesh = Instance.new("BlockMesh")
end
Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
Thing[1].Transparency = Thing[1].Transparency + Thing[3]
elseif Thing[2] == "Disappear" then
Thing[1].Transparency = Thing[1].Transparency + Thing[3]
end
else
Part.Parent = nil
game:GetService("Debris"):AddItem(Part, 0)
table.remove(Effects, e)
end
end
end
end
end
end