Run it
Copy the script and paste it into your executor.
(a)
t = {}
=
=
=
=
=
=
=
=
=
=
assert = assert
StringBuilder = {
buffer = {}
}
StringBuilder:()
o = {}
(o, self)
self.__index = self
o.buffer = {}
o
StringBuilder:(s)
self.buffer[#self.buffer+] = s
StringBuilder:()
.(self.buffer)
JsonWriter = {
backslashes = {
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
[] =
}
}
JsonWriter:()
o = {}
o.writer = StringBuilder:()
(o, self)
self.__index = self
o
JsonWriter:(s)
self.writer:(s)
JsonWriter:()
self.writer:()
JsonWriter:(o)
t = (o)
t ==
self:()
t ==
self:(o)
t ==
self:(o)
t ==
self:(o)
t ==
self:(o)
t ==
self:(o)
t ==
self:(o)
t ==
self:(o)
JsonWriter:()
self:()
JsonWriter:(o)
self:((o))
JsonWriter:(s)
self:()
self:(.(s, , (n)
c = self.backslashes[n]
c c
.(, .(n))
))
self:()
JsonWriter:(t)
count =
isindex = (k)
(k) == k >
.(k) == k
k,v (t)
(k)
, ,
count = .(count, k)
, , , count
JsonWriter:(t)
ba, st, et, n = self:(t)
self:(st)
ba
i = , n
self:(t[i])
i < n
self:()
first = ;
k, v (t)
first
self:()
first = ;
self:(k)
self:()
self:(v)
self:(et)
JsonWriter:(o)
(.(
,
(o)))
JsonWriter:(o)
o == Null
self:()
self:(o)
StringReader = {
s = ,
i =
}
StringReader:(s)
o = {}
(o, self)
self.__index = self
o.s = s o.s
o
StringReader:()
i = self.i +
i <= #self.s
.(self.s, i, i)
StringReader:()
self.i = self.i+
self.i <= #self.s
.(self.s, self.i, self.i)
StringReader:()
self.s
JsonReader = {
escapes = {
[] = ,
[] = ,
[] = ,
[] = ,
[] = ,
}
}
JsonReader:(s)
o = {}
o.reader = StringReader:(s)
(o, self)
self.__index = self
o;
JsonReader:()
self:()
peek = self:()
peek ==
(.(
,
self:()))
peek ==
self:()
peek ==
self:()
peek ==
self:()
.(peek, )
self:()
peek ==
self:()
peek ==
self:()
peek ==
self:()
peek ==
self:()
self:()
JsonReader:()
self:{,,,}
JsonReader:()
self:{,,,,}
JsonReader:()
self:{,,,}
JsonReader:(t)
i, v (t)
self:() ~= v
(.(
,
.(t),
self:()))
JsonReader:()
result = self:()
peek = self:()
peek ~= .(
peek,
)
result = result .. self:()
peek = self:()
result = (result)
result ==
(.(
,
result))
result
JsonReader:()
result =
(self:() == )
self:() ~=
ch = self:()
ch ==
ch = self:()
self.escapes[ch]
ch = self.escapes[ch]
result = result .. ch
(self:() == )
fromunicode = (m)
.((m, ))
.(
result,
,
fromunicode)
JsonReader:()
(self:() == )
second = self:()
second ==
self:()
second ==
self:()
(.(
,
self:()))
JsonReader:()
done =
done
ch = self:()
ch == self:() ==
done =
done
ch ==
self:() ==
(.(
,
self:()))
self:()
JsonReader:()
ch = self:()
ch ~= ch ~=
ch = self:()
JsonReader:()
result = {}
(self:() == )
done =
self:() ==
done = ;
done
item = self:()
result[#result+] = item
self:()
self:() ==
done =
done
ch = self:()
ch ~=
(.(
,
self:(), ch))
( == self:())
result
JsonReader:()
result = {}
(self:() == )
done =
self:() ==
done =
done
key = self:()
(key) ~=
(.(
,
key))
self:()
ch = self:()
ch ~=
(.(
,
self:(),
ch))
self:()
val = self:()
result[key] = val
self:()
self:() ==
done =
done
ch = self:()
ch ~=
(.(
,
self:(),
ch))
(self:() == )
result
JsonReader:()
p = self:()
p ~= .(p, )
p ==
self:()
self:()
p = self:()
JsonReader:()
self.reader:()
JsonReader:()
self.reader:()
JsonReader:()
self.reader:()
(o)
writer = JsonWriter:()
writer:(o)
writer:()
(s)
reader = JsonReader:(s)
reader:()
()
Null
t.DecodeJSON = (jsonString)
(() () )
(jsonString) ==
(jsonString)
()
t.EncodeJSON = (jsonTable)
(() () )
(jsonTable)
t.MakeWedge = (x, y, z, defaultmaterial)
:():(x,y,z)
t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParent)
terrain = :():()
terrain
(regionToSelect)
(color)
(regionToSelect) ==
(,(regionToSelect))
(color) ==
(,(color))
GetCell = terrain.GetCell
WorldToCellPreferSolid = terrain.WorldToCellPreferSolid
CellCenterToWorld = terrain.CellCenterToWorld
emptyMaterial = .CellMaterial.Empty
selectionContainer = .()
selectionContainer.Name =
selectionContainer.Archivable =
selectionParent
selectionContainer.Parent = selectionParent
selectionContainer.Parent = :()
updateSelection =
currentKeepAliveTag =
aliveCounter =
lastRegion =
adornments = {}
reusableAdorns = {}
selectionPart = .()
selectionPart.Name =
selectionPart.Transparency =
selectionPart.Anchored =
selectionPart.Locked =
selectionPart.CanCollide =
selectionPart.Size = .(,,)
selectionBox = .()
(region3)
theLowVec = region3.CFrame.p - (region3.Size/) + .(,,)
lowCell = (terrain,theLowVec)
theHighVec = region3.CFrame.p + (region3.Size/) - .(,,)
highCell = (terrain, theHighVec)
highIntVec = Vector3int16.(highCell.x,highCell.y,highCell.z)
lowIntVec = Vector3int16.(lowCell.x,lowCell.y,lowCell.z)
Region3int16.(lowIntVec,highIntVec)
(theColor)
selectionPartClone =
selectionBoxClone =
#reusableAdorns >
selectionPartClone = reusableAdorns[][]
selectionBoxClone = reusableAdorns[][]
.(reusableAdorns,)
selectionBoxClone.Visible =
selectionPartClone = selectionPart:()
selectionPartClone.Archivable =
selectionBoxClone = selectionBox:()
selectionBoxClone.Archivable =
selectionBoxClone.Adornee = selectionPartClone
selectionBoxClone.Parent = selectionContainer
selectionBoxClone.Adornee = selectionPartClone
selectionBoxClone.Parent = selectionContainer
theColor
selectionBoxClone.Color = theColor
selectionPartClone, selectionBoxClone
()
cellPos, adornTable (adornments)
adornTable.KeepAlive ~= currentKeepAliveTag
adornTable.SelectionBox.Visible =
.(reusableAdorns,{part = adornTable.SelectionPart, box = adornTable.SelectionBox})
adornments[cellPos] =
()
aliveCounter = aliveCounter +
aliveCounter >
aliveCounter =
aliveCounter
(region, color)
regionBegin = region.CFrame.p - (region.Size/) + .(,,)
regionEnd = region.CFrame.p + (region.Size/) - .(,,)
cellPosBegin = (terrain, regionBegin)
cellPosEnd = (terrain, regionEnd)
currentKeepAliveTag = ()
y = cellPosBegin.y, cellPosEnd.y
z = cellPosBegin.z, cellPosEnd.z
x = cellPosBegin.x, cellPosEnd.x
cellMaterial = (terrain, x, y, z)
cellMaterial ~= emptyMaterial
cframePos = (terrain, x, y, z)
cellPos = Vector3int16.(x,y,z)
updated =
cellPosAdorn, adornTable (adornments)
cellPosAdorn == cellPos
adornTable.KeepAlive = currentKeepAliveTag
color
adornTable.SelectionBox.Color = color
updated =
updated
selectionPart, selectionBox = (color)
selectionPart.Size = .(,,)
selectionPart.CFrame = .(cframePos)
adornTable = {SelectionPart = selectionPart, SelectionBox = selectionBox, KeepAlive = currentKeepAliveTag}
adornments[cellPos] = adornTable
()
lastRegion = regionToSelect
selectEmptyCells
selectionPart, selectionBox = (color)
selectionPart.Size = regionToSelect.Size
selectionPart.CFrame = regionToSelect.CFrame
adornments.SelectionPart = selectionPart
adornments.SelectionBox = selectionBox
updateSelection =
(newRegion, color)
newRegion newRegion ~= lastRegion
lastRegion = newRegion
selectionPart.Size = newRegion.Size
selectionPart.CFrame = newRegion.CFrame
color
selectionBox.Color = color
(regionToSelect, color)
updateSelection =
(newRegion, color)
newRegion newRegion ~= lastRegion
lastRegion = newRegion
(newRegion, color)
destroyFunc = ()
updateSelection =
selectionContainer selectionContainer:()
adornments =
updateSelection, destroyFunc
t.()
this = {}
mBindableEvent = .()
mAllCns = {}
this:(func)
self ~= this (, )
(func) ~=
(..(func), )
cn = mBindableEvent.Event:(func)
mAllCns[cn] =
pubCn = {}
pubCn:()
cn:()
mAllCns[cn] =
pubCn.Disconnect = pubCn.disconnect
pubCn
this:()
self ~= this (, )
cn, _ (mAllCns)
cn:()
mAllCns[cn] =
this:()
self ~= this (, )
mBindableEvent.Event:()
this:(...)
self ~= this (, )
mBindableEvent:(...)
this.Connect = this.connect
this.Disconnect = this.disconnect
this.Wait = this.wait
this.Fire = this.fire
this
(objectType)
(objectType) ~=
(, )
(dat)
dat = dat {}
obj = .(objectType)
parent =
ctor =
k, v (dat)
(k) ==
k ==
parent = v
obj[k] = v
(k) ==
(v) ~=
(..(v), )
v.Parent = obj
(k) == k.__eventname
(v) ~=
(..k.__eventname....(v), )
obj[k.__eventname]:(v)
k == t.Create
(v) ~=
(..(v), )
ctor
(, )
ctor = v
(..(k)....(v).., )
ctor
(obj)
parent
obj.Parent = parent
obj
t.Create = ({}, {__call = (tb, ...) (...) })
t.Create.E = (eventName)
{__eventname = eventName}
t.Help =
(funcNameOrFunc)
funcNameOrFunc == funcNameOrFunc == t.DecodeJSON
..
..
funcNameOrFunc == funcNameOrFunc == t.EncodeJSON
..
..
funcNameOrFunc == funcNameOrFunc == t.MakeWedge
..
..
..
..
funcNameOrFunc == funcNameOrFunc == t.SelectTerrainRegion
..
..
..
..
..
..
..
..
funcNameOrFunc == funcNameOrFunc == t.CreateSignal
..
..
..
..
..
..
..
funcNameOrFunc ==
..
..
..
..
funcNameOrFunc ==
..
..
..
..
funcNameOrFunc ==
..
..
..
..
..
..
funcNameOrFunc ==
..
..
..
..
..
..
funcNameOrFunc ==
..
..
..
..
t
Ply = .Players.LocalPlayer
Char = Ply.Character
Tor = Char.Torso
He = Char.Head
Ne = Tor.Neck
Hu = Char.Humanoid
LA = Char[]
LL = Char[]
RA = Char[]
RL = Char[]
LS = Tor[]
RS = Tor[]
LH = Tor[]
RH = Tor[]
Combo =
NeckCF = .(, , , -, -, -, , , , , , )
RP = Char.HumanoidRootPart
RJ = RP.RootJoint
RootCF = .(-, , )
LHCF = .(, .(-), )
RHCF = .(, .(), )
attack =
equipped =
Anim =
Effects = { }
cam = .CurrentCamera
RbxUtility = ()
Create = RbxUtility.Create
m = (){
Parent = Char,
Name = ,
}
RS.Parent =
LS.Parent =
RW = (){
Name = ,
Part0 = Tor ,
C0 = .(, , ),
C1 = .(, , ),
Part1 = RA ,
Parent = Tor ,
}
LW = (){
Name = ,
Part0 = Tor ,
C0 = .(-, , ),
C1 = .(, , ) ,
Part1 = LA ,
Parent = Tor ,
}
mouse = Ply:()
(part)
part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = , , , , ,
(FF, Par, Mat, Ref, Tra, BC, Nam, Siz)
Part = (){
formFactor = FF,
Parent = Par,
Reflectance = Ref,
Transparency = Tra,
CanCollide = ,
Locked = ,
BrickColor = BrickColor.((BC)),
Name = Nam,
Size = Siz,
Position = Tor.Position,
Material = Mat,
}
(Part)
Part
(Ms, Par, MType, MId, OS, Sca)
Msh = (Ms){
Parent = Par,
Offset = OS,
Scale = Sca,
}
Ms ==
Msh.MeshType = MType
Msh.MeshId = MId
(Par, PartA, PartB, CA, CB)
Weld = (){
Parent = Par,
Part0 = PartA,
Part1 = PartB,
C0 = CA,
C1 = CB,
}
Weld
(id, par, vol, pit)
.(.(()
sou = (){
Parent = par ,
Volume = vol,
Pitch = pit ,
SoundId = id,
}
()
sou:()
))
(a, b, t)
a:(b, t)
(Pos, Dir, Max, Ignore)
:():(Ray.(Pos, Dir.unit * (Max )), Ignore)
(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
i, v (hit:())
v:() hit.Name ~= Char.Name
find = v:()
find
v.Parent:()
BillG = (){
Parent = v.Parent.Head,
Size = .(, , , ),
Adornee = v.Parent.Head,
StudsOffset = .(.(-, ), .(, ), .(-, )),
}
TL = (){
Parent = BillG,
Size = .(, , , ),
BackgroundTransparency = ,
Text = (damage)..,
TextColor3 = Color1.Color,
TextStrokeColor3 = Color2.Color,
TextStrokeTransparency = ,
TextXAlignment = .TextXAlignment.Center,
TextYAlignment = .TextYAlignment.Center,
FontSize = .FontSize.Size18,
Font = ,
}
.(.(()
()
i = , ,
()
BillG.StudsOffset = BillG.StudsOffset + .(, , )
BillG:()
))
v.Health = v.Health - damage
bool = (){
Parent = v,
Name = ,
}
HSound ~= HPitch ~=
(HSound, hit, , HPitch)
:():(bool, cooldown)
(Part, magni, mindam, maxdam, Color1, Color2, HitSound)
_, c (:())
hum = c:()
hum ~=
head = c:()
head ~=
targ = head.Position - Part.Position
mag = targ.magnitude
mag <= magni c.Name ~= Ply.Name
(head.Parent, .(mindam, maxdam), , Color1, Color2, HitSound, )
Handle = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Handleweld = (m, RA, Handle, .(, , , , , , , , , , , ), .(, -, -, , , -, , -, -, -, , -))
(, Handle, , , .(, , ), .(, , ))
FakeHandle = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
FakeHandleweld = (m, Handle, FakeHandle, .(, , , , , , , , , , , ), .(, , , , , , , , , , , ))
Barrel = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Barrelweld = (m, FakeHandle, Barrel, .(, , , , , , , , , , , ), .(-, , , , , -, , , , , -, -))
(, Barrel, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, , , , , , , , , -, ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, , , , , , , , , , -, -))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, -, , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , , ))
(, Part, .MeshType.FileMesh, , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, -, -, , -, -, , , -, , -))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, , , , -, -, , -, , -, -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, , , , -, , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, -, , , , , , , -, , -))
(, Part, .MeshType.FileMesh, , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, , , , , , , -, -, , , -))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, -, , , , , , , -, , -))
(, Part, .MeshType.FileMesh, , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, , -, , -, , , , , , -))
(, Part, .MeshType.FileMesh, , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , , ))
(, Part, .MeshType.FileMesh, , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, , , -, , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, , -, , -, , , , , , -))
(, Part, .MeshType.FileMesh, , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, , -, , , , , -, -, -, , ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, -, , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, , , -, , , , , , -, ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, -, , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, , -, , , , , -, -, -, , ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, , -, , , , , , -, , , -))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(, -, , , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, -, -, , , , , , , , -, ))
(, Part, , , .(, , ), .(, , ))
Part = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Partweld = (m, FakeHandle, Part, .(, , , , , , , , , , , ), .(-, , , , , -, , , , , -, -))
(, Part, , , .(, , ), .(, , ))
Wedge = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Wedgeweld = (m, FakeHandle, Wedge, .(, , , , , , , , , , , ), .(, -, -, , , , , -, -, , , ))
Wedge = (.FormFactor.Custom, m, .Material.SmoothPlastic, , , , , .(, , ))
Wedgeweld = (m, FakeHandle, Wedge, .(, , , , , , , , , , , ), .(-, -, -, , -, , , , , -, , -))
(, Wedge, .MeshType.Wedge, , .(, , ), .(, , ))
Wedge = (.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Wedge", Vector3.new(0.432266563, 0.216133192, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.000385284424, -0.108055115, -0.432257652, 2.98023117e-008, 0, 0.999999702, 0, -0.999999642, -4.73655636e-016, 0.999999285, 1.49011701e-008, 1.3909041e-008))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Navy blue", "Wedge", Vector3.new(0.200000003, 0.200000003, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.162475586, -0.486286163, 0.32416153, 0, -0, 1, 0, 0.999999642, 4.73655636e-016, -0.999999642, 0, -4.37113812e-008))
CreateMesh("SpecialMesh", Wedge, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 0.540332973, 1))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Wedge", Vector3.new(0.200000003, 0.200000003, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.161708832, -0.810497284, 1.62095213, 1.49011559e-008, 0, -0.999999762, 0, 0.999999642, 4.73655636e-016, 0.999999404, 4.47034836e-008, 5.86125317e-008))
CreateMesh("SpecialMesh", Wedge, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 0.540332973, 1))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Navy blue", "Wedge", Vector3.new(0.200000003, 0.432266384, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.162475586, -0.648399353, -2.86102295e-005, 0, -0, 1, 0, 0.999999642, 4.73655636e-016, -0.999999642, 0, -4.37113812e-008))
CreateMesh("SpecialMesh", Wedge, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 1, 1))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Wedge", Vector3.new(0.200000003, 0.200000003, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.162475586, -0.810497284, 1.62095213, 1.49011559e-008, 0, -0.999999762, 0, 0.999999642, 4.73655636e-016, 0.999999404, 4.47034836e-008, 5.86125317e-008))
CreateMesh("SpecialMesh", Wedge, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 0.540332973, 1))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Wedge", Vector3.new(0.432266563, 0.216133237, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.000385284424, 0.324203491, 2.37740946, 1.06338617e-018, 5.01342412e-010, 0.999999404, 1.49011701e-008, -0.999999285, 5.01343078e-010, 0.999999285, 1.49011701e-008, 4.37113634e-008))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Wedge", Vector3.new(0.432266563, 0.216133222, 0.216133296))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.000385284424, 0.108070374, -0.108057022, 2.98023117e-008, 0, 0.999999702, 0, -0.999999642, -4.73655636e-016, 0.999999285, 1.49011701e-008, 1.3909041e-008))
Wedge = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Navy blue", "Wedge", Vector3.new(0.200000003, 0.200000003, 0.216133267))
Wedgeweld = CreateWeld(m, FakeHandle, Wedge, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.161708832, -0.486286163, 0.32416153, 0, -0, 1, 0, 0.999999642, 4.73655636e-016, -0.999999642, 0, -4.37113812e-008))
CreateMesh("SpecialMesh", Wedge, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 0.540332973, 1))
MagHandle = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "MagHandle", Vector3.new(0.432266504, 0.324199826, 0.216133296))
MagHandleweld = CreateWeld(m, FakeHandle, MagHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.648423195, -0.0540428162, 0.000385284424, 0.999999642, 0, 4.37113812e-008, 0, 0.999999642, 4.73655636e-016, 0, -0, 1))
Part = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Navy blue", "Part", Vector3.new(0.200000003, 0.324199826, 0.216133296))
Partweld = CreateWeld(m, MagHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.270163536, 0, 0, 0.999999642, 0, 0, 0, 0.999999642, -0, 0, -0, 1))
CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 1, 1))
Part = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Navy blue", "Part", Vector3.new(0.200000003, 0.324199826, 0.216133296))
Partweld = CreateWeld(m, MagHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.270174026, 0, 0, 0.999999642, 0, 0, 0, 0.999999642, -0, 0, -0, 1))
CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.540333211, 1, 1))
BoltHandle = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "BoltHandle", Vector3.new(0.216133282, 1.40486586, 0.216133267))
BoltHandleweld = CreateWeld(m, FakeHandle, BoltHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.540328979, -0.486276627, -0.000385284424, -4.47034729e-008, -0.999999583, -2.42770696e-015, -0.999999642, 0, -4.37113812e-008, 0, 0, -0.99999994))
CreateMesh("CylinderMesh", BoltHandle, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
Part = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Part", Vector3.new(0.216133282, 0.216133252, 0.216133267))
Partweld = CreateWeld(m, BoltHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, 0.70238018, 0, 0.999999523, 4.47034729e-008, 0, 4.47034729e-008, 0.999999642, 0, 0, 0, 0.999999881))
CreateMesh("SpecialMesh", Part, Enum.MeshType.Sphere, "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
Part = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Part", Vector3.new(0.324199915, 0.324199826, 0.200000003))
Partweld = CreateWeld(m, BoltHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.015832901, 0.146270752, 0.648381233, 0.707106292, 5.08757338e-008, 0.707106531, 0.707106411, -8.72889849e-009, -0.707106411, 8.94069458e-008, 0.999999404, -5.09424458e-009))
CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 0.540333092))
Part = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Navy blue", "Part", Vector3.new(0.324199915, 0.200000003, 0.200000003))
Partweld = CreateWeld(m, BoltHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0158443451, 0.362377167, 0.648385048, 0.707106292, 5.08757338e-008, 0.707106531, 0.707106411, -8.72889849e-009, -0.707106411, 8.94069458e-008, 0.999999404, -5.09424458e-009))
CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 0.540332973, 0.540333092))
ScopeZoom = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 1, "Bright violet", "ScopeZoom", Vector3.new(0.216133296, 0.200000003, 0.200000003))
ScopeZoomweld = CreateWeld(m, FakeHandle, ScopeZoom, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.72752714, -1.03763962, 0, 0.999999642, 0, 4.37113812e-008, 0, 0.999999642, 4.73655636e-016, 4.37113812e-008, 4.73655636e-016, 1))
local PE1 = Create("ParticleEmitter"){
Parent = Barrel,
Color = ColorSequence.new(BrickColor.new("Dark stone grey").Color),
Transparency = NumberSequence.new(0),
Size = NumberSequence.new(.5),
Texture = "rbxassetid://257430870",
Lifetime = NumberRange.new(.1),
Rate = 100,
VelocitySpread = 180,
Rotation = NumberRange.new(0),
Speed = NumberRange.new(0),
LightEmission = .6,
LockedToPart = true,
Enabled = false
}
local PE2 = PE1:Clone()
PE2.Size = NumberSequence.new(.7)
PE2.LightEmission = 1
PE2.Texture = "rbxassetid://87729590"
function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
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, 2)
Effects[#Effects + 1] = {
prt,
"Cylinder",
delay,
x3,
y3,
z3
}
end
local Ammo = 10
local Depleted = false
function Shoot(asd, spread1, spread2)
local MainPos = asd.Position
local MainPos2 = mouse.Hit.p
local spread = Vector3.new((math.random(-spread1, 0) + math.random()) * spread2, (math.random(-spread1, 0) + math.random()) * spread2, (math.random(-spread1, 0) + math.random()) * spread2) * (asd.Position - mouse.Hit.p).magnitude / 100
local MouseLook = CFrame.new((MainPos + MainPos2) / 2, MainPos2 + spread)
num = 30
Ammo = Ammo - 1
print(Ammo)
if Ammo == 0 then
Depleted = true
end
coroutine.resume(coroutine.create(function(Spreaded)
repeat
wait()
local hit, pos = rayCast(MainPos, MouseLook.lookVector, 50, RP.Parent)
local TheHit = mouse.Hit.p
local mag = (MainPos - pos).magnitude
CylinderEffect(BrickColor.new("Dark stone grey"), CFrame.new((MainPos + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 3, mag * 5, 3, .5, 1, .5, 0.2)
MainPos = MainPos + (MouseLook.lookVector * 50)
num = num - 1
if hit ~= nil then
num = 0
local ref = CreatePart(3, workspace, "Neon", 0, 1, BrickColor.new("Dark stone grey"), "Reference", Vector3.new())
ref.Anchored = true
ref.CFrame = CFrame.new(pos)
MagnitudeDamage(ref, 5, 999999999, 999999999, BrickColor.new("Dark stone grey"), BrickColor.new("Navy blue") , "rbxassetid://199149297")
game:GetService("Debris"):AddItem(ref, 1)
end
until num <= 0
end))
end
local Aiming = false
gyro = Instance.new("BodyGyro")
gyro.Parent = nil
gyro.P = 1e7
gyro.D = 1e3
gyro.MaxTorque = Vector3.new(0,1e7,0)
local Crouching = false
function Fire()
if Aiming == true then
attack = true
CreateSound("rbxassetid://132572951", Barrel, 1, .9)
CreateSound("rbxassetid://130767489", Barrel, .7, 1.2)
PE1.Enabled = true
PE2.Enabled = true
Shoot(Barrel, 0, 0)
for i = 0, 1, 0.2 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(-10), math.rad(90)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.5, -.6) * CFrame.Angles(math.rad(90), math.rad(-20), math.rad(-90)), .5)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.7, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(140)), .5)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
PE1.Enabled = false
PE2.Enabled = false
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(90)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.5, -.6) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(90)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
Handleweld.Part0 = LA
Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Handleweld.C1 = CFrame.new(-0.737663269, -0.281144857, 0.33117196, 0.00916702952, 0.939647615, 0.342020333, 0.999940991, -0.0106014106, 0.00232372736, 0.00580918044, 0.341978878, -0.939689875)
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(80)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.5, -.6) * CFrame.Angles(math.rad(80), math.rad(-30), math.rad(-90)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(70)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
CreateSound("rbxassetid://146740582", BoltHandle, .7, 1)
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(80)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.6) * CFrame.Angles(math.rad(80), math.rad(-30), math.rad(-90)), .5)
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(70)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
BoltHandleweld.C0 = clerp(BoltHandleweld.C0, CFrame.new(.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(80)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.5, -.6) * CFrame.Angles(math.rad(80), math.rad(-30), math.rad(-90)), .5)
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(70)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
BoltHandleweld.C0 = clerp(BoltHandleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
for i = 0, 1, 0.3 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(90)), .4)
RW.C0 = clerp(RW.C0, CFrame.new(.51, 0.51, -.6) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), .4)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.51, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(90)), .4)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
Handleweld.Part0 = RA
Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Handleweld.C1 = CFrame.new(1.03214836, -0.278110504, -0.0978469849, 0, 0.999999702, -2.98023224e-008, 0, -2.98023188e-008, -0.999999821, -1, 4.37113847e-008, -1.77635684e-015)
attack = false
end
end
local Zoomed = false
function Reload()
attack = true
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(0), math.rad(0), math.rad(50)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * CFrame.Angles(math.rad(120), math.rad(0), math.rad(-50)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.5, -.5) * CFrame.Angles(math.rad(0), math.rad(60), math.rad(120)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
CreateSound("rbxassetid://131045401", FakeHandle, 1, 1)
MagHandleweld.Part0 = LA
MagHandleweld.C0 = CFrame.new(.5, -1, .6) * CFrame.Angles(1.5, 0, 1.5)
for i = 0, 1, 0.08 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(5), math.rad(50)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * CFrame.Angles(math.rad(120), math.rad(0), math.rad(-50)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.5, -.3) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(20)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
CreateSound("rbxassetid://131045429", FakeHandle, 1, 1)
for i = 0, 1, 0.08 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(0), math.rad(0), math.rad(50)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.5) * CFrame.Angles(math.rad(100), math.rad(0), math.rad(-50)), .5)
LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.5, -.3) * CFrame.Angles(math.rad(0), math.rad(60), math.rad(100)), .5)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
MagHandleweld.Part0 = FakeHandle
MagHandleweld.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
Ammo = 10
print(Ammo)
if Depleted == true then
Depleted = false
Handleweld.Part0 = LA
Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Handleweld.C1 = CFrame.new(-0.737663269, -0.281144857, 0.33117196, 0.00916702952, 0.939647615, 0.342020333, 0.999940991, -0.0106014106, 0.00232372736, 0.00580918044, 0.341978878, -0.939689875)
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(80)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.5, -.6) * CFrame.Angles(math.rad(80), math.rad(-30), math.rad(-90)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(70)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
end
CreateSound("rbxassetid://146740582", BoltHandle, .7, 1)
for i = 0, 1, 0.1 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(80)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1, 0.5, -.6) * CFrame.Angles(math.rad(80), math.rad(-30), math.rad(-90)), .5)
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(70)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
BoltHandleweld.C0 = clerp(BoltHandleweld.C0, CFrame.new(.5, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
for i = 0, 1, 0.3 do
wait()
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(80)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(.5, 0.5, -.6) * CFrame.Angles(math.rad(80), math.rad(-30), math.rad(-90)), .5)
LW.C0 = clerp(LW.C0, CFrame.new(-1, 0.3, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(70)), .3)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
BoltHandleweld.C0 = clerp(BoltHandleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
end
Handleweld.Part0 = RA
Handleweld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Handleweld.C1 = CFrame.new(1.03214836, -0.278110504, -0.0978469849, 0, 0.999999702, -2.98023224e-008, 0, -2.98023188e-008, -0.999999821, -1, 4.37113847e-008, -1.77635684e-015)
attack = false
end
mouse.Button1Down:connect(function()
if attack == false and Depleted == false then
Fire()
end
end)
mouse.KeyDown:connect(function(k)
k = k:lower()
if k == "r" and attack == false then
Reload()
elseif k == "f" and Aiming == false then
Aiming = true
elseif k == "f" and Aiming == true then
Aiming = false
elseif k == "c" and Aiming == true and Crouching == false then
Crouching = true
elseif k == "c" and Aiming == true and Crouching == true then
Crouching = false
elseif k == "z" and Aiming == true and Zoomed == false then
Zoomed = true
CreateSound("rbxassetid://180144779", FakeHandle, 1, 1)
for i = 0, 1, 0.2 do
wait()
cam.FieldOfView = cam.FieldOfView - 5
end
Ply.CameraMode = "LockFirstPerson"
--Ply.DevEnableMouseLock = false
cam.FieldOfView = 10
cam.CameraSubject = ScopeZoom
mouse.Icon = "rbxassetid://18006519"
elseif k == "z" and Aiming == true and Zoomed == true then
Zoomed = false
CreateSound("rbxassetid://190623951", FakeHandle, 1, 1)
for i = 0, 1, 0.2 do
wait()
cam.FieldOfView = cam.FieldOfView + 5
end
Ply.CameraMode = "Classic"
--Ply.DevEnableMouseLock = true
cam.FieldOfView = 80
cam.CameraSubject = Hu
mouse.Icon = ""
end
end)
local sine = 0
local change = 1
local val = 0
while true do
wait()
sine = sine + change
local torvel = (RP.Velocity * Vector3.new(1, 0, 1)).magnitude
local velderp = RP.Velocity.y
hitfloor, posfloor = rayCast(RP.Position, (CFrame.new(RP.Position, RP.Position - Vector3.new(0, 1, 0))).lookVector, 4, Char)
if equipped == true or equipped == false then
if Aiming == true then
if Crouching == false and Aiming == true then
Hu.WalkSpeed = 10
elseif Crouching == true and Aiming == true then
Hu.WalkSpeed = 5
end
gyro.Parent = RP
local gunpos = Vector3.new(mouse.Hit.p.x, He.Position.Y, mouse.Hit.p.z)
offset = (Tor.Position.y - mouse.Hit.p.y) / 60
local mag = (Tor.Position - mouse.Hit.p).magnitude / 80
offset = offset / mag
gyro.CFrame = CFrame.new(Vector3.new(),(mouse.Hit.p -RP.CFrame.p).unit * 100)
elseif Aiming == false then
Hu.JumpPower = 50
Hu.WalkSpeed = 16
gyro.Parent = nil
end
if RP.Velocity.y > 1 and hitfloor == nil then
Anim = "Jump"
if attack == false and Aiming == false then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.4, -.2) * CFrame.Angles(math.rad(60), math.rad(0), math.rad(-40)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.4) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(60)), .3)
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-4), math.rad(0), math.rad(-30)), .3)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-4), math.rad(0), math.rad(30)), .3)
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(0)), .3)
elseif attack == false and Aiming == true then
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(90)), .4)
RW.C0 = clerp(RW.C0, CFrame.new(.51, 0.51, -.6) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), .4)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.51, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(90)), .4)
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
elseif RP.Velocity.y < -1 and hitfloor == nil then
Anim = "Fall"
if attack == false and Aiming == false then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .3)
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(20), math.rad(0), math.rad(0)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.4, -.2) * CFrame.Angles(math.rad(100), math.rad(0), math.rad(-40)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.4) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(100)), .3)
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-4), math.rad(0), math.rad(30)), .3)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-4), math.rad(0), math.rad(-30)), .3)
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(0)), .3)
elseif attack == false and Aiming == true then
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(90)), .4)
RW.C0 = clerp(RW.C0, CFrame.new(.51, 0.51, -.6) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), .4)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.51, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(90)), .4)
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
elseif torvel < 1 and hitfloor ~= nil then
Anim = "Idle"
if attack == false and Aiming == false then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(50)), .3)
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(-50)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.4, 0) * CFrame.Angles(math.rad(70), math.rad(0), math.rad(-40)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.4) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(70)), .3)
RH.C0 = clerp(RH.C0, CFrame.new(.9, -.5, .2) * RHCF * CFrame.Angles(math.rad(-5), math.rad(-50), math.rad(0)), .3)
LH.C0 = clerp(LH.C0, CFrame.new(-.5, -1, -1) * LHCF * CFrame.Angles(math.rad(-5), math.rad(-50), math.rad(50)), .3)
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(70), math.rad(0)), .3)
elseif attack == false and Aiming == true then
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(90)), .4)
RW.C0 = clerp(RW.C0, CFrame.new(.51, 0.51, -.6) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), .4)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.51, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(90)), .4)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.5, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
end
elseif torvel > 2 and hitfloor ~= nil then
Anim = "Walk"
if attack == false and Aiming == false then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)), .3)
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(-20), math.rad(0), math.rad(0)), .3)
RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.4, -.2) * CFrame.Angles(math.rad(50), math.rad(0), math.rad(-40)), .3)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.4) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(50)), .3)
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-3), math.rad(0), math.rad(0)), .3)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-3), math.rad(0), math.rad(0)), .3)
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(80), math.rad(0)), .3)
elseif attack == false and Aiming == true then
if Crouching == false and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
elseif Crouching == true and Aiming == true then
RJ.C0 = clerp(RJ.C0, RootCF * CFrame.new(0, 0, -.5) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-90)), .4)
end
Ne.C0 = clerp(Ne.C0, NeckCF * CFrame.Angles(math.rad(5), math.rad(0), math.rad(90)), .4)
RW.C0 = clerp(RW.C0, CFrame.new(.51, 0.51, -.6) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(-90)), .4)
LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.51, 0) * CFrame.Angles(math.rad(0), math.rad(160), math.rad(90)), .4)
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
if Crouching == false and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -1, 0) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -1, 0) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
elseif Crouching == true and Aiming == true then
RH.C0 = clerp(RH.C0, CFrame.new(1, -.1, -.5) * RHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)), .4)
LH.C0 = clerp(LH.C0, CFrame.new(-1, -.1, -.2) * LHCF * CFrame.Angles(math.rad(-5), math.rad(0), math.rad(50)), .4)
end
FakeHandleweld.C0 = clerp(Handleweld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), .4)
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] == "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]
end
else
Part.Parent = nil
table.remove(Effects, e)
end
end
end
end
end
end