-- Lost Psygen by Ietahuoy
-- edited by ikonikbruh
-- effect fixed by ceat
-- ported by ceat
-- original https://pastebin.com/cxL3uYUe
wait(1/60)
script.Parent=nil
NLS=NLS or require(13482937602)()
owner=owner
local plrr = game:GetService("RunService"):IsStudio() and game:GetService("Players"):GetPlayers()[1] or owner
do
local gunmodel = Instance.new("Model", script)
gunmodel.Name = "GunModel"
local joint = Instance.new("Part", gunmodel)
joint.Size = Vector3.new(0.1, 0.1, 0.1)
joint.Transparency = 1
joint.CanCollide = false
joint.Name = "Joint"
local hole = Instance.new("Part", gunmodel)
hole.Size = Vector3.new(0.1, 0.1, 0.1)
hole.Transparency = 1
hole.CanCollide = false
hole.Name = "Hole"
local body = Instance.new("Part", gunmodel)
body.Color = Color3.fromRGB(99, 95, 98)
body.Size = Vector3.new(4.7, 4.3, 0.8)
body.CanCollide = false
body.Name = "Handle"
local mesh = Instance.new("SpecialMesh", body)
mesh.MeshId = "rbxassetid://4615369575"
mesh.Scale = Vector3.new(1.3, 1.3, 1.3)
local bodyweld = Instance.new("Weld", joint)
bodyweld.Part0 = joint
bodyweld.Part1 = body
bodyweld.C0 = CFrame.new(-0.937, 0.582, -0.167) * CFrame.fromEulerAnglesYXZ(0, math.rad(165), math.rad(45))
local holeweld = Instance.new("Weld", joint)
holeweld.Part0 = joint
holeweld.Part1 = hole
holeweld.C0 = CFrame.new(-1.68, 0.693, -0.5) * CFrame.fromEulerAnglesYXZ(math.rad(-90), 0, 0)
gunmodel.PrimaryPart = joint
end
do
local knifemodel = Instance.new("Model", script)
knifemodel.Name = "KnifeModel"
local joint = Instance.new("Part", knifemodel)
joint.Size = Vector3.new(0.1, 0.1, 0.1)
joint.Transparency = 1
joint.CanCollide = false
joint.Name = "Joint"
local blade = Instance.new("Part", knifemodel)
blade.Size = Vector3.new(0.781, 3.647, 1.386)
blade.Transparency = 1
blade.CanCollide = false
blade.Name = "Blade"
Instance.new("BlockMesh", blade).Scale = Vector3.zero
local a1 = Instance.new("Attachment", blade)
a1.CFrame = CFrame.new(0, -0.174, 0.993)
local a2 = Instance.new("Attachment", blade)
a2.CFrame = CFrame.new(0, 0.161, -0.964)
local trail = Instance.new("Trail", knifemodel)
trail.Attachment0 = a1
trail.Attachment1 = a2
trail.Color = ColorSequence.new(Color3.fromRGB(255, 251, 248))
trail.FaceCamera = false
trail.LightEmission = 1
trail.LightInfluence = 1
trail.Texture = ""
trail.TextureLength = 1
trail.TextureMode = Enum.TextureMode.Stretch
trail.Transparency = NumberSequence.new({
NumberSequenceKeypoint.new(0, 0),
NumberSequenceKeypoint.new(0.5, 0),
NumberSequenceKeypoint.new(1, 1)
})
trail.Enabled = false
trail.Lifetime = 1
trail.MaxLength = 0
trail.MinLength = 0
trail.WidthScale = NumberSequence.new({
NumberSequenceKeypoint.new(0, 1),
NumberSequenceKeypoint.new(0.5, 1),
NumberSequenceKeypoint.new(1, 0)
})
local body = Instance.new("Part", knifemodel)
body.Color = Color3.new()
body.Size = Vector3.new(0.781, 3.647, 1.386)
body.CanCollide = false
body.Name = "Sword"
local mesh = Instance.new("SpecialMesh", body)
mesh.MeshId = "rbxassetid://1996456880"
mesh.Scale = Vector3.new(2, 2.42, 2)
local bodyweld = Instance.new("Weld", joint)
bodyweld.Part0 = joint
bodyweld.Part1 = body
bodyweld.C0 = CFrame.new(-2.831, 0.025, 0.017) * CFrame.fromEulerAnglesYXZ(math.rad(87.622), math.rad(90), math.rad(-180))
local bladeweld = Instance.new("Weld", joint)
bladeweld.Part0 = joint
bladeweld.Part1 = blade
bladeweld.C0 = CFrame.new(28.028, -0.442, -7.281) * CFrame.fromEulerAnglesYXZ(math.rad(-89.903), math.rad(-90), math.rad(180))
knifemodel.PrimaryPart = joint
end
local charr = plrr.Character
local name = charr.Name
local MainPosition=CFrame.new(0,0,0)
if charr and charr:FindFirstChildOfClass("Part") then
MainPosition = charr:FindFirstChildOfClass("Part").CFrame
elseif workspace:FindFirstChildOfClass("Part") then
MainPosition = workspace:FindFirstChildOfClass("Part").CFrame*CFrame.new(0,2,0)
else
MainPosition = CFrame.new(0,4,0)
end
local names = {string.reverse(name),"GOd",string.upper(name),string.lower(name),"ImMorTalItY","dIE","ImmOrTal","KILLeR","pSyChO",string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255)),string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255)),string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255))..string.char(math.random(1,255)),"","hate",string.sub(name,math.random(0,string.len(name)))}
local accs = {} local f = nil local face = nil
for _, acc in pairs(charr:GetDescendants()) do
if acc:IsA'Accessory' or acc:IsA'Hat' or acc:IsA'BodyColors' or acc:IsA'Shirt' or acc:IsA'Pants' or acc:IsA'ShirtGraphic' or acc:IsA'CharacterMesh' then
table.insert(accs,acc:Clone())
elseif acc:IsA'Part' and acc.Name == "Head" and acc:FindFirstChildOfClass'Decal' then
f = acc:FindFirstChildOfClass'Decal'.Texture
end
end
local sn = 0
local attacking = false
local repeatkey = false
local repeatmouse = false
local Neck=CFrame.new(0,0,0)
local Torso=CFrame.new(0,0,0)
local LeftArm=CFrame.new(0,0,0)
local RightArm=CFrame.new(0,0,0)
local LeftLeg=CFrame.new(0,0,0)
local RightLeg=CFrame.new(0,0,0)
local GunW=CFrame.new(0,0,0)
local KnifeW=CFrame.new(0,0,0)
function InstanceNW(typp,anth)
local part = Instance.new(typp)
if anth ~= nil then for i,v in next, anth do pcall(function() part[i] = v end) end end
return part
end
function alerp(tble,animspeed)
animspeed=math.min(animspeed,1)
Torso=Torso:Lerp(tble[1],animspeed)
Neck=Neck:Lerp(tble[2],animspeed)
LeftArm=LeftArm:Lerp(tble[3],animspeed)
RightArm=RightArm:Lerp(tble[4],animspeed)
LeftLeg=LeftLeg:Lerp(tble[5],animspeed)
RightLeg=RightLeg:Lerp(tble[6],animspeed)
GunW=GunW:Lerp(tble[7],animspeed)
KnifeW=KnifeW:Lerp(tble[8],animspeed)
end
function loop(dur,f)
local start = os.clock()
repeat
f(game:GetService("RunService").Heartbeat:wait())
until os.clock()-start > dur
end
local stoped = false
local W,A,S,D=false,false,false,false
local fallingspeed = 0
local falling = true
local stopeffects = false
local walkspeed = 8 local CCF=nil
local goreSounds = {3739362156,4459576935,3739364168,4459571224,4459570664,4459572763,4459571342,4459571443,4459573960,3847883680,3929462189,3739335394,3929462677}
local MainModel = Instance.new("Model",workspace) MainModel.Name = name MainModel.Archivable=true
local EffectModel = Instance.new("Model",MainModel) EffectModel.Name = "EffectModel" MainModel.Archivable=true
local h=Instance.new("Part",MainModel)h.Size=Vector3.new(2,1,1)h.Color=Color3.new() h.Transparency=0 h.Anchored=true h.CanCollide=true h.Name="Head"
local m=Instance.new("SpecialMesh",h)m.MeshType="Head"m.Scale=Vector3.new(1.25,1.25,1.25)
local t=Instance.new("Part",MainModel)t.Material="Plastic"t.Size=Vector3.new(2,2,1)t.Color=Color3.new() t.Transparency=0 t.Anchored=true t.CanCollide=true t.Name="Torso"
local ll=Instance.new("Part",MainModel)ll.Material="Plastic"ll.Size=Vector3.new(1,2,1)ll.Color=Color3.new() ll.Transparency=0 ll.Anchored=true ll.CanCollide=true ll.Name="Left Leg"
local rl=Instance.new("Part",MainModel)rl.Material="Plastic"rl.Size=Vector3.new(1,2,1)rl.Color=Color3.new() rl.Transparency=0 rl.Anchored=true rl.CanCollide=true rl.Name="Right Leg"
local la=Instance.new("Part",MainModel)la.Material="Plastic"la.Size=Vector3.new(1,2,1)la.Color=Color3.new() la.Transparency=0 la.Anchored=true la.CanCollide=true la.Name="Left Arm"
local ra=Instance.new("Part",MainModel)ra.Material="Plastic"ra.Size=Vector3.new(1,2,1)ra.Color=Color3.new() ra.Transparency=0 ra.Anchored=true ra.CanCollide=true ra.Name="Right Arm"
local hum=Instance.new("Humanoid",MainModel) hum.Name = "" hum.HealthDisplayType = "AlwaysOff"
local hairat = Instance.new("Attachment") hairat.Parent = h hairat.Position = Vector3.new(0,0.6,0) hairat.Name = "HairAttachment"
local hatat = Instance.new("Attachment") hatat.Parent = h hatat.Position = Vector3.new(0,0.6,0) hatat.Name = "HatAttachment"
local ffat = Instance.new("Attachment") ffat.Parent = h ffat.Position = Vector3.new(0,0,-0.6) ffat.Name = "FaceFrontAttachment"
local fcat = Instance.new("Attachment") fcat.Parent = h fcat.Position = Vector3.new(0,0,0) fcat.Name = "FaceCenterAttachment"
local bbat = Instance.new("Attachment") bbat.Parent = t bbat.Position = Vector3.new(0,0,0.5) bbat.Name = "BodyBackAttachment"
local bfat = Instance.new("Attachment") bfat.Parent = t bfat.Position = Vector3.new(0,0,-0.5) bfat.Name = "BodyFrontAttachment"
local lcat = Instance.new("Attachment") lcat.Parent = t lcat.Position = Vector3.new(-1,1,0) lcat.Name = "LeftCollarAttachment"
local necat = Instance.new("Attachment") necat.Parent = t necat.Position = Vector3.new(0,1,0) necat.Name = "NeckAttachment"
local rcat = Instance.new("Attachment") rcat.Parent = t rcat.Position = Vector3.new(1,1,0) rcat.Name = "RightCollarAttachment"
local wbat = Instance.new("Attachment") wbat.Parent = t wbat.Position = Vector3.new(0,-1,0.5) wbat.Name = "WaistBackAttachment"
local wcat = Instance.new("Attachment") wcat.Parent = t wcat.Position = Vector3.new(0,-1,0) wcat.Name = "WaistCenterAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = t wfat.Position = Vector3.new(0,-1,-0.5) wfat.Name = "WaistFrontAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = ll wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftFootAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = rl wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightFootAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,1,0) wfat.Name = "RightShoulderAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightGripAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,1,0) wfat.Name = "LeftShoulderAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftGripAttachment"
local cam = Instance.new("Part",workspace) cam.Name = ">["..plrr.Name.."]<" cam.Anchored=true cam.CanCollide=false cam.Transparency=1 cam.Size=Vector3.new()
local playmus = true local mus = Instance.new("Sound") mus.Volume = 10 mus.Pitch = 0.85 mus.EmitterSize = 100 mus.SoundId = "rbxassetid://12616491652" mus.Parent = t mus.Playing = playmus mus.Looped = true
local muspos = nil muspos = mus.TimePosition local fixmus = false
local GunBackup = script.GunModel:Clone() script.GunModel:Destroy() local Gun = GunBackup:Clone() Gun.Parent=MainModel
--for _, c in pairs(Gun:GetChildren()) do if c:IsA("BasePart") then c.Anchored = false c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) if c ~= Gun.PrimaryPart then local weldd = Instance.new("ManualWeld") weldd.Part0 = Gun.PrimaryPart weldd.Part1 = c weldd.C0 = CFrame.new() weldd.C1 = c.CFrame:inverse() * Gun.PrimaryPart.CFrame weldd.Parent = Gun.PrimaryPart end c.Locked = true end end
local gw = InstanceNW("Weld",{Part0 = ra, Part1 = Gun.PrimaryPart, C0 = GunW, C1 = CFrame.new(0,0,0), Parent = Gun})
local KnifeBackup = script.KnifeModel:Clone() script.KnifeModel:Destroy() local Knife = KnifeBackup:Clone() Knife.Parent=MainModel
--for _, c in pairs(Knife:GetChildren()) do if c:IsA("BasePart") then c.Anchored = false c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) if c ~= Knife.PrimaryPart then local weldd = Instance.new("ManualWeld") weldd.Part0 = Knife.PrimaryPart weldd.Part1 = c weldd.C0 = CFrame.new() weldd.C1 = c.CFrame:inverse() * Knife.PrimaryPart.CFrame weldd.Parent = Knife.PrimaryPart end c.Locked = true end end
local kw = InstanceNW("Weld",{Part0 = la, Part1 = Knife.PrimaryPart, C0 = KnifeW, C1 = CFrame.new(0,0,0), Parent = Knife})
local EventBackup = Instance.new("RemoteEvent")
EventBackup.Name = "JPInputEventFrom"..plrr.Name
local CamBackup = Instance.new("RemoteEvent")
CamBackup.Name = "JPCamEventFrom"..plrr.Name
local inputScript = [[
local Player = game:GetService("Players").LocalPlayer
local Mouse = Player:GetMouse()
local Event = game:GetService("JointsService"):WaitForChild("JPInputEventFrom"..Player.Name)
local CEvent = game:GetService("JointsService"):WaitForChild("JPCamEventFrom"..Player.Name)
local UIS = game:GetService("UserInputService")
local h,t = Mouse.Hit,Mouse.Target
local input = function(io,a)
if a then return end
local io = {KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}
Event:FireServer(io)
end
UIS.InputBegan:Connect(input)
UIS.InputEnded:Connect(input)
while wait(1/30) do
CEvent:FireServer(workspace.Camera.CoordinateFrame)
local cam = workspace.Camera
cam.CameraSubject = workspace:FindFirstChild(">["..Player.Name.."]<")
cam.CameraType = "Custom"
cam.HeadLocked = true
cam.HeadScale = 1
cam.FieldOfView = 70
if h~=Mouse.Hit or t~=Mouse.Target then
Event:FireServer({isMouse=true,Target=Mouse.Target,Hit=Mouse.Hit})
h,t=Mouse.Hit,Mouse.Target
end
end
]]
NLS(inputScript, plrr:WaitForChild("PlayerGui")).Name = "Input"
local EventBackupC = EventBackup:Clone()
local CamBackupC = CamBackup:Clone()
local InputEvent = Instance.new("RemoteEvent")
InputEvent.Name = "JPInputEventFrom"..plrr.Name
InputEvent.Parent = game:GetService("JointsService")
local CamEvent = Instance.new("RemoteEvent")
CamEvent.Name = "JPCamEventFrom"..plrr.Name
CamEvent.Parent = game:GetService("JointsService")
CamEvent.OnServerEvent:Connect(function(plr, e)
CCF=e
end)
local CAS = {Actions={}}
local fakeEvent = function()
local t = {_fakeEvent=true}
t.Connect = function(self,f)self.Function=f end
t.connect = t.Connect
return t
end
local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
function CAS:BindAction(name,fun,touch,...)
CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
end
function CAS:UnbindAction(name)
CAS.Actions[name] = nil
end
local function te(self,ev,...)
local t = m[ev]
if t and t._fakeEvent and t.Function then
t.Function(...)
end
end
local Mouse,mouse,UserInputService,ContextActionService
do
m.TrigEvent = te
UIS.TrigEvent = te
InputEvent.OnServerEvent:Connect(function(plr,io)
if plr~=plrr then return end
if io.isMouse then
m.Target = io.Target
m.Hit = io.Hit
elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
if io.UserInputState == Enum.UserInputState.Begin then
m:TrigEvent("Button1Down")
else
m:TrigEvent("Button1Up")
end
else
for n,t in pairs(CAS.Actions) do
for _,k in pairs(t.Keys) do
if k==io.KeyCode then
t.Function(t.Name,io.UserInputState,io)
end
end
end
if io.UserInputState == Enum.UserInputState.Begin then
m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
UIS:TrigEvent("InputBegan",io,false)
else
m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
UIS:TrigEvent("InputEnded",io,false)
end
end
end)
Mouse,mouse,UserInputService,ContextActionService,mausee = m,m,UIS,CAS,m
end
function EndScript() if plrr:FindFirstChild"PlayerGui" and plrr.PlayerGui:FindFirstChild"Input" then plrr.PlayerGui.Input:Destroy() end script:ClearAllChildren() script.Disabled = true script:Destroy() stoped=true EventBackup:Destroy() CamBackupC:Destroy() EventBackupC:Destroy() pcall(function() game:GetService("JointsService")["JPInputEventFrom"..plrr.Name]:Destroy() game:GetService("JointsService")["JPCamEventFrom"..plrr.Name]:Destroy() end) end
game.Players.PlayerRemoving:Connect(function(p)if p == plrr or p.Name == plrr.Name then EndScript() end end)
function onChatted(msg)
if (msg == ".Stop" or msg == ".stop" or msg == "/e .Stop" or msg == "/e .stop" or msg == "/e get/nog sr" or msg == "get/nog sr") then EndScript() return end
if (msg:match("^/e") or msg:match("^/w")) then return end
if (not h and not h:IsDescendantOf(workspace)) then return end
end
local chattedcon = plrr.Chatted:connect(onChatted)
function system()
game:GetService("RunService").Heartbeat:Connect(function(delta)
if stoped == false and game.Players:FindFirstChild(plrr.Name) then sn=sn+30*delta
if plrr and plrr.Character then local ch = plrr.Character plrr.Character=nil ch:Destroy() end
if MainModel == nil or MainModel.Parent ~= workspace or MainModel.Parent == nil or not MainModel then
MainModel = Instance.new("Model",workspace) MainModel.Name = name MainModel.Archivable=true
EffectModel = Instance.new("Model",MainModel) EffectModel.Name = "EffectModel" MainModel.Archivable=true
end
if EffectModel == nil or EffectModel.Parent ~= MainModel or EffectModel.Parent == nil or not EffectModel then
EffectModel = Instance.new("Model",MainModel) EffectModel.Name = "EffectModel" MainModel.Archivable=true
end
if cam == nil or cam.Parent ~= workspace or cam.Parent == nil or not cam then
cam = Instance.new("Part",workspace) cam.Name = ">["..plrr.Name.."]<" cam.Anchored=true cam.CanCollide=false cam.Transparency=1 cam.Size=Vector3.new()
end
if h == nil or h.Parent ~= MainModel or h.Parent == nil or not h then
h=Instance.new("Part",MainModel)h.Size=Vector3.new(2,1,1)h.Color=Color3.new() h.Transparency=0 h.Anchored=true h.CanCollide=true h.Name="Head"
local m=Instance.new("SpecialMesh",h)m.MeshType="Head"m.Scale=Vector3.new(1.25,1.25,1.25)
local hairat = Instance.new("Attachment") hairat.Parent = h hairat.Position = Vector3.new(0,0.6,0) hairat.Name = "HairAttachment"
local hatat = Instance.new("Attachment") hatat.Parent = h hatat.Position = Vector3.new(0,0.6,0) hatat.Name = "HatAttachment"
local ffat = Instance.new("Attachment") ffat.Parent = h ffat.Position = Vector3.new(0,0,-0.6) ffat.Name = "FaceFrontAttachment"
local fcat = Instance.new("Attachment") fcat.Parent = h fcat.Position = Vector3.new(0,0,0) fcat.Name = "FaceCenterAttachment"
if MainModel:FindFirstChildOfClass("BodyColors") then MainModel:FindFirstChildOfClass("BodyColors"):Destroy() end
end
if t == nil or t.Parent ~= MainModel or t.Parent == nil or not t then
t=Instance.new("Part",MainModel)t.Material="Plastic"t.Size=Vector3.new(2,2,1)t.Color=Color3.new() t.Transparency=0 t.Anchored=true t.CanCollide=true t.Name="Torso"
local bbat = Instance.new("Attachment") bbat.Parent = t bbat.Position = Vector3.new(0,0,0.5) bbat.Name = "BodyBackAttachment"
local bfat = Instance.new("Attachment") bfat.Parent = t bfat.Position = Vector3.new(0,0,-0.5) bfat.Name = "BodyFrontAttachment"
local lcat = Instance.new("Attachment") lcat.Parent = t lcat.Position = Vector3.new(-1,1,0) lcat.Name = "LeftCollarAttachment"
local necat = Instance.new("Attachment") necat.Parent = t necat.Position = Vector3.new(0,1,0) necat.Name = "NeckAttachment"
local rcat = Instance.new("Attachment") rcat.Parent = t rcat.Position = Vector3.new(1,1,0) rcat.Name = "RightCollarAttachment"
local wbat = Instance.new("Attachment") wbat.Parent = t wbat.Position = Vector3.new(0,-1,0.5) wbat.Name = "WaistBackAttachment"
local wcat = Instance.new("Attachment") wcat.Parent = t wcat.Position = Vector3.new(0,-1,0) wcat.Name = "WaistCenterAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = t wfat.Position = Vector3.new(0,-1,-0.5) wfat.Name = "WaistFrontAttachment"
if MainModel:FindFirstChildOfClass("BodyColors") then MainModel:FindFirstChildOfClass("BodyColors"):Destroy() end
end
if ll == nil or ll.Parent ~= MainModel or ll.Parent == nil or not ll then
ll=Instance.new("Part",MainModel)ll.Material="Plastic"ll.Size=Vector3.new(1,2,1)ll.Color=Color3.new() ll.Transparency=0 ll.Anchored=true ll.CanCollide=true ll.Name="Left Leg"
local wfat = Instance.new("Attachment") wfat.Parent = ll wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftFootAttachment"
if MainModel:FindFirstChildOfClass("BodyColors") then MainModel:FindFirstChildOfClass("BodyColors"):Destroy() end
end
if rl == nil or rl.Parent ~= MainModel or rl.Parent == nil or not rl then
rl=Instance.new("Part",MainModel)rl.Material="Plastic"rl.Size=Vector3.new(1,2,1)rl.Color=Color3.new() rl.Transparency=0 rl.Anchored=true rl.CanCollide=true rl.Name="Right Leg"
local wfat = Instance.new("Attachment") wfat.Parent = rl wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightFootAttachment"
if MainModel:FindFirstChildOfClass("BodyColors") then MainModel:FindFirstChildOfClass("BodyColors"):Destroy() end
end
if la == nil or la.Parent ~= MainModel or la.Parent == nil or not la then
la=Instance.new("Part",MainModel)la.Material="Plastic"la.Size=Vector3.new(1,2,1)la.Color=Color3.new() la.Transparency=0 la.Anchored=true la.CanCollide=true la.Name="Left Arm"
local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,1,0) wfat.Name = "LeftShoulderAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = ra wfat.Position = Vector3.new(0,-1,0) wfat.Name = "LeftGripAttachment"
if MainModel:FindFirstChildOfClass("BodyColors") then MainModel:FindFirstChildOfClass("BodyColors"):Destroy() end
end
if ra == nil or ra.Parent ~= MainModel or ra.Parent == nil or not ra then
ra=Instance.new("Part",MainModel)ra.Material="Plastic"ra.Size=Vector3.new(1,2,1)ra.Color=Color3.new() ra.Transparency=0 ra.Anchored=true ra.CanCollide=true ra.Name="Right Arm"
local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,1,0) wfat.Name = "RightShoulderAttachment"
local wfat = Instance.new("Attachment") wfat.Parent = la wfat.Position = Vector3.new(0,-1,0) wfat.Name = "RightGripAttachment"
if MainModel:FindFirstChildOfClass("BodyColors") then MainModel:FindFirstChildOfClass("BodyColors"):Destroy() end
end
if hum == nil or hum.Parent ~= MainModel or hum.Parent == nil or not hum then
hum=Instance.new("Humanoid",MainModel) hum.Name = "" hum.HealthDisplayType = "AlwaysOff"
end
if face == nil or face.Parent ~= h or face.Parent == nil or not face then
face = InstanceNW("Decal",{Parent=h,Face="Front",Texture=f})
end
if Gun == nil or Gun.Parent ~= MainModel or Gun.Parent == nil or not Gun then
Gun = GunBackup:Clone() Gun.Parent=MainModel
for _, c in pairs(Gun:GetChildren()) do if c:IsA("BasePart") then c.Anchored = false c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) if c ~= Gun.PrimaryPart then local weldd = Instance.new("ManualWeld") weldd.Part0 = Gun.PrimaryPart weldd.Part1 = c weldd.C0 = CFrame.new() weldd.C1 = c.CFrame:inverse() * Gun.PrimaryPart.CFrame weldd.Parent = Gun.PrimaryPart end c.Locked = true end end
gw = InstanceNW("Weld",{Part0 = ra, Part1 = Gun.PrimaryPart, C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)), C1 = CFrame.new(0,0,0), Parent = Gun})
end
if Knife == nil or Knife.Parent ~= MainModel or Knife.Parent == nil or not Knife then
Knife = KnifeBackup:Clone() Knife.Parent=MainModel
for _, c in pairs(Knife:GetChildren()) do if c:IsA("BasePart") then c.Anchored = false c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) if c ~= Knife.PrimaryPart then local weldd = Instance.new("ManualWeld") weldd.Part0 = Knife.PrimaryPart weldd.Part1 = c weldd.C0 = CFrame.new() weldd.C1 = c.CFrame:inverse() * Knife.PrimaryPart.CFrame weldd.Parent = Knife.PrimaryPart end c.Locked = true end end
kw = InstanceNW("Weld",{Part0 = la, Part1 = Knife.PrimaryPart, C0 = CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-10)), C1 = CFrame.new(0,0,0), Parent = Knife})
end
if MainModel:FindFirstChildOfClass("Accessory") == nil then for i=1,#accs do if accs[i]:IsA'Accessory' then accs[i]:Clone().Parent=MainModel end end end
if MainModel:FindFirstChildOfClass("Hat") == nil then for i=1,#accs do if accs[i]:IsA'Hat' then accs[i]:Clone().Parent=MainModel end end end
if MainModel:FindFirstChildOfClass("BodyColors") == nil then for i=1,#accs do if accs[i]:IsA'BodyColors' then accs[i]:Clone().Parent=MainModel end end end
if MainModel:FindFirstChildOfClass("Shirt") == nil then for i=1,#accs do if accs[i]:IsA'Shirt' then accs[i]:Clone().Parent=MainModel end end end
if MainModel:FindFirstChildOfClass("Pants") == nil then for i=1,#accs do if accs[i]:IsA'Pants' then accs[i]:Clone().Parent=MainModel end end end
if MainModel:FindFirstChildOfClass("ShirtGraphic") == nil then for i=1,#accs do if accs[i]:IsA'ShirtGraphic' then accs[i]:Clone().Parent=MainModel end end end
if MainModel:FindFirstChildOfClass("CharacterMesh") == nil then for i=1,#accs do if accs[i]:IsA'CharacterMesh' then accs[i]:Clone().Parent=MainModel end end end
cam.CFrame=MainPosition*CFrame.new(0,1.5,0) cam.Anchored=true cam.CanCollide=false cam.Transparency=1 cam.Size=Vector3.new()
local chrrr = MainModel:GetChildren() for i=1,#chrrr do
if chrrr[i] == EffectModel or chrrr[i] == h or chrrr[i] == t or chrrr[i] == rl or chrrr[i] == hum or chrrr[i] == ll or chrrr[i] == ra or chrrr[i] == la or chrrr[i] == mus or chrrr[i] == Gun or chrrr[i] == Knife or chrrr[i]:IsA'Accessory' or chrrr[i]:IsA'Hat' or chrrr[i]:IsA'Shirt' or chrrr[i]:IsA'Pants' or chrrr[i]:IsA'BodyColors' or chrrr[i]:IsA'ShirtGraphic' or chrrr[i]:IsA'CharacterMesh' then else chrrr[i]:Destroy() end
end
if plrr and plrr:WaitForChild('Backpack') then plrr:WaitForChild('Backpack'):ClearAllChildren() end
local rc=Ray.new(MainPosition.Position,(CFrame.new(0,-1-math.max(fallingspeed*delta,0),0).Position).unit*4)
local pos,hit=workspace:FindPartOnRayWithIgnoreList(rc,{MainModel,cam},false,true)
if pos~=nil then falling=false fallingspeed=0 MainPosition=MainPosition*CFrame.new(0,hit.Y-MainPosition.Y+3,0)
else falling=true fallingspeed=fallingspeed+196.2*delta MainPosition=MainPosition-Vector3.new(0,fallingspeed*delta,0)end
if W or A or S or D then MainPosition=CFrame.new(MainPosition.p,Vector3.new(CCF.x,MainPosition.y,CCF.z))end
local oldMainPosition=MainPosition
if W then MainPosition=MainPosition*CFrame.new(0,0,walkspeed*delta)end
if S then MainPosition=MainPosition*CFrame.new(0,0,-walkspeed*delta)end
if A then MainPosition=MainPosition*CFrame.new(walkspeed*delta,0,0)end
if D then MainPosition=MainPosition*CFrame.new(-walkspeed*delta,0,0)end
if not falling then
if(MainPosition.X~=oldMainPosition.X or MainPosition.Z~=oldMainPosition.Z)then MainPosition=CFrame.new(MainPosition.p,oldMainPosition.p)
if attacking == false then
alerp({CFrame.new(0,0+0.075*math.sin(sn/8),0)*CFrame.Angles(math.rad(2.5-1*math.cos(sn/8)),math.rad(180-5*math.cos(sn/8)),math.rad(0-2.5*math.cos(sn/8))),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(-10+1*math.cos(sn/8)),math.rad(0+5*math.cos(sn/8)),math.rad(0+2.5*math.cos(sn/8))),CFrame.new(-1.5,0-0.1*math.cos(sn/8),0+0.25*math.sin(sn/8))*CFrame.Angles(math.rad(0-15*math.sin(sn/8)),math.rad(0+5*math.cos(sn/8)),0),
CFrame.new(1.5,0+0.1*math.cos(sn/8),0-0.5*math.sin(sn/8))*CFrame.Angles(math.rad(0+30*math.sin(sn/8)),math.rad(0-10*math.cos(sn/8)),0),CFrame.new(-.5,-2+0.2*math.cos(sn/8),0-1*math.sin(sn/8))*CFrame.Angles(math.rad(-10+40*math.sin(sn/8)),math.rad(10-2.5*math.cos(sn/36)),math.rad(0+1*math.cos(sn/18))),CFrame.new(.5,-2-0.2*math.cos(sn/8),0+1*math.sin(sn/8))*CFrame.Angles(math.rad(-10-40*math.sin(sn/8)),math.rad(0-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90+10*math.cos(sn/8))),CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-10+15*math.cos(sn/8)))},delta*10)
end
else
if attacking == false then
alerp({CFrame.new(0,0+0.075*math.sin(sn/18),0)*CFrame.Angles(math.rad(5-2.5*math.cos(sn/36)),math.rad(180),math.rad(0-1*math.cos(sn/18))),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(-10-5*math.cos(sn/18)),math.rad(0-5*math.sin(sn/18)),math.rad(0+2.5*math.cos(sn/36))),CFrame.new(-1.05,0-0.025*math.sin(sn/18),0.45)*CFrame.Angles(math.rad(-10-5*math.sin(sn/18)),math.rad(50+15*math.sin(sn/36)),math.rad(0+5*math.sin(sn/18))),
CFrame.new(1.5,0+0.025*math.sin(sn/18),0)*CFrame.Angles(math.rad(35-10*math.sin(sn/36)),math.rad(-10+5*math.sin(sn/36)),math.rad(25+5*math.sin(sn/18))),CFrame.new(-.5,-2-0.075*math.sin(sn/18),-0.15)*CFrame.Angles(math.rad(0-2.5*math.cos(sn/36)),math.rad(25-2.5*math.cos(sn/36)),math.rad(0+1*math.cos(sn/18))),CFrame.new(.5,-2-0.075*math.sin(sn/18),-0.05)*CFrame.Angles(math.rad(2.5-2.5*math.cos(sn/36)),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90+10*math.cos(sn/18)),math.rad(90-5*math.cos(sn/18))),CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90-15*math.cos(sn/36)),math.rad(-10+10*math.cos(sn/18)))},delta*10)
end
end
elseif falling then
if(MainPosition.X~=oldMainPosition.X or MainPosition.Z~=oldMainPosition.Z) then MainPosition=CFrame.new(MainPosition.p,oldMainPosition.p)end
if attacking == false then
if fallingspeed>0 then
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(15-10*math.cos(sn/9)),math.rad(180),0),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(-20-10*math.cos(sn/9)),0,0),CFrame.new(-1.75,0.25,-0.15)*CFrame.Angles(math.rad(15+10*math.sin(sn/9)),0,math.rad(-35-10*math.sin(sn/9))),
CFrame.new(1.75,0.25,-0.15)*CFrame.Angles(math.rad(15+10*math.sin(sn/9)),0,math.rad(35+10*math.sin(sn/9))),CFrame.new(-.5,-2,0)*CFrame.Angles(math.rad(-5+2.5*math.cos(sn/9)),math.rad(10),0),CFrame.new(.5,-1,-0.25)*CFrame.Angles(math.rad(-10-5*math.sin(sn/9)),math.rad(-5),0),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(70+15*math.cos(sn/9))),CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-50+5*math.cos(sn/9)))},delta*10)
else
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(-5-5*math.cos(sn/9)),math.rad(180),0),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(5-10*math.cos(sn/9)),0,0),CFrame.new(-1.5,0.5,-0.75)*CFrame.Angles(math.rad(95+10*math.sin(sn/9)),0,math.rad(-0-5*math.sin(sn/9))),
CFrame.new(1.5,0.5,-0.75)*CFrame.Angles(math.rad(95+10*math.sin(sn/9)),0,math.rad(0+5*math.sin(sn/9))),CFrame.new(-.5,-1.5,-0.15)*CFrame.Angles(math.rad(-10+5*math.cos(sn/9)),math.rad(5),0),CFrame.new(.5,-0.5,-0.35)*CFrame.Angles(math.rad(-20-10*math.sin(sn/9)),0,0),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(120-15*math.cos(sn/9))),CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(90),math.rad(-70-5*math.cos(sn/9)))},delta*10)
end
end
end
if MainPosition.Y<=-200 then fallingspeed=0 MainPosition=MainPosition+Vector3.new(0,250,0)end
t.CFrame=MainPosition*Torso
h.CFrame=t.CFrame*Neck
ll.CFrame=t.CFrame*LeftLeg
rl.CFrame=t.CFrame*RightLeg
la.CFrame=t.CFrame*LeftArm
ra.CFrame=t.CFrame*RightArm
gw.C0=GunW
kw.C0=KnifeW
if t.Transparency > 0 or h.Transparency > 0 or ll.Transparency > 0 or rl.Transparency > 0 or la.Transparency > 0 or ra.Transparency > 0 then
t.Transparency=0 h.Transparency=0 ll.Transparency=0 rl.Transparency=0 la.Transparency=0 ra.Transparency=0
end
if math.random(1,100) == 1 then
LightningBolt({startp=Gun:FindFirstChild'Hole'.CFrame,endp=Gun:FindFirstChild'Hole'.CFrame*CFrame.new(math.random(1,3),math.random(-1,1),math.random(-1,1)),rdm=0.25,ss=0.25,tran=25,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Cylinder",parts=true,wait=0.025,size=1,size2=0,crtn=true})
end
if math.random(1,200) == 1 then
LightningBolt({startp=Knife:FindFirstChild'Blade'.CFrame,endp=Knife:FindFirstChild'Joint'.CFrame,rdm=1,ss=0.5,tran=50,clr=Color3.new(0,0,0),clr2=Color3.new(0.203922, 0.203922, 0.203922),mesh="Cylinder",parts=true,wait=0,size=1,size2=0,crtn=true})
end
if math.random(1,50) == 1 then
spawn(function()
for i = 1, math.random(1,#names) do game:GetService("RunService").Heartbeat:wait()
MainModel.Name = names[math.random(1,#names)]
if math.random(1,2) == 1 then
local a,b = math.random(-45,45),math.random(-45,45)
Neck=Neck:Lerp(CFrame.new(-b/200,1.5,a/200)*CFrame.Angles(math.rad(a),math.rad(b),0),1)
end
end
MainModel.Name = name
end)
end
if mus.Parent == nil or mus.Parent ~= t or mus == nil or not mus then
mus = Instance.new("Sound") mus.Volume = 10 mus.Pitch = 0.85 mus.EmitterSize = 100 mus.SoundId = "rbxassetid://12616491652" mus.Parent = t mus.Playing = playmus mus.Looped = true mus.TimePosition = muspos fixmus = true
elseif fixmus == false then
mus.Playing = playmus
muspos = mus.TimePosition
else
fixmus = false
end
if plrr and not plrr:WaitForChild("PlayerGui"):FindFirstChild("Input") then
NLS(inputScript, plrr:WaitForChild("PlayerGui")).Name = "Input"
end
if plrr and plrr:WaitForChild("PlayerGui"):FindFirstChild("Input") then
plrr.PlayerGui.Input.Disabled = false
end
if plrr and game:GetService("JointsService"):FindFirstChild("JPInputEventFrom"..plrr.Name) == nil then
local NewInput = EventBackupC:Clone()
NewInput.Parent = game:GetService("JointsService")
do
m.TrigEvent = te
UIS.TrigEvent = te
NewInput.OnServerEvent:Connect(function(plr,io)
if plr~=plrr then return end
if io.isMouse then
m.Target = io.Target
m.Hit = io.Hit
elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
if io.UserInputState == Enum.UserInputState.Begin then
m:TrigEvent("Button1Down")
else
m:TrigEvent("Button1Up")
end
else
for n,t in pairs(CAS.Actions) do
for _,k in pairs(t.Keys) do
if k==io.KeyCode then
t.Function(t.Name,io.UserInputState,io)
end
end
end
if io.UserInputState == Enum.UserInputState.Begin then
m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
UIS:TrigEvent("InputBegan",io,false)
else
m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
UIS:TrigEvent("InputEnded",io,false)
end
end
end)
Mouse,mouse,UserInputService,ContextActionService,mausee = m,m,UIS,CAS,m
end
if plrr and plrr:WaitForChild("PlayerGui"):FindFirstChild("Input") then
plrr:WaitForChild("PlayerGui"):FindFirstChild("Input"):Destroy()
end
end
if plrr and game:GetService("JointsService"):FindFirstChild("JPCamEventFrom"..plrr.Name) == nil then
local NewCam = CamBackupC:Clone()
NewCam.Parent = game:GetService("JointsService")
NewCam.OnServerEvent:Connect(function(plr, e)
CCF=e
end)
end
elseif stoped == true or plrr == nil or not plrr or game.Players:FindFirstChild(plrr.Name) == nil or not game.Players:FindFirstChild(plrr.Name) then
if MainModel then MainModel:Destroy() end
if cam then cam:Destroy() end
end
end)
end
spawn(system)
function r(o,dir,ran,ignor)
return workspace:FindPartOnRayWithIgnoreList(Ray.new(o, dir.unit * ran), ignor)
end
function cr(pos,dir,ran,ignor)
local ray = Ray.new(pos,(dir-pos).unit*ran)
local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignor or {MainModel,EffectModel},false,true)
return part,pos,norm,(pos and (pos-pos).magnitude)
end
function Sound(i,p,v,pi,por)
local s = nil
coroutine.resume(coroutine.create(function()
s = InstanceNW("Sound",{Parent=p,Volume=v,Pitch=pi,SoundId ="rbxassetid://"..i})
s:play()
if por == true then
s.PlayOnRemove=true
s:Destroy()
end
end))
return s
end
--Effect({cf=MainPosition,moveto=Mouse.Hit.p,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="Box",waits=100,size=Vector3.new(3,3,3),size2=Vector3.new(3,3,3),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1,bmr=true,sbm=50,mbm=50})
function Effect(tblee)
coroutine.resume(coroutine.create(function()
local origpos = (tblee.cf or nil)
local moveto = (tblee.moveto or nil)
local color = (tblee.clr or Color3.new(0,0,0))
local color2 = (tblee.clr2 or nil)
local defaultsize = (tblee.size or Vector3.new(2,2,2))
local material = (tblee.mat or "Neon")
local locker = (tblee.lock or false)
local rotateX = (tblee.radX or 0)
local rotateY = (tblee.radY or 0)
local rotateZ = (tblee.radZ or 0)
local secondsize = (tblee.size2 or Vector3.new(4,4,4))
local acttime = (tblee.waits or 100)
local truetime = acttime/60
local transpar = (tblee.tran or 0)
local transpar2 = (tblee.tran2 or 1)
local typeofmesh = (tblee.mtype or "S")
local boomerang = (tblee.bmr or false)
local sizeboomerang = (tblee.sbm or 0)
local moveboomerang = (tblee.mbm or 0)
local movingspeed = nil
local mesh = nil
local endsize = nil
local endtranpar = nil
local b1 = 1+moveboomerang/50
local b2 = 1+sizeboomerang/50
if typeof(origpos) == "Vector3"then origpos=CFrame.new(origpos) end
if typeof(moveto) == "CFrame"then moveto=moveto.Position end
if typeof(color) == "BrickColor"then color=color.Color end
if typeof(color2) == "BrickColor"then color2=color2.Color end
if origpos then
local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=origpos p.Material=material p.Size=Vector3.new(1,1,1)p.CanCollide=false p.Transparency=transpar p.CastShadow=false p.Locked=true
if typeofmesh == "Box" or typeofmesh == "B" or typeofmesh == "1" then
mesh=Instance.new("BlockMesh",p)mesh.Scale=defaultsize
elseif typeofmesh == "Sphere" or typeofmesh == "S" or typeofmesh == "2" then
mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Sphere"mesh.Scale=defaultsize
elseif typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Cylinder"mesh.Scale=defaultsize
end
if locker == true then
p.Position = origpos.p
if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(p.Size.Z/1.5))*CFrame.Angles(0,math.rad(90),0)
else
p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(p.Size.Z/1.5))
end
else
if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
p.CFrame = origpos*CFrame.Angles(0,math.rad(90),0)
else
p.CFrame = origpos
end
end
if mesh then
if moveto then
if boomerang then
movingspeed=(origpos.p - moveto).Magnitude/acttime*b1
else
movingspeed=(origpos.p - moveto).Magnitude/acttime
end
end
if boomerang then
endsize=(defaultsize - secondsize)*b2
else
endsize=(defaultsize - secondsize)
end
endtranpar=transpar-transpar2
if boomerang then
local s = os.clock()
loop(truetime,function(delta)
local i = (os.clock()-s)/truetime*acttime
mesh.Scale=mesh.Scale-(Vector3.new((endsize.X)*((1 - (i/acttime)*b2)),(endsize.Y)*((1 - (i/acttime)*b2)),(endsize.Z)*((1 - (i/acttime)*b2)))*b2)/acttime*delta*60
p.Transparency = p.Transparency - endtranpar/acttime*delta*60
p.CFrame=p.CFrame*CFrame.Angles(math.rad(rotateX*delta*60),math.rad(rotateY*delta*60),math.rad(rotateZ*delta*60))
if color2 then
p.Color = color:Lerp(color2,i/acttime*delta*60)
end
if moveto ~= nil then
local a = p.Orientation
if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(movingspeed)*((1-(i/acttime)*b1)))*CFrame.Angles(0,math.rad(90),0)
else
p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(movingspeed)*((1-(i/acttime)*b1)))
end
p.Orientation = a
end
end)
--for i = 1, acttime+1 do
-- game:GetService("RunService").Heartbeat:wait() if stopeffects == true then break end
-- mesh.Scale=mesh.Scale-(Vector3.new((endsize.X)*((1 - (i/acttime)*b2)),(endsize.Y)*((1 - (i/acttime)*b2)),(endsize.Z)*((1 - (i/acttime)*b2)))*b2)/acttime
-- p.Transparency = p.Transparency - endtranpar/acttime
-- p.CFrame=p.CFrame*CFrame.Angles(math.rad(rotateX),math.rad(rotateY),math.rad(rotateZ))
-- if color2 then
-- p.Color = color:Lerp(color2,i/acttime)
-- end
-- if moveto ~= nil then
-- local a = p.Orientation
-- if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
-- p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(movingspeed)*((1-(i/acttime)*b1)))*CFrame.Angles(0,math.rad(90),0)
-- else
-- p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-(movingspeed)*((1-(i/acttime)*b1)))
-- end
-- p.Orientation = a
-- end
--end
else
local s = os.clock()
loop(truetime,function(delta)
local i = (os.clock()-s)/truetime*acttime
mesh.Scale=mesh.Scale-endsize/acttime*delta*60
p.Transparency = p.Transparency - endtranpar/acttime*delta*60
p.CFrame=p.CFrame*CFrame.Angles(math.rad(rotateX*delta*60),math.rad(rotateY*delta*60),math.rad(rotateZ*delta*60))
if color2 then
p.Color = color:Lerp(color2,i/acttime*delta*60)
end
if moveto ~= nil then
local a = p.Orientation
if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-movingspeed)*CFrame.Angles(0,math.rad(90),0)
else
p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-movingspeed)
end
p.Orientation = a
end
end)
--for i = 1, acttime+1 do game:GetService("RunService").Heartbeat:wait() if stopeffects == true then break end
-- mesh.Scale=mesh.Scale-endsize/acttime
-- p.Transparency = p.Transparency - endtranpar/acttime
-- p.CFrame=p.CFrame*CFrame.Angles(math.rad(rotateX),math.rad(rotateY),math.rad(rotateZ))
-- if color2 then
-- p.Color = color:Lerp(color2,i/acttime)
-- end
-- if moveto ~= nil then
-- local a = p.Orientation
-- if typeofmesh == "Cylinder" or typeofmesh == "C" or typeofmesh == "3" then
-- p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-movingspeed)*CFrame.Angles(0,math.rad(90),0)
-- else
-- p.CFrame = CFrame.new(p.Position,moveto)*CFrame.new(0,0,-movingspeed)
-- end
-- p.Orientation = a
-- end
--end
end
p:Destroy()
end
elseif origpos == nil then
warn("Origpos is nil!")
end
end))
end
--LightningBolt({startp=MainPosition,endp=Mouse.Hit.p,rdm=3,ss=2,tran=100,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Cylinder",parts=true,wait=0,size=1,size2=0,crtn=true})
function LightningBolt(tblee)
local startpos = (tblee.startp or nil)
local endpos = (tblee.endp or nil)
local randomz = (tblee.rdm or 1)
local segmentsize = (tblee.ss or 2)
local fadetime = (tblee.tran or 75)
local color = (tblee.clr or Color3.new(0,0,0))
local color2 = (tblee.clr2 or Color3.new(0,0,0))
local segmentwaiting = (tblee.wait or 0)
local defaultsize = (tblee.size or 1)
local corout = (tblee.crtn or false)
local meshtype = (tblee.mesh or "Box")
local secondsize = (tblee.size2 or 1)
local endparts = (tblee.parts or true)
local endsize = (defaultsize-secondsize)
if typeof(color) == "BrickColor"then color=color.Color end
if typeof(startpos) == "CFrame"then startpos=startpos.Position end
if typeof(endpos) == "CFrame"then endpos=endpos.Position end
if startpos and endpos then
local magnitude = (startpos-endpos).magnitude local cframe = CFrame.new(startpos,endpos)
if corout == true then
coroutine.resume(coroutine.create(function()
local oldsegment = nil
for i=1,magnitude+1,segmentsize do if stopeffects == true then break end
local ex=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))*CFrame.new(math.random(randomz*100)/100,0,0)
local new=cframe*CFrame.new(0,0,-i/magnitude*magnitude)*ex
if oldsegment then
if meshtype == nil or meshtype == "Box" then
local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)p.Material="Neon"p.Size=Vector3.new(0.05,0.05,0.05)p.CanCollide=false p.CastShadow=false p.Locked=true
local mesh=Instance.new("BlockMesh",p)mesh.Scale=Vector3.new(10*defaultsize,10*defaultsize,(new.p-oldsegment.p).magnitude*20)
coroutine.resume(coroutine.create(function()
loop(fadetime/60,function(delta)
if color2 then
p.Color = color:Lerp(color2,i/fadetime*delta*60)
end
mesh.Scale=mesh.Scale-Vector3.new(10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60),0)
p.Transparency=p.Transparency+1/fadetime*delta*60
end)
p:Destroy()
end))
elseif meshtype == "Cylinder" then
local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)*CFrame.Angles(0,math.rad(90),0) p.Material="Neon"p.Size=Vector3.new(0.05,0.05,0.05)p.CanCollide=false p.CastShadow=false p.Locked=true
local mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Cylinder"mesh.Scale=Vector3.new((new.p-oldsegment.p).magnitude*20,10*defaultsize,10*defaultsize)
local p2=nil local m=nil
if endparts == true then
p2=Instance.new("Part",EffectModel)p2.Anchored=true p2.CanCollide=false p2.Color=color p2.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude) p2.Material="Neon"p2.Size=Vector3.new(0.05,0.05,0.05)p2.CanCollide=false
m=Instance.new("SpecialMesh",p2)m.MeshType="Sphere"m.Scale=Vector3.new(10*defaultsize,10*defaultsize,10*defaultsize)
end
coroutine.resume(coroutine.create(function()
loop(fadetime/60,function(delta)
if color2 then
p.Color = color:Lerp(color2,i/fadetime*delta*60)
if endparts == true then
p2.Color = color:Lerp(color2,i/fadetime*delta*60)
end
end
if endparts == true then
m.Scale=m.Scale-Vector3.new(10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60))
p2.Transparency=p2.Transparency+1/fadetime*delta*60
end
mesh.Scale=mesh.Scale-Vector3.new(0,10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60))
p.Transparency=p.Transparency+1/fadetime*delta*60
end)
p:Destroy()
if endparts then
p2:Destroy()
end
end))
end
oldsegment=new
else
oldsegment=new
end
if segmentwaiting~=0 then wait(segmentwaiting) end
end
end))
elseif corout == false then
local oldsegment = nil
for i=1,magnitude+1,segmentsize do if stopeffects == true then break end
local ex=CFrame.Angles(math.rad(math.random(360)),math.rad(math.random(360)),math.rad(math.random(360)))*CFrame.new(math.random(randomz*100)/100,0,0)
local new=cframe*CFrame.new(0,0,-i/magnitude*magnitude)*ex
if oldsegment then
if meshtype == nil or meshtype == "Box" then
local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)p.Material="Neon"p.Size=Vector3.new(0.05,0.05,0.05)p.CanCollide=false p.CastShadow=false p.Locked=true
local mesh=Instance.new("BlockMesh",p)mesh.Scale=Vector3.new(10*defaultsize,10*defaultsize,(new.p-oldsegment.p).magnitude*20)
coroutine.resume(coroutine.create(function()
loop(fadetime/60,function(delta)
if color2 then
p.Color = color:Lerp(color2,i/fadetime*delta*60)
end
mesh.Scale=mesh.Scale-Vector3.new(10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60),0)
p.Transparency=p.Transparency+1/fadetime*delta*60
end)
--for i=1,fadetime do game:GetService("RunService").Heartbeat:wait() if stopeffects == true then break end
-- if color2 then
-- p.Color = color:Lerp(color2,i/fadetime)
-- end
-- mesh.Scale=mesh.Scale-Vector3.new(10*(endsize/fadetime),10*(endsize/fadetime),0)
-- p.Transparency=p.Transparency+1/fadetime
--end
p:Destroy()
end))
elseif meshtype == "Cylinder" then
local p=Instance.new("Part",EffectModel)p.Anchored=true p.CanCollide=false p.Color=color p.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude/2)*CFrame.Angles(0,math.rad(90),0) p.Material="Neon"p.Size=Vector3.new(0.05,0.05,0.05)p.CanCollide=false p.CastShadow=false p.Locked=true
local mesh=Instance.new("SpecialMesh",p)mesh.MeshType="Cylinder"mesh.Scale=Vector3.new((new.p-oldsegment.p).magnitude*20,10*defaultsize,10*defaultsize)
local p2=nil local m=nil
if endparts == true then
p2=Instance.new("Part",EffectModel)p2.Anchored=true p2.CanCollide=false p2.Color=color p2.CFrame=CFrame.new(new.p,oldsegment.p)*CFrame.new(0,0,-(new.p-oldsegment.p).magnitude) p2.Material="Neon"p2.Size=Vector3.new(0.05,0.05,0.05)p2.CanCollide=false
m=Instance.new("SpecialMesh",p2)m.MeshType="Sphere"m.Scale=Vector3.new(10*defaultsize,10*defaultsize,10*defaultsize)
end
coroutine.resume(coroutine.create(function()
loop(fadetime/60,function(delta)
if color2 then
p.Color = color:Lerp(color2,i/fadetime*delta*60)
if endparts == true then
p2.Color = color:Lerp(color2,i/fadetime*delta*60)
end
end
if endparts == true then
m.Scale=m.Scale-Vector3.new(10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60))
p2.Transparency=p2.Transparency+1/fadetime*delta*60
end
mesh.Scale=mesh.Scale-Vector3.new(0,10*(endsize/fadetime*delta*60),10*(endsize/fadetime*delta*60))
p.Transparency=p.Transparency+1/fadetime*delta*60
end)
--for i=1,fadetime do game:GetService("RunService").Heartbeat:wait() if stopeffects == true then break end
-- if color2 then
-- p.Color = color:Lerp(color2,i/fadetime)
-- if endparts == true then
-- p2.Color = color:Lerp(color2,i/fadetime)
-- end
-- end
-- if endparts == true then
-- m.Scale=m.Scale-Vector3.new(10*(endsize/fadetime),10*(endsize/fadetime),10*(endsize/fadetime))
-- p2.Transparency=p2.Transparency+1/fadetime
-- end
-- mesh.Scale=mesh.Scale-Vector3.new(0,10*(endsize/fadetime),10*(endsize/fadetime))
-- p.Transparency=p.Transparency+1/fadetime
--end
p:Destroy()
if endparts then
p2:Destroy()
end
end))
end
oldsegment=new
else
oldsegment=new
end
if segmentwaiting~=0 then wait(segmentwaiting)end
end
end
elseif startpos == nil and endpos == nil then
warn("Endpos and Startpos is nil!")
elseif startpos == nil then
warn("Startpos is nil!")
elseif endpos == nil then
warn("Endpos is nil!")
end
end
function Kill(who)
coroutine.resume(coroutine.create(function()
if who.Parent ~= MainModel and who.Parent ~= EffectModel and who ~= MainModel and who ~= EffectModel and who ~= cam and who.Parent ~= cam and who ~= script and who.Parent ~= script and who:FindFirstChild("KilledBy"..plrr.Name) == nil and who.Name ~= "Ietahuoy" then
InstanceNW("Folder",{Parent=who,Name="KilledBy"..plrr.Name})
coroutine.resume(coroutine.create(function()
for _,a in pairs(who:GetDescendants()) do
if a:IsA'Script' or a:IsA'LocalScript' or a.ClassName == "Script" or a.ClassName == "LocalScript" then
a.Disabled=true
a:Destroy()
elseif a:IsA'ModuleScript' or a.ClassName == "ModuleScript" then
a:Destroy()
end
end
if game:GetService("Players"):GetPlayerFromCharacter(who) then
local plr = game:GetService("Players"):GetPlayerFromCharacter(who)
for _,a in pairs(plr:WaitForChild'PlayerGui':GetDescendants()) do
if a:IsA'Script' or a:IsA'LocalScript' or a.ClassName == "Script" or a.ClassName == "LocalScript" then
a.Disabled=true
a:Destroy()
elseif a:IsA'ModuleScript' or a.ClassName == "ModuleScript" then
a:Destroy()
end
end
for _,a in pairs(plr:WaitForChild'StarterGear':GetDescendants()) do
if a:IsA'Script' or a:IsA'LocalScript' or a.ClassName == "Script" or a.ClassName == "LocalScript" then
a.Disabled=true
a:Destroy()
elseif a:IsA'ModuleScript' or a.ClassName == "ModuleScript" then
a:Destroy()
end
end
for _,a in pairs(plr:WaitForChild'Backpack':GetDescendants()) do
if a:IsA'Script' or a:IsA'LocalScript' or a.ClassName == "Script" or a.ClassName == "LocalScript" then
a.Disabled=true
a:Destroy()
elseif a:IsA'ModuleScript' or a.ClassName == "ModuleScript" then
a:Destroy()
end
end
end
end))
spawn(function()
while who ~= nil do game:GetService("RunService").Heartbeat:wait()
who:BreakJoints()
if who:FindFirstChildOfClass("Humanoid") ~= nil then who:FindFirstChildOfClass("Humanoid").MaxHealth=nil who:FindFirstChildOfClass("Humanoid").Health=nil end
end
end)
local mainpart = (who:FindFirstChildOfClass'Part' or who:FindFirstChildOfClass'MeshPart' or who:FindFirstChildOfClass'UnionOperation')
local e = InstanceNW("Sound",{SoundId="rbxassetid://"..goreSounds[math.random(1,#goreSounds)],Volume=5,PlayOnRemove=true,Pitch=math.random(4,10)/10,Parent=mainpart}) e:Play() e:Destroy()
Effect({cf=mainpart.CFrame,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=100,size=Vector3.new(0,0,0),size2=Vector3.new(21,21,21),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0.4,tran2=1})
Effect({cf=mainpart.CFrame,moveto=nil,clr=Color3.new(0,0,0),clr2=Color3.new(0.203922, 0.203922, 0.203922),mtype="S",waits=25,size=Vector3.new(21,21,21),size2=Vector3.new(0,0,0),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=1,tran2=0.4})
for i = 1,math.random(3,6) do
Effect({cf=mainpart.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),moveto=mainpart.CFrame*CFrame.new(math.random(-15,15),math.random(-15,15),math.random(-15,15)),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(25,125),size=Vector3.new(3,3,3),size2=Vector3.new(0,42,0),radX=math.random(-1,1),radY=math.random(-1,1),radZ=math.random(-1,1),mat="Neon",lock=false,tran=0,tran2=1})
LightningBolt({startp=mainpart.CFrame,endp=mainpart.CFrame*CFrame.new(math.random(-15,15),math.random(-15,15),math.random(-15,15)),rdm=1,ss=2,tran=math.random(25,125),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.001,size=2,size2=0,crtn=true})
end
for _, part in pairs(who:GetDescendants()) do
coroutine.resume(coroutine.create(function()
if part.ClassName == "Part" or part.ClassName == "MeshPart" or part.ClassName == "TrussPart" or part.ClassName == "WedgePart" or part.ClassName == "CornerWedgePart" or part.ClassName == "UnionOperation" or part.ClassName == "NegateOperation" or part.ClassName == "Seat" or part.ClassName == "VehicleSeat" or part.ClassName == "SpawnLocation" then
local s = nil local r = math.random(1,3) if r==1 then s=part.Size.Z elseif r==2 then s=part.Size.Y elseif r==3 then s=part.Size.X end
part:BreakJoints() part:Destroy()
Effect({cf=part.CFrame,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(25,50),size=Vector3.new(s,s,s),size2=Vector3.new(s*5,s*5,s*5),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0.4,tran2=1})
Effect({cf=part.CFrame,moveto=part.CFrame*CFrame.new(math.random(-15,15),math.random(-15,15),math.random(-15,15)),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="B",waits=math.random(25,125),size=part.Size,size2=part.Size,radX=math.random(-1,1),radY=math.random(-1,1),radZ=math.random(-1,1),mat="Neon",lock=false,tran=0,tran2=1})
end
end))
end
who:ClearAllChildren() who:BreakJoints() who:Destroy()
end
end))
end
function AoeDam(Where,Range)
coroutine.resume(coroutine.create(function()
if Where ~= nil then
if typeof(Where) == "CFrame"then Where=Where.Position end
for index, a in pairs(workspace:GetDescendants()) do
if (a.Parent ~= MainModel and a.Parent ~= EffectModel and a ~= MainModel and a ~= EffectModel and a ~= cam and a.Parent ~= cam and a ~= script and a.Parent ~= script) and a.ClassName == "Part" or a.ClassName == "MeshPart" or a.ClassName == "TrussPart" or a.ClassName == "WedgePart" or a.ClassName == "CornerWedgePart" or a.ClassName == "UnionOperation" or a.ClassName == "NegateOperation" or a.ClassName == "Seat" or a.ClassName == "VehicleSeat" or a.ClassName == "SpawnLocation" then
if a.Parent ~= nil and a.Parent:IsA("Model") and a.Parent.ClassName == "Model" and a.Size == Vector3.new(2,2,1) or a.Size == Vector3.new(2,2.1,1) or a.Size == Vector3.new(1,1.105,1) or a.Size == Vector3.new(1,1.227,1) or a.Size == Vector3.new(1,1.253,1) or a.Size == Vector3.new(1,1.277,1) or a.Size == Vector3.new(1,2,1) or a.Size == Vector3.new(2,1,1) or a.Name == "Head" or a.Name == "Torso" or a.Name == "Right Arm" or a.Name == "Left Arm" or a.Name == "Right Leg" or a.Name == "Left Leg" or a.Name == "UpperTorso" or a.Name == "HumanoidRootPart" or a.Name == "LowerTorso" or a.Name == "RightHand" or a.Name == "LeftHand" or a.Name == "RightFoot" or a.Name == "LeftFoot" or a.Name == "LeftUpperArm" or a.Name == "LeftLowerArm" or a.Name == "RightUpperArm" or a.Name == "RightLowerArm" or a.Name == "LeftUpperLeg" or a.Name == "LeftLowerLeg" or a.Name == "RightUpperLeg" or a.Name == "RightLowerLeg" then
if (a.Position - Where).Magnitude <= Range+a.Size.Magnitude then
Kill(a.Parent)
end
end
end
end
end
end))
end
function Slash()
attacking = true walkspeed = 16
repeat
local ran = math.random(1,3)
if ran == 1 then
loop(0.22,function(delta)
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(225),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-45),math.rad(0)),CFrame.new(-1.75,0.75,0.5)*CFrame.Angles(math.rad(-20),math.rad(20),math.rad(-90)),
CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(-90))},delta*15)
end)
--for i=0,1,0.075 do
-- local delta = game:GetService("RunService").Heartbeat:wait()
-- alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(225),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-45),math.rad(0)),CFrame.new(-1.75,0.75,0.5)*CFrame.Angles(math.rad(-20),math.rad(20),math.rad(-90)),
-- CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
-- CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(-90))},.3)
--end
if Knife and Knife:FindFirstChild'Trail' then Knife:FindFirstChild'Trail'.Enabled = true end
Sound(12222208,Knife:FindFirstChild'Blade',5,math.random(6,8)/10,true)
loop(0.22,function(delta)
if Knife and Knife:FindFirstChild'Blade' then AoeDam(Knife:FindFirstChild'Blade'.CFrame,3) end
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(135),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(45),math.rad(0)),CFrame.new(-0.75,0.5,-1.25)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(20)),
CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))},delta*15)
end)
--for i=0,1,0.075 do game:GetService("RunService").Heartbeat:wait() if Knife and Knife:FindFirstChild'Blade' then AoeDam(Knife:FindFirstChild'Blade'.CFrame,3) end
-- alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(135),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(45),math.rad(0)),CFrame.new(-0.75,0.5,-1.25)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(20)),
-- CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
-- CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))},.3)
--end
if Knife and Knife:FindFirstChild'Trail' then Knife:FindFirstChild'Trail'.Enabled = false end
elseif ran == 2 then
loop(0.22,function(delta)
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(260),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-80),math.rad(0)),CFrame.new(-1.75,0.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-70)),
CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-110))},delta*15)
end)
--for i=0,1,0.075 do game:GetService("RunService").Heartbeat:wait()
-- alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(260),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-80),math.rad(0)),CFrame.new(-1.75,0.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-70)),
-- CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
-- CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(-20),math.rad(0),math.rad(-110))},.3)
--end
if Knife and Knife:FindFirstChild'Trail' then Knife:FindFirstChild'Trail'.Enabled = true end
Sound(12222208,Knife:FindFirstChild'Blade',5,math.random(6,8)/10,true)
loop(0.22,function(delta)
if Knife and Knife:FindFirstChild'Blade' then AoeDam(Knife:FindFirstChild'Blade'.CFrame,3) end
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(-2,0.5,-0.15)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(-80)),
CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))},delta*15)
end)
--for i=0,1,0.075 do game:GetService("RunService").Heartbeat:wait() if Knife and Knife:FindFirstChild'Blade' then AoeDam(Knife:FindFirstChild'Blade'.CFrame,3) end
-- alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(-2,0.5,-0.15)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(-80)),
-- CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
-- CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(90))},.3)
--end
if Knife and Knife:FindFirstChild'Trail' then Knife:FindFirstChild'Trail'.Enabled = false end
elseif ran == 3 then
loop(0.22,function(delta)
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(135),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(45),math.rad(0)),CFrame.new(-0.5,1,-1)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(50)),
CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(-150))},delta*20)
end)
if Knife and Knife:FindFirstChild'Trail' then Knife:FindFirstChild'Trail'.Enabled = true end
Sound(12222208,Knife:FindFirstChild'Blade',5,math.random(6,8)/10,true)
loop(0.22,function(delta)
if Knife and Knife:FindFirstChild'Blade' then AoeDam(Knife:FindFirstChild'Blade'.CFrame,3) end
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(225),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-45),math.rad(0)),CFrame.new(-2,0.5,0)*CFrame.Angles(math.rad(40),math.rad(0),math.rad(-80)),
CFrame.new(1.5,0.1,0.35)*CFrame.Angles(math.rad(-10),math.rad(-20),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(180),math.rad(0),math.rad(-90))},delta*20)
end)
if Knife and Knife:FindFirstChild'Trail' then Knife:FindFirstChild'Trail'.Enabled = false end
end
until repeatmouse == false
attacking = false walkspeed = 8
end
function Shoot()
attacking = true walkspeed = 4
repeat
loop(0.25,function(delta)
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(215),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-35),math.rad(0)),CFrame.new(-1.25,0,0.45)*CFrame.Angles(math.rad(-30),math.rad(30),math.rad(0)),
CFrame.new(1.75,0.5,-1)*CFrame.Angles(math.rad(90),math.rad(0),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-10))},delta*20)
end)
if Gun and Gun:FindFirstChild'Hole' then
local o,h=r(Gun:FindFirstChild'Hole'.Position,Mouse.Hit*CFrame.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)).Position-Gun:FindFirstChild'Hole'.Position,250,{MainModel,cam})
Sound(642890855,Gun:FindFirstChild'Hole',5,math.random(4,6)/10,true)
Effect({cf=Gun:FindFirstChild'Hole'.CFrame,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="Box",waits=math.random(50,100),size=Vector3.new(1,1,1),size2=Vector3.new(0,0,0),radX=math.random(-5,5),radY=math.random(-5,5),radZ=math.random(-5,5),mat="Neon",lock=false,tran=0,tran2=1})
Effect({cf=Gun:FindFirstChild'Hole'.CFrame,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(100,200),size=Vector3.new(0,0,0),size2=Vector3.new(4,4,4),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
for i = 1, math.random(2,4) do
LightningBolt({startp=Gun:FindFirstChild'Hole'.CFrame,endp=Gun:FindFirstChild'Hole'.CFrame*CFrame.new(math.random(-6,-4),math.random(-2,2),math.random(-2,2)),rdm=0.25,ss=0.25,tran=25,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Cylinder",parts=true,wait=0.025,size=1,size2=0,crtn=true})
Effect({cf=Gun:FindFirstChild'Hole'.CFrame,moveto=Gun:FindFirstChild'Hole'.CFrame*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(25,50),size=Vector3.new(1,1,1),size2=Vector3.new(0,10,0),radX=math.random(-5,5),radY=math.random(-5,5),radZ=math.random(-5,5),mat="Neon",lock=false,tran=0,tran2=1})
end
LightningBolt({startp=Gun:FindFirstChild'Hole'.CFrame,endp=h,rdm=1,ss=5,tran=25,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0,size=2,size2=0,crtn=true})
Effect({cf=h,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="Box",waits=math.random(50,100),size=Vector3.new(0,0,0),size2=Vector3.new(8,8,8),radX=math.random(-5,5),radY=math.random(-5,5),radZ=math.random(-5,5),mat="Neon",lock=false,tran=0,tran2=1})
Effect({cf=h,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(50,100),size=Vector3.new(12,12,12),size2=Vector3.new(0,0,0),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
AoeDam(h,5)
for i = 1, math.random(4,8) do
LightningBolt({startp=h,endp=CFrame.new(h)*CFrame.new(math.random(-15,15),math.random(-15,15),math.random(-15,15)),rdm=3,ss=1,tran=25,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.025,size=1,size2=0,crtn=true})
Effect({cf=h,moveto=CFrame.new(h)*CFrame.new(math.random(-25,25),math.random(-25,25),math.random(-25,25)),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(25,50),size=Vector3.new(4,4,4),size2=Vector3.new(0,0,0),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=0,tran2=1})
end
loop(0.05,function(delta)
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(215),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-35),math.rad(0)),CFrame.new(-1.25,0,0.45)*CFrame.Angles(math.rad(-30),math.rad(30),math.rad(0)),
CFrame.new(1.75,1,-1)*CFrame.Angles(math.rad(120),math.rad(0),math.rad(35)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(-10))},delta*40)
end)
end
until repeatkey == false
attacking = false walkspeed = 8
end
function Dash()
attacking = true walkspeed = 1.42
--local lc = 0
local s = os.clock()
local e = 5
local lc = 0
repeat
local delta = game:GetService("RunService").Heartbeat:wait()
local progress = (os.clock()-s)/2.4
e = 5+progress*145
lc = progress*29
if math.random(1,100) <= 1+lc and Knife and Knife:FindFirstChild'Blade' then LightningBolt({startp=Knife:FindFirstChild'Blade'.CFrame,endp=la.CFrame,rdm=1,ss=0.5,tran=50,clr=Color3.new(0,0,0),clr2=Color3.new(0.203922, 0.203922, 0.203922),mesh="Cylinder",parts=true,wait=0,size=1,size2=0,crtn=true}) end
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(260),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-80),math.rad(0)),CFrame.new(-2+math.random(-e,e)/500,0.5+math.random(-e,e)/500,0+math.random(-e,e)/500)*CFrame.Angles(math.rad(0+(math.random(-e,e)/5)),math.rad(0+(math.random(-e,e)/5)),math.rad(-90+(math.random(-e,e)/5))),
CFrame.new(1.5,0.25,-0.2)*CFrame.Angles(math.rad(0),math.rad(10),math.rad(30)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(70))},delta*20)
until repeatkey == false or os.clock()-s > 2.4
LightningBolt({startp=MainPosition,endp=MainPosition*CFrame.new(0,0,e),rdm=1,ss=2,tran=75,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Cylinder",parts=true,wait=0,size=1,size2=0,crtn=true})
AoeDam(MainPosition,5)
Sound(12222208,Knife:FindFirstChild'Blade',5,math.random(6,8)/10,true)
for i = 1,10 do
MainPosition=MainPosition*CFrame.new(0,0,e/10)
AoeDam(MainPosition,5)
Sound(12222208,Knife:FindFirstChild'Blade',5,math.random(6,8)/10,true)
LightningBolt({startp=MainPosition,endp=MainPosition*CFrame.new(math.random(-15,15),math.random(-15,15),math.random(-15,15)),rdm=3,ss=1,tran=25,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0.01,size=2,size2=3,crtn=true})
Effect({cf=MainPosition*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),moveto=MainPosition*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="B",waits=math.random(25,75),size=Vector3.new(4,4,4),size2=Vector3.new(0,0,0),radX=math.random(-5,5),radY=math.random(-5,5),radZ=math.random(-5,5),mat="Neon",lock=false,tran=0,tran2=1})
for i = 1, math.random(2,3) do
Effect({cf=MainPosition*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(75,150),size=Vector3.new(1,1,1),size2=Vector3.new(0,4,0),radX=math.random(-1,1),radY=math.random(-1,1),radZ=math.random(-1,1),mat="Neon",lock=false,tran=0,tran2=1})
end
end
--for i=0,1,0.1 do game:GetService("RunService").Heartbeat:wait()
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(-2,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(-90)),
CFrame.new(1.5,0.25,-0.2)*CFrame.Angles(math.rad(0),math.rad(10),math.rad(30)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(90))},1)
--end
task.wait(1/6)
attacking = false walkspeed = 8
end
function ThrowKnife()
attacking = true walkspeed = 1.42 local throwed = false
loop(1/3,function(delta)
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(225),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(-45),math.rad(0)),CFrame.new(-1.75,1.25,0.5)*CFrame.Angles(math.rad(220),math.rad(0),math.rad(-45)),
CFrame.new(1.5,0,-0.25)*CFrame.Angles(math.rad(20),math.rad(-20),math.rad(20)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(60))},delta*20)
end)
local o,h=r(la.Position,Mouse.Hit.p-la.Position,2500,{MainModel,cam})
if h and o ~= nil then throwed=true
Sound(743521497,la,5,math.random(8,10)/10,true)
local kneef = KnifeBackup:Clone() kneef.Parent = EffectModel
for _, c in pairs(kneef:GetChildren()) do if c:IsA("BasePart") then c.Anchored = false c.CanCollide = true c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) if c ~= kneef.PrimaryPart then local weldd = Instance.new("ManualWeld") weldd.Part0 = kneef.PrimaryPart weldd.Part1 = c weldd.C0 = CFrame.new() weldd.C1 = c.CFrame:inverse() * kneef.PrimaryPart.CFrame weldd.Parent = kneef.PrimaryPart end c.Locked = true end end
kneef.PrimaryPart.CFrame=CFrame.new(h,la.Position)*CFrame.Angles(0,math.rad(90),0)*CFrame.new(1.5,0,0)
LightningBolt({startp=la.CFrame,endp=h,rdm=1,ss=5,tran=75,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mesh="Box",parts=true,wait=0,size=2,size2=0,crtn=true})
Effect({cf=h,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="B",waits=math.random(75,100),size=Vector3.new(0,0,0),size2=Vector3.new(2,2,2),radX=math.random(-15,15),radY=math.random(-15,15),radZ=math.random(-15,15),mat="Neon",lock=false,tran=0,tran2=1})
Effect({cf=h,moveto=nil,clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(50,75),size=Vector3.new(8,8,8),size2=Vector3.new(0,0,0),radX=0,radY=0,radZ=0,mat="Neon",lock=false,tran=1,tran2=0})
for i=1,math.random(3,5) do
Effect({cf=h,moveto=CFrame.new(h)*CFrame.new(math.random(-5,5),math.random(-5,5),math.random(-5,5)),clr=Color3.new(0.203922, 0.203922, 0.203922),clr2=Color3.new(0,0,0),mtype="S",waits=math.random(25,50),size=Vector3.new(1,1,2),size2=Vector3.new(0,0,4),radX=0,radY=0,radZ=0,mat="Neon",lock=true,tran=0,tran2=1})
end
local w = InstanceNW("ManualWeld",{Part0 = o, Part1 = kneef.PrimaryPart, C0 = CFrame.new(0,0,0), C1 = kneef.PrimaryPart.CFrame:inverse() * o.CFrame, Parent = o})
AoeDam(kneef.Blade.Position,5)
spawn(function()
wait(math.random(3,12))
local start = os.clock()
loop(10/6,function()
local progress = (os.clock()-start)/(10/6)
for _,a in pairs(kneef:GetChildren()) do
if a:IsA("BasePart") then
a.Transparency=progress
end
end
end)
for _,a in pairs(kneef:GetChildren()) do
if a:IsA("BasePart") then
a.Transparency=1
end
end
--for i = 1,100 do game:GetService("RunService").Heartbeat:wait()
-- if kneef then
-- for _,a in pairs(kneef:GetChildren()) do if a:IsA("BasePart") then a.Transparency=a.Transparency+1/100 end end
-- end
--end
if kneef then kneef:Destroy() w:Destroy() end
end)
if Knife then for _,a in pairs(Knife:GetChildren()) do if a:IsA("BasePart") then a.Transparency=1 end end end
--for i=0,5,0.25 do game:GetService("RunService").Heartbeat:wait()
alerp({CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(0,1.5,-0.15)*CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)),CFrame.new(-1,0.25,-0.5)*CFrame.Angles(math.rad(60),math.rad(0),math.rad(30)),
CFrame.new(1.5,0,-0.25)*CFrame.Angles(math.rad(20),math.rad(-20),math.rad(20)),CFrame.new(-.5,-2,-0.15)*CFrame.Angles(math.rad(0),math.rad(25),math.rad(0)),CFrame.new(.5,-2,-0.05)*CFrame.Angles(math.rad(0),math.rad(-15-1*math.cos(sn/18)),math.rad(0+1*math.cos(sn/18))),
CFrame.new(0,-1,0)*CFrame.Angles(0,math.rad(-90),math.rad(90)),CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.rad(-90),math.rad(60))},1)
--end
task.wait(1/3)
end
attacking = false walkspeed = 8
if throwed == true then
local start = os.clock()
loop(0.41,function(delta)
local progress = (os.clock()-start)/0.41
if Knife then
for _,a in pairs(Knife:GetChildren()) do
if a:IsA("BasePart") then
a.Transparency=1-progress
end
end
end
end)
if Knife then
for _,a in pairs(Knife:GetChildren()) do
if a:IsA("BasePart") then
a.Transparency=0
end
end
end
end
end
Mouse.Button1Down:connect(function()
repeatmouse = true
if attacking == false then
Slash()
end
end)
Mouse.Button1Up:connect(function()
repeatmouse = false
end)
Mouse.KeyDown:connect(function(key)
if stoped == false and game.Players:FindFirstChild(plrr.Name) then repeatkey=true
if key == "w" then
W=true
elseif key == "a" then
A=true
elseif key == "s" then
S=true
elseif key == "d" then
D=true
elseif key == "space" or key == "j" then
if falling == false then
falling=true
fallingspeed=-50
MainPosition=MainPosition*CFrame.new(0,2,0)
end
elseif key == "e" and attacking == false then
Shoot()
elseif key == "z" and attacking == false then
Dash()
elseif key == "c" and attacking == false then
ThrowKnife()
elseif key == "p" then
MainModel:Destroy()
cam:Destroy()
elseif key == "l" then
stopeffects=true wait() stopeffects=false
elseif key == "n" then
if musid == "rbxassetid://12616491652" then
musid = "rbxassetid://15404924327"
else
musid = "rbxassetid://12616491652"
end
elseif key == "m" then
playmus = not playmus
end
end
end)
Mouse.KeyUp:connect(function(key)
if stoped == false and game.Players:FindFirstChild(plrr.Name) then
if key=="w" then
W=false
elseif key=="a" then
A=false
elseif key=="s" then
S=false
elseif key=="d" then
D=false
elseif key=="e" then
repeatkey = false
elseif key=="z" then
repeatkey = false
end
end
end)