-- [[ SETUP ]] --
local mhit
local mtarg
local db = false
local mode = "Malicious"
local modecol = Color3.new(199, 0, 0)
local railcannon = Instance.new("Tool", owner.Backpack)
railcannon.Name = "kiryugun"
railcannon.ToolTip = "AAAAAAAAA"
railcannon.Grip = CFrame.new(.500001907, -.600000381, .700000763, 1, 1.12690294e-07, -4.17231718e-07, -1.12690124e-07, 1, 4.02330357e-07, 4.17231774e-07, -4.02330301e-07, 1)
local h = Instance.new("SpawnLocation", railcannon)
h.Name = "Handle"
h.Enabled = false
h.Size = Vector3.new(.5, 2, 5)
local msh = Instance.new("SpecialMesh", h)
msh.MeshId = "rbxassetid://4617492483"
msh.TextureId = "rbxassetid://4617493396"
msh.Scale = Vector3.new(.1, .1, .1)
local peat = Instance.new("Attachment", h)
peat.Position = Vector3.new(0, 0, -2.1)
peat.Orientation = Vector3.new(-90, 0, 0)
local pe = Instance.new("ParticleEmitter", peat)
pe.Color = ColorSequence.new(modecol)
pe.LightEmission = 1
pe.Texture = "rbxassetid://3959152627"
pe.Transparency = NumberSequence.new(.89, 1)
pe.Size = NumberSequence.new(.273, .71)
pe.Brightness = 5
pe.Lifetime = NumberRange.new(.2, .3)
pe.LockedToPart = true
pe.Enabled = false
pe.Speed = NumberRange.new(5, 7)
pe.SpreadAngle = Vector2.new(60, 60)
pe.VelocitySpread = 60
local fire = Instance.new("Sound", h)
fire.SoundId = "rbxassetid://5103787913"
local switch = Instance.new("Sound", h)
switch.SoundId = "rbxassetid://203827863"
local charged = Instance.new("Sound", h)
charged.SoundId = "rbxassetid://9119780756"
charged.Volume = 1
charged.Looped = true
charged:Play()
local recharge = Instance.new("Sound", h)
recharge.SoundId = "rbxassetid://1905343596"
local pl = Instance.new("PointLight", h)
pl.Brightness = 15
pl.Range = 5
pl.Color = modecol
pl.Shadows = true
pl.Enabled = true
local re = Instance.new("RemoteEvent", owner.PlayerGui)
re.Name = "Event"
-- [[ FUNCTIONS AND EVENTS ]] --
local function update()
pe.Color = ColorSequence.new(modecol)
pl.Color = modecol
end
local function findhum(p)
if p:FindFirstAncestorOfClass("Model", true) and p:FindFirstAncestorOfClass("Model", true):FindFirstChildOfClass("Humanoid") then
return p:FindFirstAncestorOfClass("Model", true):FindFirstChildOfClass("Humanoid")
else
return false
end
end
local function elecf(t, hit)
local h = findhum(t)
if h then
h.Health -= 97
end
end
local function malf(hit)
local p = Instance.new("SpawnLocation", script)
p.Shape = "Ball"
p.CanCollide = false
p.CanTouch = false
p.CanQuery = false
p.Massless = true
p.Enabled = false
p.Position = hit.Position
p.Color = Color3.new(1, .290196, .164706)
p.Material = Enum.Material.Neon
p.Anchored = true
p.Transparency = .25
p.CastShadow = false
local pl = Instance.new("PointLight", p)
pl.Range = 20
pl.Brightness = 2
pl.Color = p.Color
game:GetService("TweenService"):Create(p, TweenInfo.new(1), {Size = Vector3.new(40, 40, 40)}):Play()
game:GetService("TweenService"):Create(p, TweenInfo.new(1.5), {Transparency = 1}):Play()
game:GetService("TweenService"):Create(pl, TweenInfo.new(1.5), {Brightness = 0}):Play()
local hums = {}
local exp = Instance.new("Explosion", script)
exp.Visible = false
exp.DestroyJointRadiusPercent = 0
exp.Position = hit.Position
exp.BlastRadius = 20
exp.Hit:Connect(function(t2)
local h = findhum(t2)
if h and not table.find(hums, h) and h ~= owner.Character.Humanoid then
table.insert(hums, h)
h.Health -= 80
end
end)
end
local function screwf(t, hit, at)
local h = findhum(t)
if h then
h.Health -= 60
local screw = Instance.new("SpawnLocation", target)
screw.Size = Vector3.new(.8, .8, 3)
screw.Color = Color3.new()
screw.CFrame = hit
screw.CanCollide = false
screw.CanQuery = false
screw.CanTouch = false
screw.Massless = true
at.Parent = screw
local weld = Instance.new("WeldConstraint", screw)
weld.Part0 = t
weld.Part1 = screw
local snd = Instance.new("Sound",screw)
snd.SoundId = "rbxassetid://9100684862"
snd.Looped = true
snd:Play()
local echo = Instance.new("EchoSoundEffect", snd)
echo.Delay = .1
local equalizer = Instance.new("EqualizerSoundEffect", snd)
equalizer.HighGain = 10
equalizer.LowGain = 0
equalizer.MidGain = 10
local pitchshift = Instance.new("PitchShiftSoundEffect", snd)
pitchshift.Octave = 1
game:GetService("TweenService"):Create(pitchshift, TweenInfo.new(3), {Octave = 1.05}):Play()
local blood = Instance.new("ParticleEmitter", at)
blood.Name = "Blood"
blood.Speed = NumberRange.new(8, 18)
blood.Orientation = "VelocityParallel"
blood.Rotation = NumberRange.new(90, 90)
blood.Color = ColorSequence.new(Color3.new(.937255, .067, .067), Color3.new(.69, .039, .039), Color3.new(.65, .043, .043))
blood.LightEmission = 0
blood.LightInfluence = 0
blood.Texture = "rbxassetid://419625073"
blood.Transparency = NumberSequence.new(0, .67, .76)
blood.ZOffset = -1
blood.Size = NumberSequence.new(0, 1.5, 0)
blood.Acceleration = Vector3.new(0, -35, 0)
blood.Lifetime = NumberRange.new(.35, .8)
blood.LockedToPart = false
blood.Rate = 1000
blood.RotSpeed = NumberRange.new(-5, 5)
blood.SpreadAngle = Vector2.new(360, -360)
blood.VelocityInheritance = .15
blood.VelocitySpread = 360
blood:Clone().Parent = at
blood:Clone().Parent = at
task.spawn(function()
for i = 1, 200 do
task.wait(.05)
h.Health -= 1
end
screw:Destroy()
end)
end
end
railcannon.Unequipped:Connect(function()
charged:Stop()
re:FireClient(owner, "Unequipped")
end)
railcannon.Equipped:Connect(function()
switch:Play()
if db == false then
charged:Play()
end
re:FireClient(owner, "Equipped")
end)
re.OnServerEvent:Connect(function(plr, what, args)
if what == "SwitchModes" then
if mode == "Electric" then
mode = "Screwdriver"
modecol = Color3.new(.333333, 1, 0)
fire.SoundId = "rbxassetid://6840484819"
elseif mode == "Screwdriver" then
mode = "Malicious"
modecol = Color3.new(1, 0, 0)
fire.SoundId = "rbxassetid://6738503253"
elseif mode == "Malicious" then
mode = "Electric"
modecol = Color3.new(0, .666667, 1)
fire.SoundId = "rbxassetid://6840484819"
end
update()
switch:Play()
elseif what == "UpdateMouse" then
mhit = args.MouseHit
mtarg = args.MouseTarget
end
end)
railcannon.Activated:Connect(function()
if db == true then
return
end
db = true
pl.Enabled = false
charged:Stop()
task.delay(.1, function()
db = false
recharge:Play()
charged:Play()
pl.Enabled = true
end)
fire.TimePosition = 0
fire:Play()
local at0 = peat:Clone()
at0.Parent = workspace.Terrain
at0.WorldPosition = peat.WorldPosition
local at1 = Instance.new("Attachment", workspace.Terrain)
at1.WorldPosition = mhit.Position
local beam = Instance.new("Beam", at1)
beam.Attachment0 = at0
beam.Attachment1 = at1
beam.Brightness = 15
beam.Width0 = 12
beam.Width1 = 12
beam.Color = ColorSequence.new(modecol)
beam.Texture = "rbxassetid://7127214493"
game:GetService("TweenService"):Create(beam, TweenInfo.new(.5), {Width0 = 0}):Play()
game:GetService("TweenService"):Create(beam, TweenInfo.new(.5), {Width1 = 0}):Play()
pe:Emit(1000)
game:GetService("Debris"):AddItem(at1, 1)
if mode == "Malicious" then
malf(mhit)
end
if mtarg then
if mode == "Electric" then
elecf(mtarg, mhit)
elseif mode == "Screwdriver" then
screwf(mtarg, mhit, at1)
end
end
end)
-- [[ LOCALSCRIPT ]] --
NLS([[
local re = script.Parent
local owner = game:GetService("Players").LocalPlayer
local m = game:GetService("Players").LocalPlayer:GetMouse()
local eq = false
local uneqt = false
m.KeyDown:Connect(function(k)
if k == "e" then
re:FireServer("SwitchModes")
end
end)
game:GetService("RunService").RenderStepped:Connect(function()
re:FireServer("UpdateMouse", {
["MouseHit"] = m.Hit,
["MouseTarget"] = m.Target
})
if eq then
uneqt = false
if owner.Character and owner.Character:FindFirstChild("Torso") then
local rs = owner.Character.Torso:WaitForChild("Right Shoulder")
local x = -(math.asin((m.Origin.Position - m.Hit.Position).Unit.Y))
local _, y, z = rs.C0:ToEulerAnglesXYZ()
rs.C0 = CFrame.new(rs.C0.Position) * CFrame.Angles(x, y, z)
end
owner.Character.HumanoidRootPart.CFrame = (CFrame.new(owner.Character.HumanoidRootPart.CFrame.Position, Vector3.new(m.Hit.Position.X, owner.Character.HumanoidRootPart.CFrame.Position.Y, m.Hit.Z)))
elseif not uneqt then
uneqt = true
local rs = owner.Character:WaitForChild("Torso"):WaitForChild("Right Shoulder")
rs.C0 = CFrame.new(1, .5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
end
end)
re.OnClientEvent:Connect(function(dt)
if dt == "Equipped" then
eq = true
elseif dt == "Unequipped" then
eq = false
end
end)
]], re)
-- [[ SETUP ]] --
local mhit
local mtarg
local db = false
local mode = "Screwdriver"
local modecol = Color3.new(0, 0, 199)
local railcannon = Instance.new("Tool", owner.Backpack)
railcannon.Name = "Sans"
railcannon.ToolTip = "ive got a bone to pick with you kiddo"
railcannon.Grip = CFrame.new(.500001907, -.600000381, .700000763, 1, 1.12690294e-07, -4.17231718e-07, -1.12690124e-07, 1, 4.02330357e-07, 4.17231774e-07, -4.02330301e-07, 1)
local h = Instance.new("SpawnLocation", railcannon)
h.Name = "Handle"
h.Enabled = false
h.Size = Vector3.new(.5, 2, 5)
local msh = Instance.new("SpecialMesh", h)
msh.MeshId = "rbxassetid://430073345"
msh.TextureId = "rbxassetid://430073362"
msh.Scale = Vector3.new(1, 1, 1)
local peat = Instance.new("Attachment", h)
peat.Position = Vector3.new(0, 0, -2.1)
peat.Orientation = Vector3.new(-90, 0, 0)
local pe = Instance.new("ParticleEmitter", peat)
pe.Color = ColorSequence.new(modecol)
pe.LightEmission = 1
pe.Texture = "rbxassetid://3959152627"
pe.Transparency = NumberSequence.new(.89, 1)
pe.Size = NumberSequence.new(.273, .71)
pe.Brightness = 5
pe.Lifetime = NumberRange.new(.2, .3)
pe.LockedToPart = true
pe.Enabled = false
pe.Speed = NumberRange.new(5, 7)
pe.SpreadAngle = Vector2.new(60, 60)
pe.VelocitySpread = 60
local fire = Instance.new("Sound", h)
fire.SoundId = "rbxassetid://345052019"
local switch = Instance.new("Sound", h)
switch.SoundId = "rbxassetid://203827863"
local charged = Instance.new("Sound", h)
charged.SoundId = "rbxassetid://5416548293"
charged.Volume = 1
charged.Looped = true
charged:Play()
local recharge = Instance.new("Sound", h)
recharge.SoundId = "rbxassetid://5008997031"
local pl = Instance.new("PointLight", h)
pl.Brightness = 15
pl.Range = 5
pl.Color = modecol
pl.Shadows = true
pl.Enabled = true
local re = Instance.new("RemoteEvent", owner.PlayerGui)
re.Name = "Event"
-- [[ FUNCTIONS AND EVENTS ]] --
local function update()
pe.Color = ColorSequence.new(modecol)
pl.Color = modecol
end
local function findhum(p)
if p:FindFirstAncestorOfClass("Model", true) and p:FindFirstAncestorOfClass("Model", true):FindFirstChildOfClass("Humanoid") then
return p:FindFirstAncestorOfClass("Model", true):FindFirstChildOfClass("Humanoid")
else
return false
end
end
local function elecf(t, hit)
local h = findhum(t)
if h then
h.Health -= 85
end
end
local function malf(hit)
local p = Instance.new("SpawnLocation", script)
p.Shape = "Ball"
p.CanCollide = false
p.CanTouch = false
p.CanQuery = false
p.Massless = true
p.Enabled = false
p.Position = hit.Position
p.Color = Color3.new(1, .290196, .164706)
p.Material = Enum.Material.Neon
p.Anchored = true
p.Transparency = .25
p.CastShadow = false
local pl = Instance.new("PointLight", p)
pl.Range = 20
pl.Brightness = 2
pl.Color = p.Color
game:GetService("TweenService"):Create(p, TweenInfo.new(1), {Size = Vector3.new(40, 40, 40)}):Play()
game:GetService("TweenService"):Create(p, TweenInfo.new(1.5), {Transparency = 1}):Play()
game:GetService("TweenService"):Create(pl, TweenInfo.new(1.5), {Brightness = 0}):Play()
local hums = {}
local exp = Instance.new("Explosion", script)
exp.Visible = false
exp.DestroyJointRadiusPercent = 0
exp.Position = hit.Position
exp.BlastRadius = 20
exp.Hit:Connect(function(t2)
local h = findhum(t2)
if h and not table.find(hums, h) and h ~= owner.Character.Humanoid then
table.insert(hums, h)
h.Health -= 80
end
end)
end
local function screwf(t, hit, at)
local h = findhum(t)
if h then
h.Health -= 60
local screw = Instance.new("SpawnLocation", target)
screw.Size = Vector3.new(.8, .8, 3)
screw.Color = Color3.new()
screw.CFrame = hit
screw.CanCollide = false
screw.CanQuery = false
screw.CanTouch = false
screw.Massless = true
at.Parent = screw
local weld = Instance.new("WeldConstraint", screw)
weld.Part0 = t
weld.Part1 = screw
local snd = Instance.new("Sound",screw)
snd.SoundId = "rbxassetid://9100684862"
snd.Looped = true
snd:Play()
local echo = Instance.new("EchoSoundEffect", snd)
echo.Delay = .1
local equalizer = Instance.new("EqualizerSoundEffect", snd)
equalizer.HighGain = 10
equalizer.LowGain = 0
equalizer.MidGain = 10
local pitchshift = Instance.new("PitchShiftSoundEffect", snd)
pitchshift.Octave = 1
game:GetService("TweenService"):Create(pitchshift, TweenInfo.new(3), {Octave = 1.05}):Play()
local blood = Instance.new("ParticleEmitter", at)
blood.Name = "Blood"
blood.Speed = NumberRange.new(8, 18)
blood.Orientation = "VelocityParallel"
blood.Rotation = NumberRange.new(90, 90)
blood.Color = ColorSequence.new(Color3.new(.937255, .067, .067), Color3.new(.69, .039, .039), Color3.new(.65, .043, .043))
blood.LightEmission = 0
blood.LightInfluence = 0
blood.Texture = "rbxassetid://419625073"
blood.Transparency = NumberSequence.new(0, .67, .76)
blood.ZOffset = -1
blood.Size = NumberSequence.new(0, 1.5, 0)
blood.Acceleration = Vector3.new(0, -35, 0)
blood.Lifetime = NumberRange.new(.35, .8)
blood.LockedToPart = false
blood.Rate = 1000
blood.RotSpeed = NumberRange.new(-5, 5)
blood.SpreadAngle = Vector2.new(360, -360)
blood.VelocityInheritance = .15
blood.VelocitySpread = 360
blood:Clone().Parent = at
blood:Clone().Parent = at
task.spawn(function()
for i = 1, 200 do
task.wait(.05)
h.Health -= 1
end
screw:Destroy()
end)
end
end
railcannon.Unequipped:Connect(function()
charged:Stop()
re:FireClient(owner, "Unequipped")
end)
railcannon.Equipped:Connect(function()
switch:Play()
if db == false then
charged:Play()
end
re:FireClient(owner, "Equipped")
end)
re.OnServerEvent:Connect(function(plr, what, args)
if what == "SwitchModes" then
if mode == "Electric" then
mode = "Screwdriver"
modecol = Color3.new(.333333, 1, 0)
fire.SoundId = "rbxassetid://6840484819"
elseif mode == "Screwdriver" then
mode = "Malicious"
modecol = Color3.new(1, 0, 0)
fire.SoundId = "rbxassetid://6738503253"
elseif mode == "Malicious" then
mode = "Electric"
modecol = Color3.new(0, .666667, 1)
fire.SoundId = "rbxassetid://6840484819"
end
update()
switch:Play()
elseif what == "UpdateMouse" then
mhit = args.MouseHit
mtarg = args.MouseTarget
end
end)
railcannon.Activated:Connect(function()
if db == true then
return
end
db = true
pl.Enabled = false
charged:Stop()
task.delay(.1, function()
db = false
recharge:Play()
charged:Play()
pl.Enabled = true
end)
fire.TimePosition = 0
fire:Play()
local at0 = peat:Clone()
at0.Parent = workspace.Terrain
at0.WorldPosition = peat.WorldPosition
local at1 = Instance.new("Attachment", workspace.Terrain)
at1.WorldPosition = mhit.Position
local beam = Instance.new("Beam", at1)
beam.Attachment0 = at0
beam.Attachment1 = at1
beam.Brightness = 15
beam.Width0 = 12
beam.Width1 = 12
beam.Color = ColorSequence.new(modecol)
beam.Texture = "rbxassetid://7127214493"
game:GetService("TweenService"):Create(beam, TweenInfo.new(.5), {Width0 = 0}):Play()
game:GetService("TweenService"):Create(beam, TweenInfo.new(.5), {Width1 = 0}):Play()
pe:Emit(1000)
game:GetService("Debris"):AddItem(at1, 1)
if mode == "Malicious" then
malf(mhit)
end
if mtarg then
if mode == "Electric" then
elecf(mtarg, mhit)
elseif mode == "Screwdriver" then
screwf(mtarg, mhit, at1)
end
end
end)
-- [[ LOCALSCRIPT ]] --
NLS([[
local re = script.Parent
local owner = game:GetService("Players").LocalPlayer
local m = game:GetService("Players").LocalPlayer:GetMouse()
local eq = false
local uneqt = false
m.KeyDown:Connect(function(k)
if k == "e" then
re:FireServer("SwitchModes")
end
end)
game:GetService("RunService").RenderStepped:Connect(function()
re:FireServer("UpdateMouse", {
["MouseHit"] = m.Hit,
["MouseTarget"] = m.Target
})
if eq then
uneqt = false
if owner.Character and owner.Character:FindFirstChild("Torso") then
local rs = owner.Character.Torso:WaitForChild("Right Shoulder")
local x = -(math.asin((m.Origin.Position - m.Hit.Position).Unit.Y))
local _, y, z = rs.C0:ToEulerAnglesXYZ()
rs.C0 = CFrame.new(rs.C0.Position) * CFrame.Angles(x, y, z)
end
owner.Character.HumanoidRootPart.CFrame = (CFrame.new(owner.Character.HumanoidRootPart.CFrame.Position, Vector3.new(m.Hit.Position.X, owner.Character.HumanoidRootPart.CFrame.Position.Y, m.Hit.Z)))
elseif not uneqt then
uneqt = true
local rs = owner.Character:WaitForChild("Torso"):WaitForChild("Right Shoulder")
rs.C0 = CFrame.new(1, .5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
end
end)
re.OnClientEvent:Connect(function(dt)
if dt == "Equipped" then
eq = true
elseif dt == "Unequipped" then
eq = false
end
end)
]], re)