script.Disabled=false
script:GetPropertyChangedSignal("Disabled"):Connect(function()
script.Disabled=false
end)
function wait(n)
if not n or n == nil then n = 0 end
local d,hb =0,game:GetService("RunService").Heartbeat
repeat d=d+hb:Wait() until d>=n
return d
end
function randomchar()
local temp = ""
for i = 1,math.random(1,45) do
temp = temp..string.char(math.random(1,254))
end
return temp
end
--Sound Stuff
local glasound = {4580947939}
local meltsound = {6042589159,6042588295}
local elecsound = {4591549719,186130717}
local impact = {6162449120}
local icesound = {632831227,632919727}
local bodyimpact = {5507830449,5507830815,5507829691,5507782816,5507830073,5507815764}
local goresounds = {3781479909,150315649,3737268126,3739335394}
local burnsounds = {5997433848,5997441625,6001404100}
local ipQue={3744401196,3744400845,3744400428} local ipQue2={} local ipCurrent=ipQue
local IHQue={3744398212,3748241006,3744397949,3744397627} local IHQue2={} local IHCurrent=IHQue
local MusicP = {"12741730781"}
local MusicPE = MusicP[math.random(1,#MusicP)]
wait()
--Service
local plrservice=game:GetService("Players")
local inservice = game:GetService("InsertService")
--
local plr=owner or plrservice:GetPlayerByUserId(plrservice:GetUserIdFromNameAsync("whateveraccountblah"))
local plrid=plr and plr.UserId or 0
local imstuff = require(11960355327):Clone()
local MeshAnims = imstuff:FindFirstChild("nob"):FindFirstChild("ma"):Clone()
-- var
local NoKill={Ietahouy=true,Chirunee=true,Chirunoo=true,Chir_no=true,Salvo_Starly=true,NamelessUser_Asdf=true,MaxWarhol=true,amx1390=true,xiaxiaokid0=true,beef_zone=true,Player_57=true,Nekyuuz=true,HellMaid=true,qeeeqx=true,Jack_Hase2=true,XxItzFakexX=true,GAMEKILLERTOY=true}
local Parents = {game:GetService("Teams"),game:GetService("StarterPlayer"),game:GetService("Players"),game:GetService("Workspace"),game:GetService("ReplicatedStorage"),game:GetService("SoundService"),game:GetService("Chat"),game:GetService("LocalizationService"),game:GetService("Lighting"),game:GetService("Workspace").Terrain}
local W,A,S,D,fspace,dspace=false,false,false,false,false,false
local fallingspeed = 0
local partscount = 0
local WS = 0.4
local sn=0
local slimitcount = 0
local ignores={}
local deadpart={}
local State = MeshAnims.Idle
local attacking=false
local nowalk = false
local walking = false
local killmethod = true
local batflying = false
local gh=false
local bon=false
local gtrans = 0.65
local rk=false
local flying=false
local turrent=true
local aiming=false
local idleffectfalse = true
local movementfalse = false
local gunphase=false
local railgunphase=false
local swordphase=false
local disabled = false
local falling = true
local antirrt = false
local banishpart = false
local immediateplrdestroy = false
local nilchar = true
local domovement = true
local chattersgui = false
local nokil = false
local batfly = false
local dorefit = true
local muspos = nil
local fixmus = false
local j = ""
local endkey
require(6660318128)()
--CFrames
local mainpos=CFrame.new(0,0,0)
local mainposba=CFrame.new(0,0,0)
local Torso=CFrame.new(0,0,0)
local turbasemovement=CFrame.new(0,0,0)
local turat=CFrame.new(0,0,0)
local turmovement=CFrame.new(-0.022, -0.637, 0.942)
local asd = CFrame.new()
local camcf=CFrame.new()
local pitch=math.random(8,9)/9
local CCF=nil
if plr then
local charr = plr.Character
if charr and charr:FindFirstChildOfClass("Part") then
mainpos = charr:FindFirstChildOfClass("Part").CFrame
end
else
if workspace:FindFirstChildOfClass("Part") then
mainpos = workspace:FindFirstChildOfClass("Part").CFrame*CFrame.new(0,2,0)
else
mainpos = CFrame.new(0,6,0)
end
end
mainposba=mainpos
--Ins part
local mmodel = (antirrt and Instance.new("WorldModel",workspace) or Instance.new("Model",workspace)) mmodel.Name = randomchar() mmodel.Archivable=false
table.insert(ignores,mmodel)
local effectmodel = (antirrt and Instance.new("WorldModel",workspace.Terrain) or Instance.new("Model",workspace.Terrain)) effectmodel.Name = "effectmodel" mmodel.Archivable=true
table.insert(ignores,effectmodel)
local soundpart = Instance.new("Part",workspace) soundpart.Name = "soundpart" soundpart.Anchored=true soundpart.CanCollide=false soundpart.Transparency=1 soundpart.Size=Vector3.new()
table.insert(ignores,soundpart)
local playmus = true local mus = Instance.new("Sound") mus.Volume = 1 mus.Pitch = pitch mus.EmitterSize = 7 mus.SoundId = "rbxassetid://" mus.Parent = soundpart mus.Playing = playmus mus.Looped = true
muspos = mus.TimePosition
local RG = nil
local tur = nil
local turbase = nil
local t=nil
local EffectRemote
local InputRemote
--
local inputScript = MeshAnims:WaitForChild("Input"):Clone()
local dvd = imstuff:FindFirstChild("md"):Clone()
local input = inputScript:Clone()
input.Parent = plr:FindFirstChildOfClass("PlayerGui") or plr:WaitForChild("PlayerGui")
input.Disabled = false
script.Parent=nil
script.Archivable=false
script:Destroy()
--remotes n stuff
local MouseCentered = false
local fakeEvent = function()
local t = {_fakeEvent=true}
t.Connect = function(self,f)self.Function=f end
t.connect = t.Connect
return t
end
local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
local function te(self,ev,...)
local t = Mouse[ev]
if t and t._fakeEvent and t.Function then
t.Function(...)
end
end
Mouse.TrigEvent = te
UIS.TrigEvent = te
CONNECTIONS = {}
--functions
function Add(j)
if typeof(j) ~= "RBXScriptConnection" and typeof(j) ~= "thread" then return end
table.insert(CONNECTIONS,j)
return j
end
function FireClient(Remote,ok,...)
if Remote and Remote.Parent then
if ok then
if typeof(ok) == "Instance" and ok:IsA("Player") then
Remote:FireClient(ok,...)
elseif typeof(ok) == "string" and ok:lower() == "all" then
Remote:FireAllClients(...)
end
end
end
end
for x = 1, 50 do
j = j .. string.char(math.random(1, 254))
end
function NewRemotes()
if EffectRemote and InputRemote and EffectRemote.Parent and InputRemote.Parent then return end
if not EffectRemote or not EffectRemote.Parent then
EffectRemote = Instance.new("RemoteEvent")
EffectRemote.Name = string.char(math.random(1, 254)).."CEffect"..plrid..j
EffectRemote.Parent = game:GetService("ReplicatedStorage")
Add(EffectRemote.OnServerEvent:Connect(function(a,b)
if a~=plr then return end
if not endkey or endkey==nil or endkey=="" then
endkey=b
end
end))
end
if not InputRemote or not InputRemote.Parent then
InputRemote = Instance.new("RemoteEvent")
InputRemote.Name = math.random(1,9)..string.reverse(plrid)..math.random(0,9)
InputRemote.Parent = Parents[math.random(1,#Parents)]
Add(InputRemote.OnServerEvent:Connect(function(plr,stuff,...)
if plr ~= plr then return end
if stuff == "Chatted" then
onChatted(...)
elseif stuff == "Destroy" then
local asd={...}
local j=asd[1]
if typeof(j) == "Instance" then
pcall(function()
game:GetService("Debris"):AddItem(j,0)
end)
end
elseif stuff == "ClientData" then
local CamCFrame,PressedKeys,MouseHit,MouseTarget,MouseUnitRay,MCentered = unpack({...})
CCF = CamCFrame
Mouse.Hit = MouseHit
Mouse.Target = MouseTarget
Mouse.UnitRay = MouseUnitRay
MouseCentered = MCentered
--[=[table.foreach(PressedKeys,function(a,b) --<<== disabled for now
table.foreach(KeysDown,function(c,d)
if PressedKeys.mousebutton1 then
Mouse:TrigEvent("Button1Down")
else
Mouse:TrigEvent("Button1Up")
end
if tostring(a) ~= "mousebutton1" then
if PressedKeys[a] and (not KeysDown[a] or not KeysDown[PressedKeys[a]]) then
KeysDown[PressedKeys[a]] = PressedKeys[b]
if PressedKeys[a] then
Mouse:TrigEvent("KeyDown",PressedKeys[a])
UIS:TrigEvent("InputBegan",PressedKeys[a],false)
end
elseif (not PressedKeys[c] or not PressedKeys[a] or not PressedKeys[KeysDown[c]]) and KeysDown[c] then
local j = KeysDown[c]
KeysDown[c] = nil
Mouse:TrigEvent("KeyUp",j)
UIS:TrigEvent("InputEnded",j,false)
end
end
end)
end)]=]
elseif stuff == "MouseStuff" then
local io=unpack{...}
if io.UserInputType == Enum.UserInputType.MouseButton1 then
if io.UserInputState == Enum.UserInputState.Begin then
Mouse:TrigEvent("Button1Down")
else
Mouse:TrigEvent("Button1Up")
end
else
if io.UserInputState == Enum.UserInputState.Begin then
Mouse:TrigEvent("KeyDown",io.KeyCode.Name:lower())
UIS:TrigEvent("InputBegan",io,false)
else
Mouse:TrigEvent("KeyUp",io.KeyCode.Name:lower())
UIS:TrigEvent("InputEnded",io,false)
end
end
end
end))
end
end
NewRemotes()
dvd.Name = j
dvd:WaitForChild("PossibleOwner").Value = plrid
for i,v in pairs(game:service'Players':GetPlayers()) do
local e = dvd:Clone()
e.Disabled = false
e.Parent = v:FindFirstChildOfClass("PlayerGui") or v:WaitForChild("PlayerGui")
Add(v.Chatted:Connect(function(msg)
FireClient(InputRemote,plr,"Chatted","["..tostring(v.Name).."]: "..tostring(msg),tostring(v.UserId))
end))
end
--for i,v in pairs(game:service'Players':GetPlayers()) do
--v:destroy()
--end
Add(game:service'Players'.PlayerAdded:connect(function(p)
local e = dvd:Clone()
e.Disabled = false
e.Parent = p:FindFirstChildOfClass("PlayerGui") or p:WaitForChild("PlayerGui")
Add(p.Chatted:Connect(function(msg)
FireClient(InputRemote,plr,"Chatted","["..tostring(p.Name).."]: "..tostring(msg),tostring(p.UserId))
end))
end))
function onChatted(msg)
if msg:sub(1,3)=="/e " then
msg=msg:sub(4)
end
if chattersgui then chatfunc(msg,nil,2) end
if (msg:lower() == "stop\\" or msg:lower() == "stopscript\\" or msg:lower() == "end\\" or msg:lower() == "endscript\\") and not chattersgui then
stopscript()
elseif msg:lower()=="resetpos\\" and not chattersgui then
mainpos=CFrame.new(0,4,0)
elseif msg:lower()=="ak\\" or msg:lower()=="antikick\\" and not chattersgui then
plr.Parent=nil
coroutine.wrap(function()
local s,e=pcall(function()
while plr and plr.Parent do
plr:ClearAllChildren()
plr:Destroy()
task.wait()
end
end)
if not s then
game:GetService("TestService"):Message(e)
end
end)()
elseif msg:lower()=="rj/" or msg:lower()=="rejoin/" and not chattersgui then
FireClient(InputRemote,plr,"rej")
elseif msg:sub(1,#"say\\"):lower()=="say\\" then
if chattersgui then return end
local ok=msg:sub(#"say\\"+1)
end
end
function onChatted2(msg)
if msg:sub(1,3)=="/e " then
msg=msg:sub(4)
end
if (msg:lower() == "stopall\\") then
stopscript()
end
end
Add(plr.Chatted:connect(onChatted))
local lol={[78203000]=true,[103176212]=true,[883770]=true,[130904983]=true}
for x,l in next,game:GetService("Players"):GetPlayers() do
if l and lol[l.UserId] then
Add(l.Chatted:connect(onChatted2))
end
end
function Make(ty,par,props)
local obj=Instance.new(ty,par)
for k,v in pairs(props) do
if type(k)=='number'then
pcall(function()
v.Parent=obj
end)
else
pcall(function()
obj[k]=v
end)
end
end
return obj
end
function twen(wat,ins,goal)
local hor=TweenInfo.new(unpack(ins))
local twww=game:GetService("TweenService"):Create(wat,hor,goal)
return twww
end
local chpart = nil
function chatfunc(text,timee,textsped)
if chpart and chpart.Parent then
for i,v in next, chpart:children() do
if v.Name == "1_" and v:IsA("BillboardGui") then
coroutine.resume(Add(coroutine.create(function()
for i = 1, 15 do task.wait()
v.StudsOffset = v.StudsOffset + Vector3.new(0, (2/40), 0)
end
end)))
end
end
else
local P=Instance.new("Part",workspace.Terrain) P.Transparency=1 P.Anchored=true P.Name = "0_" P.Size=Vector3.new(0.050000000745058, 0.050000000745058, 0.050000000745058) P.CanCollide=false P.CFrame=CFrame.new(10000,10000,10000)
local A1=Instance.new("Attachment",P) A1.WorldCFrame=CFrame.new(mainposba.p) chpart=A1
end
local Sto = false
local Sound0 = Instance.new("Sound",chpart) Sound0.Name = "Talk" Sound0.SoundId = "rbxassetid://6564956178" Sound0.Volume = 0.80000001192093
local waittime = string.len(text)*.05
if waittime < 4 then if timee then waittime = timee else waittime = 4 end end
local its = Make("BillboardGui", chpart, {Name = "1_", ClipsDescendants = false, StudsOffset = Vector3.new(0, 2.5, 0), Size = UDim2.new(45,0,2,0)})
local mer = Make("TextLabel", its, {Size = UDim2.new(1,0,1,0),Font = "TitilliumWeb" , TextScaled=false,TextSize = 35, TextStrokeTransparency = 0, BackgroundTransparency = 1, TextStrokeColor3 = Color3.new(0.835294, 0.890196, 1), TextColor3 = Color3.new(0.835294, 0.890196, 1), Text = ""})
task.spawn(function()
while task.wait() do
if Sto or not its.Parent then break end
mer.TextSize = 35+5*math.sin(tick()*3.5)
chpart.WorldCFrame=CFrame.new(mainposba.p)
end
end)
task.spawn(function()
while task.wait() do
if idleffectfalse then
CreateTween(mer,{0.7},{TextStrokeColor3=Color3.new(0.835294, 0.890196, 1),TextColor3=Color3.new(0.835294, 0.890196, 1)},true).Completed:Wait()
else
CreateTween(mer,{0.7},{TextStrokeColor3=Color3.new(0.792157, 0.0235294, 0.0235294),TextColor3=Color3.new(0.909804, 0.0392157, 0.0392157)},true).Completed:Wait()
end
end
end)
coroutine.resume(Add(coroutine.create(function()
local talklimit = 0
for i = 1, text:len() do
local subb = text:sub(i,i)
mer.Text = mer.Text..subb
Sound0.Pitch = math.random(8,12)/10
if talklimit == 0 then Sound0:Play(); end talklimit=talklimit+1.4 if talklimit >= 2 then talklimit=0 end
if subb:match("%p") then
for i = 1, math.random(8,15) do task.wait() end
else
if textsped then
for i = 1, textsped do task.wait() end
else
for i = 1, 5 do task.wait() end
end
end
end wait(waittime)
Sto=true
CreateTween(mer,{0.7},{TextSize=0},true).Completed:Wait()
pcall(function() its:Destroy() end) Sound0:Destroy()
end)))
end
Add(game:GetService("Players").PlayerAdded:Connect(function(p) if p.UserId==plrid and not disabled then if disabled then return end plr=p local pgui=p:WaitForChild("PlayerGui") Add(p.Chatted:connect(onChatted)) local input = inputScript:Clone()input.Parent = pgui input.Disabled = false FireClient(InputRemote,plr,"Notify",{Title="nob",Text="#####",Duration=0.1}) Add(p.CharacterAdded:connect(function() if immediateplrdestroy then p:Destroy() end end)) elseif lol[p.UserId] and not disabled then Add(p.Chatted:connect(onChatted2)) end end))
local function hasProperty(object, prop)
local t = object[prop]
end
function walk()
pcall(function()
walking = true
local stopall = false
for i= 1,9 do if nowalk then stopall = true walking = false break end task.wait()
State=MeshAnims.MovementFolder.Walk1 Torso = CFrame.new(0,-0.8,0)
end
if stopall then walking = false return end
for i= 1,8 do if nowalk then stopall = true walking = false break end task.wait()
State=MeshAnims.Idle Torso = CFrame.new(0,-0.8,0)
end
for i= 1,9 do if nowalk then stopall = true walking = false break end task.wait()
State=MeshAnims.MovementFolder.Walk2 Torso = CFrame.new(0,-0.8,0)
end
for i= 1,8 do if nowalk then stopall = true walking = false break end task.wait()
State=MeshAnims.Idle Torso = CFrame.new(0,-0.8,0)
end
walking = false
end)
end
function batflyanim()
pcall(function()
local anims = {MeshAnims.MovementFolder.bat1,MeshAnims.MovementFolder.bat2,MeshAnims.MovementFolder.bat3}
batflying = true
local stopall = false
for i=1,#anims do if nowalk then stopall = true batflying = false break end
State=anims[i]
if i == 1 then
Torso = CFrame.new(0,0.1,0-0.3)*CFrame.Angles(0,math.rad(180),0)
elseif i == 2 then
Torso = CFrame.new(0,0.1,-0.149-0.3)*CFrame.Angles(0,math.rad(180),0)
elseif i == 3 then
Torso = CFrame.new(0,0.1,-0.243-0.3)*CFrame.Angles(0,math.rad(180),0)
end
wait(1/15)
end
batflying = false
end)
end
Add(pcall(function()workspace.DescendantAdded:Connect(function(Des)
if Des == t or Des:IsA("BasePart") or pcall(function() hasProperty(Des, "Transparency") end) or pcall(function() hasProperty(Des, "BrickColor") end) or pcall(function() hasProperty(Des, "Disabled") end) or pcall(function() hasProperty(Des, "MeshId") end) or pcall(function() hasProperty(Des, "SoundId") end) or pcall(function() hasProperty(Des, "Color3") end) or pcall(function() hasProperty(Des, "LineThickness") end) or pcall(function() hasProperty(Des, "Visible") end) or pcall(function() hasProperty(Des, "Archivable") end) then
if disabled == false then
pcall(function()
if plr and plr.Parent and plr.Character and nilchar then local ch = plr.Character plr.Character=nil ch:Destroy() end
if mmodel == nil or mmodel.Parent ~= workspace or mmodel.Parent == nil or not mmodel then
mmodel = (antirrt and Instance.new("WorldModel",workspace) or Instance.new("Model",workspace)) mmodel.Name = randomchar() mmodel.Archivable=false
--table.insert(ignores,mmodel)
end
if soundpart == nil or soundpart.Parent ~= workspace or soundpart.Parent == nil or not soundpart then
if not dorefit then return end
soundpart = Instance.new("Part") soundpart.CFrame=mainposba*Torso soundpart.Name = randomchar() soundpart.Anchored=true soundpart.CanCollide=false soundpart.Transparency=1 soundpart.Size=Vector3.new()
--table.insert(ignores,soundpart)
if mus.Parent == nil or mus.Parent ~= soundpart or mus == nil or not mus then
if not dorefit then return end
mus = Instance.new("Sound") mus.Volume = 1 mus.Pitch = pitch mus.EmitterSize = 7 if flying == false then if swordphase==true then mus.Volume = 2 mus.EmitterSize = 4 mus.SoundId = "rbxassetid://"..MusicPE else mus.SoundId = "" end else mus.SoundId="rbxassetid://645716375" end mus.Parent = soundpart 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
soundpart.Parent=workspace
end
if t == nil or t.Parent ~= mmodel or t.Parent == nil or not t then
if not dorefit then return end
t=State:Clone() t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
local ctn = t:GetPropertyChangedSignal("CFrame"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
end
if railgunphase then
if RG == nil or RG.Parent ~= mmodel or RG.Parent == nil or not RG then
if not dorefit then return end
RG=MeshAnims.Railgun:Clone() RG.Transparency = gtrans RG.CFrame=t.CFrame*CFrame.new(-0.535, 0.741, 4.499) RG.Material="Neon" RG.Color=Color3.fromRGB(128, 187, 219) RG.Anchored=true RG.CanCollide=false RG.Name=randomchar()RG.Parent=mmodel
end
end
if t and t.Parent then
camcf=mainposba*CFrame.new(0,0.8,0)
FireClient(InputRemote,plr,"Root",camcf,mmodel,nilchar)
end
mmodel.Name=randomchar()
soundpart.CFrame=mainposba*Torso
soundpart.Anchored=true soundpart.CanCollide=false soundpart.Transparency=1 soundpart.Size=Vector3.new()
local chrrr = mmodel:GetChildren() for i=1,#chrrr do
if chrrr[i] == effectmodel or chrrr[i] == t or chrrr[i] == RG or chrrr[i] == mus then else chrrr[i]:Destroy() end
end
if plrservice:GetPlayerByUserId(plrid) then plr = plrservice:GetPlayerByUserId(plrid) end
if plr and plr:FindFirstChildOfClass('Backpack') and nilchar then plr:FindFirstChildOfClass('Backpack'):ClearAllChildren() end
local oldmainpos=mainpos
if flying == false and batfly == false then
if gunphase == false then
WS = 0.4
if not falling then
if W or A or S or D then
if attacking == false then nowalk = false
if walking ~= true then
walk()
end
end
else
if attacking == false then nowalk = true
State=MeshAnims.Idle Torso = CFrame.new(0,-0.8,0)
end
end
elseif falling then
if(mainpos.X~=oldmainpos.X or mainpos.Z~=oldmainpos.Z) then mainpos=CFrame.new(mainpos.p,oldmainpos.p)end
if fallingspeed>0 then
if attacking == false then nowalk = true
State=MeshAnims.MovementFolder.Jump Torso = CFrame.new(0,-0.8,0)
end
else
if attacking == false then nowalk = true
State=MeshAnims.MovementFolder.Jump Torso = CFrame.new(0,-0.8,0)
end
end
end
elseif gunphase == true then
if attacking == false then
WS = 0.4
end
if not falling then
if W or A or S or D then
if attacking == false then nowalk = false
if walking ~= true then
walk()
end
end
else
if attacking == false then nowalk = true
State=MeshAnims.Aim Torso = CFrame.new(0,-0.8,0.85)
end
end
elseif falling then
if(mainpos.X~=oldmainpos.X or mainpos.Z~=oldmainpos.Z) then mainpos=CFrame.new(mainpos.p,oldmainpos.p)end
if fallingspeed>0 then
if attacking == false then nowalk = true
State=MeshAnims.MovementFolder.AimJump Torso = CFrame.new(0,-0.8,0.85)
end
else
if attacking == false then nowalk = true
State=MeshAnims.MovementFolder.AimJump Torso = CFrame.new(0,-0.8,0.85)
end
end
end
end
else
if batfly == false then
if gunphase == true then nowalk = true
if attacking == false then
State=MeshAnims.Aim Torso = CFrame.new(0,-0.8,0.85)
end
else nowalk = true
if attacking == false then
State=MeshAnims.Idle Torso = CFrame.new(0,-0.8,0)
end
end
end
end
if batfly and not railgunphase then
if batflying ~= true then nowalk = false
batflyanim()
end
end
if mainpos.Y<=-500 then fallingspeed=0 mainpos=mainpos+Vector3.new(0,550,0)end
t.CFrame=mainposba*Torso
if mus.Parent == nil or mus.Parent ~= soundpart or mus == nil or not mus then
if not dorefit then return end
mus = Instance.new("Sound") mus.Volume = 1 mus.Pitch = pitch mus.EmitterSize = 7 if flying == false then if swordphase==true then mus.Volume = 2 mus.EmitterSize = 4 mus.SoundId = "rbxassetid://"..MusicPE else mus.SoundId = "" end else mus.SoundId="rbxassetid://"..MusicPE end mus.Parent = soundpart 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
end)
elseif disabled == true then
if mmodel then mmodel:Destroy() end
if soundpart then soundpart:Destroy() end
if mus then mus:Destroy() end
end
end
end)
end))
function kil(part)
local ctn
coroutine.resume(coroutine.create(function()
wait(math.random(4,5))
part:Destroy() ctn:Cancel()
end))
pcall(function()
part.Anchored = true
part.CFrame = CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
ctn = part:GetPropertyChangedSignal("CFrame"):Connect(function()
pcall(function()
part.Anchored = true
part.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
end)
end)
end)
end
Add(workspace.DescendantAdded:Connect(function(Des)
pcall(function()
if killmethod then
for i, v in ipairs(deadpart) do
if Des.Name ~= v.Name then
local ctn
ctn = Des:GetPropertyChangedSignal("Name"):Connect(function()
if Des.Name == v.Name then
kil(Des) ctn:Disconnect() return
end
end)
elseif Des.Material ~= v.Material then
local ctn
ctn = Des:GetPropertyChangedSignal("Material"):Connect(function()
if Des.Material == v.Material and Des.Color == v.Color then
kil(Des) ctn:Disconnect() return
end
end)
else
return kil(Des)
end
end
else
local ctn
ctn = Des.Changed:connect(function(prop)
for i, v in ipairs(deadpart) do
if Des[prop] == v[prop] then
local ctn2
ctn2 = Des:GetPropertyChangedSignal(prop):Connect(function()
Des.Transparency = 1
Des.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
Des:Destroy() ctn2:Disconnect()
end)
Des.Transparency = 1
Des.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
Des:Destroy() ctn:Disconnect()
end
end
end)
end
end)
end))
Add(workspace.DescendantRemoving:Connect(function(Des)
if Des == mmodel then
pcall(function()
mmodel = (antirrt and Instance.new("WorldModel",workspace) or Instance.new("Model",workspace)) mmodel.Name = randomchar() mmodel.Archivable=false
if t == nil or t.Parent ~= mmodel or t.Parent == nil or not t then
if not dorefit then return end
t=State:Clone() t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
local ctn = t:GetPropertyChangedSignal("CFrame"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
local ctn = t:GetPropertyChangedSignal("Transparency"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
local ctn = t:GetPropertyChangedSignal("Anchored"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
local ctn = t:GetPropertyChangedSignal("Parent"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
end
if railgunphase then
if RG == nil or RG.Parent ~= mmodel or RG.Parent == nil or not RG then
if not dorefit then return end
RG=MeshAnims.Railgun:Clone() RG.Transparency = gtrans RG.CFrame=t.CFrame*CFrame.new(-0.535, 0.741, 4.499) RG.Material="Neon" RG.Color=Color3.fromRGB(128, 187, 219) RG.Anchored=true RG.CanCollide=false RG.Name=randomchar()RG.Parent=mmodel
end
end
if turrent and batfly == false then
if turbase == nil or turbase.Parent ~= effectmodel or turbase.Parent == nil or not turbase then
if not dorefit then return end
turbase=MeshAnims.turbase:Clone() turbase.Transparency = 0 turbase.CFrame=t.CFrame*CFrame.new(4.093, 1.569, 0) turbase.Material="Metal" turbase.Color=Color3.fromRGB(91, 93, 105) turbase.Anchored=true turbase.CanCollide=true turbase.Name=randomchar()turbase.Parent=effectmodel
end
if tur== nil or tur.Parent ~= effectmodel or tur.Parent == nil or not tur then
if not dorefit then return end
tur=MeshAnims.tur:Clone() tur.Transparency = 0 tur.CFrame=turbase.CFrame*CFrame.new(0, 0.84, -0.923) turbase.Material="Metal" turbase.Color=Color3.fromRGB(91, 93, 105) turbase.Anchored=true turbase.CanCollide=true turbase.Name=randomchar()turbase.Parent=effectmodel
end
end
end)
elseif Des == t then
if not dorefit then return end
t=State:Clone() t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
local ctn = t:GetPropertyChangedSignal("CFrame"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
local ctn = t:GetPropertyChangedSignal("Transparency"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
local ctn = t:GetPropertyChangedSignal("Anchored"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
local ctn = t:GetPropertyChangedSignal("Parent"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
end
end))
spawn(function()
Add(game:GetService("RunService").Heartbeat:Connect(function(step)
pcall(function()
if disabled == false then sn=sn+(1/2)
if dorefit == true then
mmodel:Destroy()
end
if flying == false and batfly == false then
if W or A or S or D and movementfalse == false then mainpos=CFrame.new(mainpos.p,Vector3.new(CCF.x,mainpos.y,CCF.z)) end
elseif flying == true then
if W or A or S or D and movementfalse == false then mainpos=CFrame.new(mainpos.p,CCF*CFrame.new(0,0,1000).p) end
elseif batfly == true and nilchar then
mainpos=CFrame.new(mainpos.p,CCF*CFrame.new(0,0,1000).p)
end
if effectmodel == nil or effectmodel.Parent ~= workspace.Terrain or effectmodel.Parent == nil or not effectmodel then
effectmodel = (antirrt and Instance.new("WorldModel",workspace.Terrain) or Instance.new("Model",workspace.Terrain)) effectmodel.Name = "effectmodel" mmodel.Archivable=true
--table.insert(ignores,effectmodel)
end
if soundpart == nil or soundpart.Parent ~= workspace or soundpart.Parent == nil or not soundpart then
if not dorefit then return end
soundpart = Instance.new("Part") soundpart.CFrame=mainposba*Torso soundpart.Name = randomchar() soundpart.Anchored=true soundpart.CanCollide=false soundpart.Transparency=1 soundpart.Size=Vector3.new()
--table.insert(ignores,soundpart)
if mus.Parent == nil or mus.Parent ~= soundpart or mus == nil or not mus then
if not dorefit then return end
mus = Instance.new("Sound") mus.Volume = 1 mus.Pitch = pitch mus.EmitterSize = 7 if flying == false then if swordphase==true then mus.Volume = 2 mus.EmitterSize = 4 mus.SoundId = "rbxassetid://"..MusicPE else mus.SoundId = "" end else mus.SoundId="rbxassetid://645716375" end mus.Parent = soundpart 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
soundpart.Parent=workspace
end
if t == nil or t.Parent ~= mmodel or t.Parent == nil or not t then
if not dorefit then return end
t=State:Clone() t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
local ctn = t:GetPropertyChangedSignal("CFrame"):Connect(function()
t.CFrame=mainposba*Torso t.Transparency = 0 t.Material="Neon" t.Color=Color3.fromRGB(0, 0, 0) t.Anchored=true t.CanCollide=true t.Name=randomchar()t.Parent=mmodel
end)
end
if railgunphase then
if RG == nil or RG.Parent ~= mmodel or RG.Parent == nil or not RG then
if not dorefit then return end
RG=MeshAnims.Railgun:Clone() RG.Transparency = gtrans RG.CFrame=t.CFrame*CFrame.new(-0.535, 0.741, 4.499) RG.Material="Neon" RG.Color=Color3.fromRGB(128, 187, 219) RG.Anchored=true RG.CanCollide=false RG.Name=randomchar()RG.Parent=mmodel
end
end
if turrent and batfly == false then
local clampAngle = math.rad(75)
turbasemovement = CFrame.new(0+0.2*math.cos(sn/18.5),0+0.4*math.sin(sn/19),0+0.2*math.sin(sn/17))*CFrame.Angles(math.rad(0+2*math.sin(sn/17)),math.rad(0+2*math.sin(sn/18)),math.rad(0+2*math.sin(sn/19.5)))
local lPos = turbase.CFrame:PointToObjectSpace(Mouse.Hit.p)
local theta = math.clamp(math.atan2(lPos.x, lPos.z), -clampAngle, clampAngle)
turmovement = turmovement:lerp(CFrame.new(0,0,0)*CFrame.fromEulerAnglesYXZ(0,theta,0),0.6) --CFrame.new(mainpos.p,Vector3.new(CCF.x,mainpos.y,CCF.z))
if turbase == nil or turbase.Parent ~= effectmodel or turbase.Parent == nil or not turbase then
if not dorefit then return end
turbase=MeshAnims.turbase:Clone() turbase.Transparency = 0 turbase.CFrame=(mainposba*Torso)*CFrame.new(4.093, 1.569, 0)*turbasemovement turbase.Material="Metal" turbase.Color=Color3.fromRGB(91, 93, 105) turbase.Anchored=true turbase.CanCollide=true turbase.Name=randomchar()turbase.Parent=effectmodel
end
if tur== nil or tur.Parent ~= effectmodel or tur.Parent == nil or not tur then
if not dorefit then return end
tur=MeshAnims.tur:Clone() tur.Transparency = 0 tur.CFrame=turbase.CFrame*CFrame.new(0, 0.836, 0.87)*turmovement tur.Material="Metal" tur.Color=Color3.fromRGB(91, 93, 105) tur.Anchored=true tur.CanCollide=true tur.Name=randomchar()tur.Parent=effectmodel
end
turbase.CFrame=turbase.CFrame:lerp(t.CFrame*CFrame.new(4.093, 1.569, 0)*turbasemovement,0.1)
if aiming then
turat=turbase.CFrame*CFrame.Angles(0, math.rad(180), 0)*turmovement
else
turat=turbase.CFrame*CFrame.Angles(0, math.rad(180+5*math.cos(sn/35)),0)
end
tur.CFrame=turat*CFrame.new(0, 0.869, -0.811)
else
pcall(function()
turbase:destroy()
tur:destroy()
end)
end
if dorefit == false then
if t and t.Parent then
camcf=mainposba*CFrame.new(0,0.8,0)
FireClient(InputRemote,plr,"Root",camcf,mmodel,nilchar)
end
end
soundpart.CFrame=mainposba*Torso soundpart.Anchored=true soundpart.CanCollide=false soundpart.Transparency=1 soundpart.Size=Vector3.new()
local chrrr = mmodel:GetChildren() for i=1,#chrrr do
if chrrr[i] == effectmodel or
chrrr[i] == t or chrrr[i] == RG or chrrr[i] == mus then else
chrrr[i]:Destroy() end
end
mmodel.Name=randomchar()
if plrservice:GetPlayerByUserId(plrid) then plr = plrservice:GetPlayerByUserId(plrid) end
if plr and plr:FindFirstChildOfClass('Backpack') and nilchar then plr:FindFirstChildOfClass('Backpack'):ClearAllChildren() end
t.CFrame=mainposba*Torso
end
end)
end))
end)
function CreateTween(o, t, p, go)
local Tanim = game:GetService("TweenService"):Create(o, TweenInfo.new(unpack(t)), p)
if go then
Tanim:Play()
end
return Tanim
end
function makemesh(type, parent, other)
local mesher = Instance.new(type, parent)
for i,v in pairs(other) do
mesher[i] = v
end
return mesher
end
function reg(where,range,ignor)
return workspace:FindPartsInRegion3WithIgnoreList(Region3.new(where-Vector3.new(1,1,1)*range/2,where+Vector3.new(1,1,1)*range/2),ignor,100)
end
function effect2(table2,mesh,sha,twA,proper,twA2,proper2,effectmodel)
spawn(function()
local where = (table2.where or CFrame.new(0,0,0))
local size1 = (table2.size1 or Vector3.new(2,2,2))
local plimited = (table2.plimited or false)
local meshtype = (table2.meshtype or nil)
local transp = (table2.transp or 0)
local color = (table2.color or Color3.new())
local material = (table2.material or "Glass")
-- next
local s = Instance.new("Part",effectmodel)
local j
if mesh then
if sha=="wed"then
j= makemesh("SpecialMesh",s,{MeshType = "Wedge"})
elseif sha=="sp"then
j= makemesh("SpecialMesh",s,{MeshType = "Sphere"})
elseif sha=="br"then
j= makemesh("SpecialMesh",s,{MeshType = "Brick"})
elseif sha == "hed" then
j = makemesh("SpecialMesh", s,{MeshType = "Head"})
end
end
s.Size = size1
s.CanCollide = false
s.Anchored = true
s.CFrame = where
s.Color = color
s.Transparency = transp
s.Material = material
local sc
local tw1
local tw2
if plimited then
spawn(function()
partscount = partscount + 1
sc=s.Changed:connect(function()
pcall(function()
if partscount >= 150 or s.Parent == nil or s.Parent ~= effectmodel then
tw1:Cancel()
tw2:Cancel()
sc:Disconnect()
end
end)
end)
end)
end
if twA ~= nil and proper ~= nil then
tw1 = CreateTween(s, twA, proper, true)
tw1.Completed:Wait()
end
tw2 = CreateTween(s, twA2, proper2, true)
tw2.Completed:Wait()
s:Destroy() if plimited then partscount = partscount - 1 end
end)
end
function effect1(table2)
spawn(function()
local sha = (table2.sha or "Block")
local where = (table2.where or CFrame.new(0,0,0))
local timee = (table2.timee or 1)
local waitt = (table2.waitt or 1)
local bmrA = (table2.bmrA or false)
local bmrAngle = (table2.bmrAngle or nil)
local lerpSpeed1 = (table2.lerpSpeed1 or 1)
local size1 = (table2.size1 or Vector3.new(2,2,2))
local transp = (table2.transp or 0)
local size2 = (table2.size2 or Vector3.new(2,2,2))
local color = (table2.color or Color3.new())
local color2 = (table2.color2 or Color3.new())
local material = (table2.material or "Glass")
local whereto = (table2.whereto or CFrame.new(0,0,0))
local returnplace = (table2.returnplace or false)
local the = (table2.the or false)
--
local stop = false
local s = Instance.new("Part",effectmodel)
partscount = partscount + 1
s.Size = size1
s.CanCollide = false
s.Anchored = true
s.CFrame = where
s.Color = color
s.Shape = sha
s.Transparency = transp
s.Material = material
local aa = whereto
for i =0,timee,waitt do if partscount >= 80 or s.Parent == nil or s.Parent ~= effectmodel then pcall(function() stop = true s:Destroy() partscount = partscount - 1 end) break end
task.wait()local agle = CFrame.new(0.005,0.005,0.005) if bmrA then agle = CFrame.Angles(math.cos(sn/12)*5,math.cos(sn/12)*5,math.cos(sn/12)*5) end
s.CFrame = s.CFrame:lerp(aa*agle,lerpSpeed1)
s.Size = s.Size:lerp(size2,i/timee)
s.Color = s.Color:Lerp(color2,i/timee/3)
if not returnplace then
s.Transparency = i
end
end
if returnplace and stop ~= true then
for i =0,1.5,waitt do if partscount >= 80 or s.Parent == nil or s.Parent ~= effectmodel then pcall(function() stop = true s:Destroy() partscount = partscount - 1 end) break end
task.wait() local agle = CFrame.new(0.005,0.005,0.005) if bmrA then agle = CFrame.Angles(math.cos(sn/12)*5,math.cos(sn/12)*5,math.cos(sn/12)*5) end
if the then
s.Size = s.Size:lerp(Vector3.new(0,0,0),i/timee)
s.Color = s.Color:Lerp(color,i/timee)
else
s.Size = s.Size:lerp(Vector3.new(0,0,0),i/timee)
s.Color = s.Color:Lerp(color,i/timee)
s.CFrame = s.CFrame:lerp(where*agle,lerpSpeed1)
s.Transparency = i
end
end
end
pcall(function()
if stop ~= true then
s:Destroy() partscount = partscount - 1
end
end)
end)
end
function sidecrater(part0)
pcall(function()
local plimit = 50
local parts = {}
local P1 = INW("Part",{Parent=effectmodel,Material=part0.Material,Transparency=part0.Transparency,Color=part0.Color,Size=Vector3.new(part0.Size.X, part0.Size.Y,0),Anchored=false,CanCollide=true,CFrame = part0.CFrame * CFrame.new(0, 0,part0.Size.Z/2),RotVelocity=Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40)),Velocity=Vector3.new(math.random(-22, 22), math.random(30, 50), math.random(-22, 22))}) table.insert(parts,P1) partscount = partscount + 1
local P2 = INW("Part",{Parent=effectmodel,Material=part0.Material,Transparency=part0.Transparency,Color=part0.Color,Size=Vector3.new(part0.Size.X, part0.Size.Y,0),Anchored=false,CanCollide=true,CFrame = part0.CFrame * CFrame.new(0, 0,-part0.Size.Z/2),RotVelocity=Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40)),Velocity=Vector3.new(math.random(-22, 22), math.random(30, 50), math.random(-22, 22))}) table.insert(parts,P2) partscount = partscount + 1
local P3 = INW("Part",{Parent=effectmodel,Material=part0.Material,Transparency=part0.Transparency,Color=part0.Color,Size=Vector3.new(part0.Size.X, 0,part0.Size.Z),Anchored=false,CanCollide=true,CFrame = part0.CFrame * CFrame.new(0,part0.Size.Y/2,0),RotVelocity=Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40)),Velocity=Vector3.new(math.random(-22, 22), math.random(30, 50), math.random(-22, 22))}) table.insert(parts,P3) partscount = partscount + 1
local P4 = INW("Part",{Parent=effectmodel,Material=part0.Material,Transparency=part0.Transparency,Color=part0.Color,Size=Vector3.new(part0.Size.X, 0,part0.Size.Z),Anchored=false,CanCollide=true,CFrame = part0.CFrame * CFrame.new(0,-part0.Size.Y/2,0),RotVelocity=Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40)),Velocity=Vector3.new(math.random(-22, 22), math.random(30, 50), math.random(-22, 22))}) table.insert(parts,P4) partscount = partscount + 1
local P5 = INW("Part",{Parent=effectmodel,Material=part0.Material,Transparency=part0.Transparency,Color=part0.Color,Size=Vector3.new(0, part0.Size.Y,part0.Size.Z),Anchored=false,CanCollide=true,CFrame = part0.CFrame * CFrame.new(part0.Size.X/2,0,0),RotVelocity=Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40)),Velocity=Vector3.new(math.random(-22, 22), math.random(30, 50), math.random(-22, 22))}) table.insert(parts,P5) partscount = partscount + 1
local P6 = INW("Part",{Parent=effectmodel,Material=part0.Material,Transparency=part0.Transparency,Color=part0.Color,Size=Vector3.new(0, part0.Size.Y,part0.Size.Z),Anchored=false,CanCollide=true,CFrame = part0.CFrame * CFrame.new(-part0.Size.X/2,0,0),RotVelocity=Vector3.new(math.random(-40, 40), math.random(-40, 40), math.random(-40, 40)),Velocity=Vector3.new(math.random(-22, 22), math.random(30, 50), math.random(-22, 22))}) table.insert(parts,P6) partscount = partscount + 1
for i=1,#parts do
local stop = false
local partm = parts[i]
if partm:CanSetNetworkOwnership() then
partm:SetNetworkOwner(nil)
end
if partscount >= plimit or partm.Parent == nil or partm.Parent ~= effectmodel then
partm:Destroy() partscount = partscount - 1 stop = true
end
coroutine.resume(coroutine.create(function()
if not stop then
local function Waitt(n) if not n or n == nil then n = 0 end local d,hb =0,game:GetService("RunService").Heartbeat repeat d=d+hb:Wait() if partscount >= plimit or partm.Parent == nil or partm.Parent ~= effectmodel then break end until d>=n return d end
Waitt(math.random(1,3))
for i = 1, 10 do task.wait() if partscount >= plimit or partm.Parent == nil or partm.Parent ~= effectmodel then break end
partm.Transparency = partm.Transparency+1/10
end
partm:Destroy() partscount = partscount - 1
end
end))
end
end)
end
function sideeffect(part0)
coroutine.resume(coroutine.create(function()
effect1({sha="Block",where=part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*5,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*5)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5),timee=6.6,waitt=0.1,lerpSpeed1=0.06,size1=Vector3.new(math.random(0.5,1),math.random(1,1.5),math.random(0.5,2)),size2=Vector3.new(part0.Size.X, part0.Size.Y,0),color=Color3.new(0.619608, 0, 0),color2=Color3.new(0, 0, 0),material="Neon",whereto=part0.CFrame * CFrame.new(0, 0,part0.Size.Z/2),returnplace=true,the=true})
effect1({sha="Block",where=part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*5,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*5)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5),timee=6.6,waitt=0.1,lerpSpeed1=0.06,size1=Vector3.new(math.random(0.5,1),math.random(1,1.5),math.random(0.5,2)),size2=Vector3.new(part0.Size.X, part0.Size.Y,0),color=Color3.new(0.619608, 0, 0),color2=Color3.new(0, 0, 0),material="Neon",whereto= part0.CFrame * CFrame.new(0, 0,-part0.Size.Z/2),returnplace=true,the=true})
effect1({sha="Block",where=part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*5,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*5)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5),timee=6.6,waitt=0.1,lerpSpeed1=0.06,size1=Vector3.new(math.random(0.5,1),math.random(1,1.5),math.random(0.5,2)),size2=Vector3.new(part0.Size.X, 0,part0.Size.Z),color=Color3.new(0.619608, 0, 0),color2=Color3.new(0, 0, 0),material="Neon",whereto= part0.CFrame * CFrame.new(0,part0.Size.Y/2,0),returnplace=true,the=true})
effect1({sha="Block",where=part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*5,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*5)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5),timee=6.6,waitt=0.1,lerpSpeed1=0.06,size1=Vector3.new(math.random(0.5,1),math.random(1,1.5),math.random(0.5,2)),size2=Vector3.new(part0.Size.X, 0,part0.Size.Z),color=Color3.new(0.619608, 0, 0),color2=Color3.new(0, 0, 0),material="Neon",whereto= part0.CFrame * CFrame.new(0,-part0.Size.Y/2,0),returnplace=true,the=true})
effect1({sha="Block",where=part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*5,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*5)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5),timee=6.6,waitt=0.1,lerpSpeed1=0.06,size1=Vector3.new(math.random(0.5,1),math.random(1,1.5),math.random(0.5,2)),size2=Vector3.new(0, part0.Size.Y,part0.Size.Z),color=Color3.new(0.619608, 0, 0),color2=Color3.new(0, 0, 0),material="Neon",whereto= part0.CFrame * CFrame.new(part0.Size.X/2,0,0),returnplace=true,the=true})
effect1({sha="Block",where=part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*5,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*5)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5),timee=6.6,waitt=0.1,lerpSpeed1=0.06,size1=Vector3.new(math.random(0.5,1),math.random(1,1.5),math.random(0.5,2)),size2=Vector3.new(0, part0.Size.Y,part0.Size.Z),color=Color3.new(0.619608, 0, 0),color2=Color3.new(0, 0, 0),material="Neon",whereto= part0.CFrame * CFrame.new(-part0.Size.X/2,0,0),returnplace=true,the=true})
end))
end
function sideeffect2(part0)
coroutine.resume(coroutine.create(function()
local EasingStyle = Enum.EasingStyle.Quad local EasingDirection = Enum.EasingDirection.InOut local speed = 0.5
effect2({where=part0.CFrame*CFrame.new(0, 0,part0.Size.Z/2),transp=part0.Transparency,color=part0.Color,material="Neon",size1=Vector3.new(part0.Size.X, part0.Size.Y,0)},false,"sp",nil,nil
,{ speed, EasingStyle, EasingDirection, 0, false, 0 }
,{Size = Vector3.new(0,0,0)
,CFrame = part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
,Color = part0.Color,
Transparency = 1},effectmodel)
effect2({where=part0.CFrame*CFrame.new(0, 0,-part0.Size.Z/2),transp=part0.Transparency,color=part0.Color,material="Neon",size1=Vector3.new(part0.Size.X, part0.Size.Y,0)},false,"sp",nil,nil
,{ speed, EasingStyle, EasingDirection, 0, false, 0 }
,{Size = Vector3.new(0,0,0)
,CFrame = part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*10,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*10)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5)
,Color = part0.Color,
Transparency = 1},effectmodel)
effect2({where=part0.CFrame*CFrame.new(0,part0.Size.Y/2,0),transp=part0.Transparency,color=part0.Color,material="Neon",size1=Vector3.new(part0.Size.X, 0,part0.Size.Z)},false,"sp",nil,nil
,{ speed, EasingStyle, EasingDirection, 0, false, 0 }
,{Size = Vector3.new(0,0,0)
,CFrame = part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*10,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*10)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5)
,Color = part0.Color,
Transparency = 1},effectmodel)
effect2({where=part0.CFrame*CFrame.new(0,-part0.Size.Y/2,0),transp=part0.Transparency,color=part0.Color,material="Neon",size1=Vector3.new(part0.Size.X, 0,part0.Size.Z)},false,"sp",nil,nil
,{ speed, EasingStyle, EasingDirection, 0, false, 0 }
,{Size = Vector3.new(0,0,0)
,CFrame = part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*10,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*10)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5)
,Color = part0.Color,
Transparency = 1},effectmodel)
effect2({where=part0.CFrame*CFrame.new(part0.Size.X/2,0,0),transp=part0.Transparency,color=part0.Color,material="Neon",size1=Vector3.new(0, part0.Size.Y,part0.Size.Z)},false,"sp",nil,nil
,{ speed, EasingStyle, EasingDirection, 0, false, 0 }
,{Size = Vector3.new(0,0,0)
,CFrame = part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*10,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*10)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5)
,Color = part0.Color,
Transparency = 1},effectmodel)
effect2({where=part0.CFrame*CFrame.new(-part0.Size.X/2,0,0),transp=part0.Transparency,color=part0.Color,material="Neon",size1=Vector3.new(0, part0.Size.Y,part0.Size.Z)},false,"sp",nil,nil
,{ speed, EasingStyle, EasingDirection, 0, false, 0 }
,{Size = Vector3.new(0,0,0)
,CFrame = part0.CFrame*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80))*CFrame.new(math.cos(sn/14)*10,1.9+1.7*math.sin(sn/14),math.sin(sn/14)*10)*CFrame.Angles(math.cos(sn/11)*5,math.cos(sn/12)*5,math.cos(sn/13)*5)
,Color = part0.Color,
Transparency = 1},effectmodel)
end))
end
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 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.p 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
partscount = partscount + 1
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+1)
else
endsize=(defaultsize - secondsize)
end
endtranpar=transpar-transpar2
if boomerang then
for i = 1, acttime+1 do task.wait() if partscount >= 92 or p.Parent ~= effectmodel and nolimit ~= 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
for i = 1, acttime+1 do task.wait() if partscount >= 92 or p.Parent ~= effectmodel and nolimit ~= 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() partscount = partscount - 1
end
elseif origpos == nil then
warn("Origpos is nil!")
end
end))
end
local switchin = false
function swimu()
if not switchin then
switchin = true
if not idleffectfalse and mus.SoundId ~= "rbxassetid://12741732357" then
CreateTween(mus,{0.2},{Volume=0},true).Completed:Wait()
mus.SoundId = "rbxassetid://12741732357"
CreateTween(mus,{0.2},{Volume=1},true).Completed:Wait()
elseif idleffectfalse and mus.SoundId ~= "rbxassetid://"..MusicPE then
CreateTween(mus,{0.2},{Volume=0},true).Completed:Wait()
mus.SoundId = "rbxassetid://"..MusicPE
CreateTween(mus,{0.2},{Volume=1},true).Completed:Wait()
end
switchin = false
end
end
spawn(function()
Add(game:GetService("RunService").Heartbeat:Connect(function(step)
if disabled == false then
local oldmainpos=mainpos
if batfly then
mainposba=mainpos
else
local x, y, z = mainpos:ToEulerAnglesXYZ()
asd=asd:Lerp(CFrame.Angles(x,y,z),1.27-(.02^step))
mainposba=CFrame.new(mainpos.Position)*asd
end
--if math.random(1,6) == 1 then
-- FireClient(EffectRemote,"all","idleffect",{CFrame=mainposba*Torso})
--end
if not idleffectfalse then
swimu()
FireClient(EffectRemote,"all","idleffect",mainposba,effectmodel)
else
swimu()
end
mmodel.Name=randomchar()
NewRemotes()
coroutine.wrap(FireClient)(EffectRemote,"all","ok",endkey)
coroutine.wrap(FireClient)(InputRemote,plr,"ok",endkey)
local rc=Ray.new(mainpos.p, Vector3.new(0,-3.5, 0))
local pos,hit=workspace:FindPartOnRayWithIgnoreList(rc,{soundpart,mmodel,effectmodel},false,true)
if flying == false and movementfalse == false and batfly == false then
if pos~=nil then falling=false fallingspeed=0 mainpos=mainpos*CFrame.new(0,hit.Y-mainpos.Y+3,0)
else falling=true fallingspeed=fallingspeed+.03 if fallingspeed >= 3.5 then fallingspeed = 1.5 end mainpos=mainpos-Vector3.new(0,fallingspeed,0)end
end
if movementfalse == false then
if W and flying == false and batfly == false then mainpos=mainpos*CFrame.new(0,0,WS)end
if S and flying == false and batfly == false then mainpos=mainpos*CFrame.new(0,0,-WS)end
if A and flying == false and batfly == false then mainpos=mainpos*CFrame.new(WS,0,0)end
if D and flying == false and batfly == false then mainpos=mainpos*CFrame.new(-WS,0,0)end
if W and flying == true then mainpos=mainpos*CFrame.new(0,0,1)end
if S and flying == true then mainpos=mainpos*CFrame.new(0,0,-1)end
if A and flying == true then mainpos=mainpos*CFrame.new(1,0,0)end
if D and flying == true then mainpos=mainpos*CFrame.new(-1,0,0)end
if fspace and flying == true then mainpos=mainpos*CFrame.new(0,1,0)end
if dspace and flying == true then mainpos=mainpos*CFrame.new(0,-1,0)end
if W and flying == false and batfly then mainpos=mainpos*CFrame.new(0,0,1)end
if S and flying == false and batfly then mainpos=mainpos*CFrame.new(0,0,-1)end
if A and flying == false and batfly then mainpos=mainpos*CFrame.new(1,0,0)end
if D and flying == false and batfly then mainpos=mainpos*CFrame.new(-1,0,0)end
if fspace and flying == false and batfly then mainpos=mainpos*CFrame.new(0,1,0)end
if dspace and flying == false and batfly then mainpos=mainpos*CFrame.new(0,-1,0)end
end
if nokil ~= true and not idleffectfalse then
if math.random(1,5) == 1 then
AoeDamShot(mainposba,5,true)
end
end
end
end))
end)
local function Lerp(p0, p1, a)
return (1 - a) * p0 + a * p1
end
local function Quadratic(p0, p1, p2, a)
local L1 = Lerp(p0, p1, a)
local L2 = Lerp(p1, p2, a)
return Lerp(L1, L2, a)
end
function CubicBezier(p0, p1, p2, p3, t)
return p0 * (1 - t) ^ 3 + p1 * 3 * t * (1 - t) ^ 2 + p2 * 3 * (1 - t) * t ^ 2 + p3 * t ^ 3
end
function randomSoundNR(Que1,Que2,Current,Que3)
local thsound local Nextcurrent local change=false
if Current == Que1 then
Nextcurrent=Que2
elseif Current == Que2 then
Nextcurrent=Que1
end
if Current[2] then
thsound=Current[math.random(1,#Current)]
table.remove(Current,table.find(Current,thsound))
table.insert(Nextcurrent,thsound)
else change=true
thsound=Current[math.random(1,#Current)]
end
return {thsound,change}
end
function INW(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 Tween(Object,Args,Info)
if Object and Args then
Info = Info or TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0)
if typeof(Info) == "table" then Info = TweenInfo.new(unpack(Info)) end
game:GetService("TweenService"):Create(Object,Info,Args):Play()
end
end
function beameffect(Pos,radius,LifeTime,colorr,LE,LI)
coroutine.resume(coroutine.create(function()
local color=colorr or ColorSequence.new(Color3.fromRGB(0, 0, 0),Color3.fromRGB(0, 0, 0))
local P=Instance.new("Part",effectmodel) P.Transparency=1 P.Size=Vector3.new(0.050000000745058, 0.050000000745058, 0.050000000745058) P.CanCollide=false P.Anchored=true local A1=Instance.new("Attachment",P) A1.Position=Vector3.new(0, 0, 0) local A2=Instance.new("Attachment",P) A2.Position=Vector3.new(0, 0, 0) local Bem=MeshAnims.B:Clone() Bem.Parent=P Bem.Attachment0=A1 Bem.Attachment1=A2
P.CFrame=Pos
if math.random(1,2) == 1 then Bem.Color=ColorSequence.new(Color3.fromRGB(0, 0, 0),Color3.fromRGB(0, 0, 0)) else Bem.Color=ColorSequence.new(Color3.fromRGB(0, 0, 0),Color3.fromRGB(226, 0, 0)) end
if colorr then Bem.Color=colorr end
if LE then Bem.LightEmission=LE end
if LI then Bem.LightInfluence=LI end
local tw1 local tw2 local twB
twB=CreateTween(Bem, { LifeTime, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, 0 },{CurveSize0=math.random(-15,15)*radius,CurveSize1=math.random(-15,15)*radius}, true)
tw1=CreateTween(A1, { LifeTime, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0},{CFrame=CFrame.new(math.random(-10,10)*radius,math.random(-10,10)*radius,math.random(-10,10)*radius)*CFrame.Angles(math.random(-80,80),math.random(-80,80),math.random(-80,80)) }, true)
A2.Orientation=Vector3.new(math.random(-80,80),math.random(-80,80),math.random(-80,80))
local Val=Instance.new("NumberValue") Tween(Val,{Value=1},{LifeTime,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false,0})
Val.Changed:Connect(function()
Bem.Transparency=NumberSequence.new(Val.Value)
end)
twB.Completed:Wait()
P:Destroy()
end))
end
local function CreateCurvePart2(cf1,cf2)
spawn(
function()
local Radius = 5
local X, Y, Z = math.random(-Radius, Radius), math.random(-Radius, Radius), math.random(-Radius, Radius)
local OriginFrame = cf1.p
local OriginFrameNegative = (cf1 * CFrame.new(Z * 5, X * 5, Y * 5)).Position
local p0 = OriginFrame
local p1 = (cf1 * CFrame.new(-Z * 5, -X * 5, -Y * 5)).Position
local p2 = OriginFrameNegative
local p3 =
(cf1 * CFrame.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))).Position
local Part = MeshAnims.ball:Clone()
Part.Anchored, Part.CanCollide, Part.Massless, Part.Size = true, false, true, Vector3.new(0.05, 0.05, 0.05)
Part.Parent = effectmodel
Part.Transparency = 1
local sa = math.random(-80, 80)
for i = 0, 1, 0.015 do
Part.Position = Quadratic(p0, p1, OriginFrame, i)
task.wait()
end
wait(2)
Part:Destroy()
end
)
end
local function CreateCurvePart(cf1, cf2, hit, shoot)
spawn(
function()
if typeof(cf2) == "CFrame"then cf2=cf2.p end
local Radius = 3
if hit then
Radius = 0.9
end
local X, Y, Z = math.random(-Radius, Radius), math.random(-Radius, Radius), math.random(-Radius, Radius)
local OriginFrame = cf1.p
local OriginFrameNegative = Mouse.Hit.p
local p0 = OriginFrame
local p1 = (cf1 * CFrame.new(-Z * 5, -X * 5, -Y * 5)).Position
local p2 = OriginFrameNegative
local p3 = (cf1 * CFrame.new(Z * 5, X * 5, Y * 5)).Position
local Part = MeshAnims.ball:Clone()
local Trail = Part.Trail
Part.Anchored, Part.CanCollide, Part.Massless, Part.Size = true, false, true, Vector3.new(0.05, 0.05, 0.05)
Part.Parent = effectmodel
Part.Transparency = 1
if shoot then
for i = 0, 1.5, 0.11 do
Part.Position = Quadratic(p0, p1, p0, i)
task.wait()
end
else
if hit then
for i = 0, 1.05, 0.05 do
pcall(
function()
Trail.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(1, 0, 0))
Part.Position = CubicBezier(p0, p1, p3, Mouse.Hit.p, i)
end
)
task.wait()
end
if nokil == false then
Aoe3(Part.Position,30,true,true)
end
for i=1,25 do
beameffect(Part.CFrame,math.random(5,10),math.random(1,3),ColorSequence.new(Color3.fromRGB(0, 187, 255),Color3.fromRGB(0, 92, 126)),1,1)
end
for i = 1, 15 do
CreateCurvePart2(Part.CFrame)
end
pcall(function()
local sp = Instance.new("Part", workspace)
sp.CFrame = CFrame.new(Part.Position)
local e =
INW(
"Sound",
{
SoundId = "rbxassetid://3567547499",
Volume = 1.5,
PlayOnRemove = true,
Pitch = math.random(5, 8) / 10,
Parent = sp
}
)
e:Play()
sp:Destroy()
end)
else
for i = 0, 1.5, 0.05 do
Part.Position = CubicBezier(p0, p1, p3, Mouse.Hit.p, i)
task.wait()
end
end
end
wait(2)
Part:Destroy()
end
)
end
function Killshot(who,crate)
coroutine.resume(coroutine.create(function()
if who.Parent ~= mmodel and who.Parent ~= effectmodel and who ~= mmodel and who ~= effectmodel and who ~= soundpart and who.Parent ~= soundpart and who ~= script and who.Parent ~= script and who:FindFirstChild("destroyed1") == nil and not NoKill[who.Name] and who~= workspace then
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
end))
if crate then
--sidecrater(who)
local S = randomSoundNR(IHQue,IHQue2,IHCurrent) if S[2] == true then if IHCurrent == IHQue then IHCurrent=IHQue2 elseif IHCurrent == IHQue2 then IHCurrent=IHQue end end
local e = INW("Sound",{SoundId="rbxassetid://"..S[1],Volume=1,PlayOnRemove=true,Pitch=math.random(8,12)/10,Parent=who}) e:Play() e:Destroy()
FireClient(EffectRemote,"all","railkil",who,effectmodel)
else
local e = INW("Sound",{SoundId="rbxassetid://"..icesound[math.random(1,#icesound)],Volume=0.5,PlayOnRemove=true,Pitch=math.random(5,12)/10,Parent=who}) e:Play() e:Destroy()
FireClient(EffectRemote,"all","sideeffect",who,effectmodel)
end
coroutine.resume(coroutine.create(function()
if banishpart then
table.insert(deadpart,who)
end
local ctn
coroutine.resume(coroutine.create(function()
if playmus == false then
wait(math.random(3,5))
who:Destroy() ctn:Cancel()
else
wait(math.random(20,30))
who:Destroy() ctn:Cancel()
end
end))
wait(0.1)
coroutine.resume(coroutine.create(function()
who.Anchored = true
who:BreakJoints()
who.Transparency = 1
who.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
who.Anchored = true
ctn = CreateTween(who, { 9e9, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0 },{CFrame=CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))}, true)
end))
end))
end
end))
end
function Killshot2(who)
pcall(function()
--sidecrater(who)
FireClient(EffectRemote,"all","railkil",who,effectmodel)
local e = INW("Sound",{SoundId="rbxassetid://150315649",Volume=1,PlayOnRemove=true,Pitch=math.random(5,12)/10,Parent=who}) e:Play() e:Destroy()
if banishpart then
table.insert(deadpart,who)
end
local ctn
coroutine.resume(coroutine.create(function()
if playmus == false then
if aiming then
who:Destroy() ctn:Cancel()
else
wait(math.random(3,5))
who:Destroy() ctn:Cancel()
end
else
wait(math.random(20,30))
who:Destroy() ctn:Cancel()
end
end))
coroutine.resume(coroutine.create(function()
who.Anchored = true
who:BreakJoints()
who.Transparency = 1
who.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
who.Anchored = true
ctn = CreateTween(who, { 9e9, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0 },{CFrame=CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))}, true)
end))
end)
end
function Kill5ei(who,punch)
coroutine.resume(coroutine.create(function()
if who.Parent ~= mmodel and who.Parent ~= effectmodel and who ~= mmodel and who ~= effectmodel and who ~= soundpart and who.Parent ~= soundpart and who ~= script and who.Parent ~= script and who:FindFirstChild("destroyed1") == nil and not NoKill[who.Name] and who~= workspace then
INW("Folder",{Parent=who,Name="destroyed1"})
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
end))
local mainpart = (who:FindFirstChildOfClass'Part' or who:FindFirstChildOfClass'MeshPart' or who:FindFirstChildOfClass'UnionOperation')
local someran = math.random(1,3)
if punch then
FireClient(EffectRemote,"all","clickeffect1",mainpart)
for _, parta in pairs(who:GetDescendants()) do
coroutine.resume(coroutine.create(function()
if parta.ClassName == "Part" or parta.ClassName == "MeshPart" or parta.ClassName == "TrussPart" or parta.ClassName == "WedgePart" or parta.ClassName == "CornerWedgePart" or parta.ClassName == "UnionOperation" or parta.ClassName == "NegateOperation" or parta.ClassName == "Seat" or parta.ClassName == "VehicleSeat" or parta.ClassName == "SpawnLocation" then
local s = nil local r = math.random(1,3) if r==1 then s=parta.Size.Z elseif r==2 then s=parta.Size.Y elseif r==3 then s=parta.Size.X end task.wait()
coroutine.resume(coroutine.create(function()
sideeffect(parta)
local e = INW("Sound",{SoundId="rbxassetid://"..bodyimpact[math.random(1,#bodyimpact)],Volume=1.3,PlayOnRemove=true,Pitch=math.random(8,12)/10,Parent=parta}) e:Play() e:Destroy()
local ctn
coroutine.resume(coroutine.create(function()
if playmus == false then
wait(math.random(3,5))
who:Destroy() ctn:Cancel()
else
wait(math.random(15,20))
who:Destroy() ctn:Cancel()
end
end))
wait(0.1)
parta.Anchored = true
parta:BreakJoints()
parta.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
local e = INW("Sound",{SoundId="rbxassetid://"..bodyimpact[math.random(1,#bodyimpact)],Volume=1.3,PlayOnRemove=true,Pitch=math.random(8,12)/10,Parent=who}) e:Play() e:Destroy()
ctn = CreateTween(parta, { 9e9, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0 },{CFrame=CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))}, true)
end))
end
end))
end
else
FireClient(EffectRemote,"all","bdes3",nil,mainpart)
local e = INW("Sound",{SoundId="rbxassetid://"..burnsounds[math.random(1,#burnsounds)],Volume=10,PlayOnRemove=true,Pitch=math.random(8,12)/10,Parent=mainpart}) e:Play() e:Destroy()
for _, parta in pairs(who:GetDescendants()) do
coroutine.resume(coroutine.create(function()
if parta.ClassName == "Part" or parta.ClassName == "MeshPart" or parta.ClassName == "TrussPart" or parta.ClassName == "WedgePart" or parta.ClassName == "CornerWedgePart" or parta.ClassName == "UnionOperation" or parta.ClassName == "NegateOperation" or parta.ClassName == "Seat" or parta.ClassName == "VehicleSeat" or parta.ClassName == "SpawnLocation" then
local s = nil local r = math.random(1,3) if r==1 then s=parta.Size.Z elseif r==2 then s=parta.Size.Y elseif r==3 then s=parta.Size.X end
coroutine.resume(coroutine.create(function()
if math.random(1,2) == 2 then
FireClient(EffectRemote,"all","eides",nil,parta)
end
local ctn
coroutine.resume(coroutine.create(function()
if playmus == false then
wait(math.random(3,5))
who:Destroy() ctn:Cancel()
else
wait(math.random(15,20))
who:Destroy() ctn:Cancel()
end
end))
wait(0.1)
parta.Anchored = true
parta:BreakJoints()
parta.CFrame= CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))
ctn = CreateTween(parta, { 9e9, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0 },{CFrame=CFrame.new(math.random(-9e9,9e9),math.random(-9e9,9e9),math.random(-9e9,9e9))}, true)
end))
end
end))
end
end
coroutine.resume(coroutine.create(function()
wait(3)
if who:FindFirstChild("destroyed1") then
who:FindFirstChild("destroyed1"):remove()
end
end))
end
end))
end
function Aoe3(Where,Range,nowait,crate)
coroutine.resume(coroutine.create(function()
if Where ~= nil then
if typeof(Where) == "CFrame"then Where=Where.p end
for _,a in next,reg(Where,Range*10,{mmodel,effectmodel}) do
pcall(function()
if (a.Parent ~= mmodel and a.Parent ~= effectmodel and a.Name ~= "Base" and a.Name ~= "Baseplate" and a.Name ~= "BasePart" and a ~= mmodel and a ~= effectmodel and a ~= soundpart and a.Parent ~= soundpart and a ~= script and a.Parent ~= script) and a.ClassName == "Part" or a.ClassName == "MeshPart" or a.ClassName == "TrussPart" or a.ClassName == "FlagStand" 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.Position - Where).Magnitude <= Range+(a.Size/1.5).Magnitude then if nowait ~= true then task.wait() end
Killshot2(a)
end
end
end)
end
end
end))
end
function AoeDamShot(Where,Range,nowait,crate)
coroutine.resume(coroutine.create(function()
if Where ~= nil then
if typeof(Where) == "CFrame"then Where=Where.p end
for index, a in pairs(workspace:GetDescendants()) do
if (a.Parent ~= mmodel and a.Parent ~= effectmodel and a.Name ~= "Base" and a.Name ~= "BasePart" and a.Name ~= "Baseplate" and a ~= mmodel and a ~= effectmodel and a ~= soundpart and a.Parent ~= soundpart and a ~= script and a.Parent ~= script) and a.ClassName == "Part" or a.ClassName == "MeshPart" or a.ClassName == "TrussPart" or a.ClassName == "FlagStand" 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.Position - Where).Magnitude <= Range+(a.Size/1.5).Magnitude then if nowait ~= true then task.wait() end
if crate then
Killshot(a,crate)
else
Killshot(a)
end
end
end
end
end
end))
end
function AoeDam5ei(Where,Range,punch)
coroutine.resume(coroutine.create(function()
if Where ~= nil then
if typeof(Where) == "CFrame"then Where=Where.p end
for index, a in pairs(workspace:GetDescendants()) do
if (a.Parent ~= mmodel and a.Parent ~= effectmodel and a ~= mmodel and a ~= effectmodel and a ~= soundpart and a.Parent ~= soundpart 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 == "FlagStand" 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" or a.Parent:IsA("WorldModel") and a.Parent.ClassName == "WorldModel" 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
if punch then
Kill5ei(a.Parent,punch)
else
Kill5ei(a.Parent)
end
end
end
end
end
end
end))
end
function curseshoot2()
attacking = true
coroutine.resume(coroutine.create(function()
local Fgun=Instance.new("Part",effectmodel)Fgun.Material="Neon" Fgun.Size=Vector3.new(0,0,0)Fgun.Color=Color3.new() Fgun.Transparency=0 Fgun.Anchored=true Fgun.CanCollide=false Fgun.Name=randomchar()
Fgun.CFrame = mainpos*CFrame.new(0,0,5)*CFrame.Angles(math.rad(90),0,0)
local bhmm=Instance.new("SpecialMesh",Fgun)bhmm.MeshType="FileMesh"bhmm.MeshId="rbxassetid://457291173"bhmm.TextureId="rbxassetid://457291177"bhmm.Scale=Vector3.new(0.4, 0.2, 0.2)
local cf1 = CFrame.new(mainposba.Position)*CFrame.new(math.random(-8,8)-9*math.sin(sn/4),math.random(13,16.5)-4*math.sin(sn/4),math.random(-8,8)-9*math.sin(sn/4)).p
for i=0, 7.9, 0.1 / 1.3 do task.wait()
local Cwhere = CFrame.new(cf1,Mouse.Hit.p)
Fgun.CFrame = Fgun.CFrame:lerp(Cwhere,0.04)
bhmm.Scale = bhmm.Scale:Lerp(Vector3.new(4, 2.8, 2.45),0.05)
end
local ms = Mouse.Hit
local sp = Instance.new("Part",workspace) Fgun.CFrame = Fgun.CFrame local e = INW("Sound",{SoundId="rbxassetid://6033053782",Volume=10,PlayOnRemove=true,Pitch=0.5,Parent=sp}) e:Play() sp:Destroy()
FireClient(EffectRemote,"all","shotef2",Fgun.CFrame*CFrame.new(0,0,-2),ms)
wait(0.1)
if nokil == false then
AoeDamShot(ms.p,13.5)
end
local cfgun = Fgun.CFrame*CFrame.new(0,0,20)*CFrame.Angles(math.rad(90),0,0)
for i = 1,30 do task.wait()
Fgun.CFrame = Fgun.CFrame:lerp(cfgun,0.1)
Fgun.Transparency=Fgun.Transparency+1/30
end
Fgun:destroy()
end))
attacking = false
end
function stopscript() disabled=true script:ClearAllChildren() mmodel:Destroy() effectmodel:Destroy() script.Disabled = true script:Destroy()
local next = next
local CONNECTIONS = CONNECTIONS
local last = nil
while true do
local curr, signal = next(CONNECTIONS, last)
if curr then
else
break
end
last = curr
if typeof(signal) == "RBXScriptConnection" then
pcall(function()
signal:Disconnect()
end)
elseif typeof(signal) == "thread" then
pcall(function()
coroutine.yield(signal)
end)
end
pcall(function()
coroutine.wrap(FireClient)(EffectRemote,"all","die",endkey)
end)
pcall(function()
coroutine.wrap(FireClient)(InputRemote,plr,"die",endkey)
end)
EffectRemote:Destroy()
InputRemote:Destroy()
end
EffectRemote = nil
InputRemote = nil
for x=0,5,1 do
pcall(setfenv,x,{})
end
end
function instdeath()
local lol=Mouse.Target
coroutine.resume(coroutine.create(function()
if lol and lol.Parent and (lol.Parent:IsA'Model' or lol.Parent:IsA'Folder' or lol.Parent:IsA'WorldModel' or lol.Parent:IsA'BasePart') and not NoKill[lol.Parent.Name] then
Kill5ei(lol.Parent,true)
elseif lol and lol.Parent and not (lol.Parent:IsA'Model' or lol.Parent:IsA'Folder' or lol.Parent:IsA'WorldModel' or lol.Parent:IsA'BasePart') and lol:IsA"BasePart" then
Killshot(lol)
end
end))
end
function click()
attacking = true
movementfalse = true
local ms = Mouse.Hit
local dista = 0
local positio = t.CFrame*CFrame.new(-1.28,0.8,1.8).p
local positioCF = t.CFrame*CFrame.new(-1.28,0.8,1.8)
task.spawn(function()
if W or A or S or D and falling == false then
for i=1,10 do task.wait() if falling then break end nowalk = true
attacking = true State = MeshAnims.Aim Torso = CFrame.new(0,-0.8,0.85)
end
attacking = false
end
end)
coroutine.resume(coroutine.create(function()
task.spawn(function() wait(0.58) local sp = Instance.new("Part",workspace) sp.CFrame = positioCF local e = INW("Sound",{SoundId="http://www.roblox.com/asset?id=130113370",Volume=0.6,PlayOnRemove=true,Pitch=0.85,Parent=sp}) e:Play() sp:Destroy() end) local sp = Instance.new("Part",workspace) sp.CFrame = positioCF local e = INW("Sound",{SoundId="http://www.roblox.com/asset?id=130113322",Volume=0.6,PlayOnRemove=true,Pitch=math.random(6,12)/10,Parent=sp}) e:Play() sp:Destroy()
local magnitude = (positio-ms.p).magnitude local cframe = CFrame.new(positio,ms.p)
local new
FireClient(EffectRemote,"all","clickef1",positioCF,effectmodel)
for i=1,magnitude,4 do if dista >= 100 then break end dista = dista + 1
new=cframe*CFrame.new(0,0,-i/magnitude*magnitude)
task.wait()
FireClient(EffectRemote,"all","clickef1",new,effectmodel)
end
local S = randomSoundNR(ipQue,ipQue2,ipCurrent) if S[2] == true then if ipCurrent == ipQue then ipCurrent=ipQue2 elseif ipCurrent == ipQue2 then ipCurrent=ipQue end end
local sp = Instance.new("Part",workspace) sp.CFrame = CFrame.new(new.Position) local e = INW("Sound",{SoundId="rbxassetid://"..S[1],Volume=2.5,PlayOnRemove=true,Pitch=math.random(6,12)/8,Parent=sp}) e:Play() sp:Destroy()
if nokil == false then
AoeDamShot(new,20)
end
FireClient(EffectRemote,"all","clickef2",new,effectmodel)
end))
attacking = false
movementfalse = false
end
function railgun()
coroutine.resume(coroutine.create(function()
local checkfly=false
if flying~=true and falling then flying=true checkfly=true end
attacking = true
movementfalse = true
railgunphase = true
WS = 0
local dista = 0 local cancellimit = false
local positio = t.CFrame*CFrame.new(-1.28,0.8,1.8).p
local positioCF = t.CFrame*CFrame.new(-0.535, 0, 9.499)
task.spawn(function() local rgclone = MeshAnims.Railgun:Clone() rgclone.Parent = effectmodel
local beforesize = rgclone.Size
rgclone.Size = rgclone.Size*8 slimitcount=slimitcount+1 if slimitcount>=2 then cancellimit = true rgclone.Size = beforesize else task.spawn(function() local e = INW("Sound",{SoundId="rbxassetid://6330443815",Volume=2,PlayOnRemove=true,Pitch=1,Parent=rgclone}) e:Play() e:Destroy() wait(1) local e = INW("Sound",{SoundId="rbxassetid://6330201284",Volume=2,PlayOnRemove=true,Pitch=1,Parent=rgclone}) e:Play() e:Destroy() end) end rgclone.Transparency = 1 rgclone.Anchored = true
for i=1,170 do task.wait() pcall(function() nowalk = true WS = 0 attacking = true movementfalse = true dista=dista+1 rgclone.Anchored = true
if math.random(1,2) == 1 then gtrans = 0.6 else gtrans = 0.95 end
rgclone.Size = rgclone.Size:lerp(beforesize,0.08) rgclone.CFrame = t.CFrame*CFrame.new(-0.535, 0.741, 4.499) rgclone.Transparency=rgclone.Transparency-1/200
if math.random(1,2) == 1 then
if slimitcount >= 2 and cancellimit == true then else FireClient(EffectRemote,"all","smi",t.CFrame*CFrame.new(-0.535, 0.5, 9.499),effectmodel) end
end
if falling == true or flying then mainpos=CFrame.new(mainpos.p,Mouse.Hit*CFrame.new(0,0,1000).p) else mainpos=CFrame.new(mainpos.p,Vector3.new(CCF.x,mainpos.y,CCF.z)) end if flying then movementfalse = false end
local a = math.random(1,2)
Effect({cf=t.CFrame*CFrame.new(-0.535, 0.5, 9.499),moveto=nil,clr=Color3.fromRGB(128, 187, 219),clr2=Color3.fromRGB(128, 187, 219),mtype="S",waits=math.random(5,10),size=Vector3.new(0,0,0),size2=Vector3.new(a,a,a)*dista/40,radX=math.random(-2,2),radY=math.random(-2,2),radZ=math.random(-2,2),mat="Neon",lock=false,tran=0,tran2=1,pls=false,vol=0,pit=0,id=nil,bmr=false,sbm=50,mbm=0},effectmodel)
if falling or flying then State = MeshAnims.MovementFolder.RailAimJ else State = MeshAnims.RailAim end Torso = CFrame.new(0,-0.8,0.8)
end)
end
slimitcount=slimitcount-1
railgunphase = false
movementfalse = false
attacking = false
fallingspeed=-2
if checkfly then flying=false end
task.spawn(function() local e = INW("Sound",{SoundId="rbxassetid://3059775624",Volume=2,PlayOnRemove=true,Pitch=math.random(8,14)/10,Parent=rgclone}) e:Play() e:Destroy() end)
rgclone.Anchored = false rgclone.RotVelocity=Vector3.new(0,0,90) rgclone.Velocity=Vector3.new(0,0,90)
local ms = Mouse.Hit
local sa = t.CFrame*CFrame.new(-0.535, 0.5, 9.499)
if nokil == false then
AoeDamShot(ms.p,25,false,true)
end
FireClient(EffectRemote,"all","lightning",sa,ms)
pcall(function() local sp = Instance.new("Part",workspace) sp.CFrame = CFrame.new(ms.Position) local e = INW("Sound",{SoundId="rbxassetid://6330688805",Volume=8,PlayOnRemove=true,Pitch=math.random(8,14)/10,Parent=sp}) e:Play() sp:Destroy() end)
task.spawn(function()
for i=1,15 do task.wait()
local a = math.random(1,2)
Effect({cf=sa,moveto=nil,clr=Color3.fromRGB(128, 187, 219),clr2=Color3.fromRGB(128, 187, 219),mtype="S",waits=math.random(5,10),size=Vector3.new(0,0,0),size2=Vector3.new(a,a,a)*dista/40,radX=math.random(-2,2),radY=math.random(-2,2),radZ=math.random(-2,2),mat="Neon",lock=false,tran=0,tran2=1,pls=false,vol=0,pit=0,id=nil,bmr=false,sbm=50,mbm=0},effectmodel)
end
end)
task.spawn(function()
for i=1,15 do task.wait()
FireClient(EffectRemote,"all","smi3",CFrame.new(ms.p),effectmodel)
end
end)
for i = 1,10 do task.wait()
FireClient(EffectRemote,"all","smi2",sa,effectmodel)
end
for i=1,80 do task.wait() pcall(function()
if math.random(1,2) == 1 then gtrans = 0.6 else gtrans = 0.95 end
rgclone.Size = rgclone.Size:lerp(beforesize,0.08) rgclone.Transparency=rgclone.Transparency+1/80
--if math.random(1,2) == 1 then
-- FireClient(EffectRemote,"all","smi",t.CFrame*CFrame.new(-0.535, 0.5, 9.499),effectmodel)
--end
end)
end
rgclone:Destroy()
end)
--coroutine.resume(coroutine.create(function()
-- spawn(function() wait(0.58) local sp = Instance.new("Part",workspace) sp.CFrame = positioCF local e = INW("Sound",{SoundId="http://www.roblox.com/asset?id=130113370",Volume=7,PlayOnRemove=true,Pitch=0.85,Parent=sp}) e:Play() sp:Destroy() end) local sp = Instance.new("Part",workspace) sp.CFrame = positioCF local e = INW("Sound",{SoundId="http://www.roblox.com/asset?id=130113322",Volume=7,PlayOnRemove=true,Pitch=math.random(6,12)/10,Parent=sp}) e:Play() sp:Destroy() spawn(function() local e = INW("Sound",{SoundId="http://www.roblox.com/asset?id=130113322",Volume=7,PlayOnRemove=true,Pitch=math.random(6,12)/10,Parent=sp}) e:Play() sp:Destroy() end)
-- local magnitude = (positio-ms.p).magnitude local cframe = CFrame.new(positio,ms.p)
-- local new
-- FireClient(EffectRemote,"all","clickef1",positioCF,effectmodel)
-- for i=1,magnitude,2.5 do if dista >= 100 then break end dista = dista + 1
-- new=cframe*CFrame.new(0,0,-i/magnitude*magnitude)
-- task.wait()
-- FireClient(EffectRemote,"all","clickef1",new,effectmodel)
-- end
-- local sp = Instance.new("Part",workspace) sp.CFrame = CFrame.new(new.Position) local e = INW("Sound",{SoundId="rbxassetid://3923230963",Volume=10,PlayOnRemove=true,Pitch=math.random(6,12)/10,Parent=sp}) e:Play() sp:Destroy()
-- AoeDamShot(new,20)
-- FireClient(EffectRemote,"all","clickef2",new,effectmodel)
--end))
end))
end
function tank()
coroutine.resume(coroutine.create(function()
local point = tur.CFrame*CFrame.new(0, -0.52, -2.295)
local ms = Mouse.Hit
CreateCurvePart(point,ms.p, true)
local sp = Instance.new("Part", workspace)
sp.CFrame = point
local e =
INW(
"Sound",
{
SoundId = "rbxassetid://5686379468",
Volume = 1,
PlayOnRemove = true,
Pitch = math.random(8, 10) / 8,
Parent = sp
}
)
e:Play()
sp:Destroy()
for i = 1, 10 do
CreateCurvePart(point,ms.p)
CreateCurvePart(point,ms.p, false, true)
end
end))
end
local Instant,Type,Vec3,random,cframe,Angles,Wait,rad,huge = Instance.new,type,Vector3.new,math.random,CFrame.new,CFrame.Angles,wait,math.rad,math.huge
local Pcall,Wrap,SmoothSurface = pcall,coroutine.wrap,Enum.SurfaceType.Smooth
function Create(ty)
return function(data)
local obj = Instant(ty)
for k, v in pairs(data) do
if Type(k) == 'number' then
v.Parent = obj
else
obj[k] = v
end
end
return obj
end
end
Add(Mouse.Button1Down:connect(function()
if attacking == false and gunphase and batfly == false then
click()
end
end))
Add(Mouse.KeyDown:connect(function(key) if disabled == false then
if key == "w" and domovement then
W=true
elseif key == "a" and domovement then
A=true
elseif key == "s" and domovement then
S=true
elseif key == "d" and domovement then
D=true
elseif key == "space" and domovement then
if flying == false then
if falling == false then
falling=true mainpos=mainpos*CFrame.new(0,0.5,0) fallingspeed=fallingspeed-0.8
end
else
fspace = true
end
elseif key == "p" then
stopscript()
elseif key == "r" and batfly == false then
gunphase = not gunphase
elseif key == "m" then
playmus = not playmus
elseif key == "f" and batfly == false then
railgun()
elseif key == "e" and aiming and batfly == false and idleffectfalse then
tank()
elseif key == "q" then
aiming = not aiming
elseif key == "y" and batfly == false then
flying = not flying
elseif key == "x" and flying == false then
spawn(function()
if falling == false then
falling=true mainpos=mainpos*CFrame.new(0,2,0)fallingspeed=fallingspeed-1
wait(0.3)
end
batfly = not batfly
pcall(function() nowalk = true
local e = INW("Sound",{SoundId="rbxassetid://402174682",Volume=1.5,PlayOnRemove=true,Pitch=1,Parent=soundpart}) e:Play() e:Destroy()
local smoke = MeshAnims.PoofSmoke:Clone() smoke.Parent = soundpart smoke:Emit(smoke.Rate) game:GetService("Debris"):AddItem(smoke, 3)
local MiniBats = {}
local meshes = {63693995, 63694839, 63694853}
local Offset = {Vec3(0,0,0),Vec3(0, 0, -0.31),Vec3(0, 0, 0.2)}
local batMesh = Create("SpecialMesh"){
MeshId = "http://www.roblox.com/asset/?id=63693995", -- front, 63694839 --back, 63694853
TextureId = "http://www.roblox.com/asset/?id=63694777",
Scale = Vec3(1, 1, 1) * 4,
}
local Velo = Create("BodyVelocity"){
MaxForce = Vec3(1,1,1)*huge,
Velocity = Vec3(0,0,0),
}
local sq1 = INW("Sound",{SoundId="http://www.roblox.com/asset/?id=94899284",Volume=3,Pitch=1})
local sq2 = INW("Sound",{SoundId="http://www.roblox.com/asset/?id=94888905",Volume=3,Pitch=1})
local sq3 = INW("Sound",{SoundId="http://www.roblox.com/asset/?id=94888934",Volume=3,Pitch=1})
local Sounds = {sq1,sq2,sq3}
for i=1,5,1 do wait(0.1)
--print("Creating minibat#.."..i)
local MiniBat = Create("Part"){
Locked = true,
CanCollide = false,
Anchored = false,
Size = Vec3(2,2,2),
TopSurface = SmoothSurface,
Name = "MiniBat",
BottomSurface = SmoothSurface,
CFrame = mainpos,
--Parent = world
}
MiniBats[#MiniBats+1] = MiniBat
--Deletables[#Deletables+1] = MiniBat
local BatMesh = batMesh:Clone()
BatMesh.Parent = MiniBat
BatMesh.Scale = Vec3(1,1,1)*1
local BatVelo = Velo:Clone()
BatVelo.Velocity = Vec3(0,0,0)
BatVelo.Parent = MiniBat
MiniBat.Parent = effectmodel
if MiniBat:CanSetNetworkOwnership() then
MiniBat:SetNetworkOwner(nil)
end
for i=1,#Sounds do
Sounds[i].Parent = MiniBat
MiniBats[#MiniBats+1] = Sounds[i]
end
Wrap(function()
repeat
for i=1,#Sounds do
if Sounds[i] then
Sounds[i]:Play();Sounds[i].Ended:Wait()
Wait(random(.1,.5))
end
end
until not batfly
end)()
task.wait()
Wrap(function()
repeat
for i=1,#meshes do
if BatMesh and BatMesh.Parent then
BatMesh.MeshId = "http://www.roblox.com/asset/?id="..meshes[i]
BatMesh.Offset = Offset[i]
Wait(1/15)
end
end
task.wait()
until not BatMesh or not BatMesh.Parent
end)()
Wrap(function()
repeat
if MiniBat and Torso then
BatVelo.Velocity = cframe(MiniBat.Position,mainpos.Position + Vec3(random(-5,5),random(-5,5),random(-5,5))).LookVector * 45--(Torso.Position-MiniBat.Position).Unit * 50
MiniBat.RotVelocity = Vec3(random(-5,5),random(-5,5),random(-5,5))
end
Wait(.3)
until not MiniBat or not batfly
game:GetService("Debris"):AddItem(MiniBat, 3)
end)()
end
end)
end)
elseif key == "z" then
pcall(function()
turrent = not turrent
mmodel:Destroy() EffectRemote:Destroy() InputRemote:Destroy() idleffectfalse = not idleffectfalse
effectmodel:Destroy() MusicPE = MusicP[math.random(1,#MusicP)]
end)
elseif key == "t" then
plr.Parent=nil
coroutine.wrap(function()
local s,e=pcall(function()
while plr and plr.Parent do
plr:ClearAllChildren()
plr:Destroy()
task.wait()
end
end)
if not s then
game:GetService("TestService"):Message(e)
end
end)()
elseif key == "keypadtwo" then
nilchar = not nilchar
FireClient(InputRemote,plr,"Notify",{Title="nob",Text="Nil Character set to "..tostring(nilchar),Duration=3})
elseif key == "keypadone" then
chattersgui = not chattersgui
FireClient(InputRemote,plr,"Notify",{Title="nob",Text="Chatter "..tostring(chattersgui),Duration=3})
elseif key == "keypadthree" then
domovement = not domovement
FireClient(InputRemote,plr,"Notify",{Title="nob",Text="Do Movement set to "..tostring(domovement),Duration=3})
elseif key == "keypadfour" then
pcall(function()
antirrt = not antirrt
mmodel:Destroy()
effectmodel:Destroy()
end)
FireClient(InputRemote,plr,"Notify",{Title="nob",Text="Anti-RRT set to "..tostring(antirrt),Duration=3})
end
end
end))
Add(Mouse.KeyUp:connect(function(key)
if disabled == false 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=="space" and flying == true then
fspace=false
elseif key=="g" and flying == true then
dspace=false
end
end
end))