Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("made by vlad20020 ok")
- local rem = Instance.new("RemoteEvent",owner.PlayerGui)
- rem.Name = "OwO"
- local client = NLS([[
- local tweens = game:GetService("TweenService")
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- local deb = false
- local coolDownTime = .35
- local keyDown = false
- local rage = false
- local directions = {In = Enum.EasingDirection.In,
- Out = Enum.EasingDirection.Out,
- InOut = Enum.EasingDirection.InOut
- }
- local styles = {Linear = Enum.EasingStyle.Linear,
- Back = Enum.EasingStyle.Back,
- Bounce = Enum.EasingStyle.Bounce,
- Sine = Enum.EasingStyle.Sine,
- Quad = Enum.EasingStyle.Quad,
- Elastic = Enum.EasingStyle.Elastic,
- Quart = Enum.EasingStyle.Quart,
- Quint = Enum.EasingStyle.Quint
- }
- local ins = Instance.new
- local v3 = Vector3.new
- local cf = CFrame.new
- local angles = CFrame.Angles
- local rad = math.rad
- local huge = math.huge
- local cos = math.cos
- local sin = math.sin
- local tan = math.tan
- local ray = Ray.new
- local random = math.random
- local ud = UDim.new
- local ud2 = UDim2.new
- local c3 = Color3.new
- local rgb = Color3.fromRGB
- local bc = BrickColor.new
- local rem = plr.PlayerGui:WaitForChild("OwO")
- local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
- local info = TweenInfo.new(
- leinght,
- easingstyle,
- easingdirec,
- 0,
- false,
- 0
- )
- local lerp = tweens:Create(part,info,tablee)
- lerp:Play()
- end
- function remove(instance,time)
- game:GetService("Debris"):AddItem(instance,time)
- end
- function removeWithFade(instance,time)
- game:GetService("Debris"):AddItem(instance,time+3.5)
- coroutine.resume(coroutine.create(function()
- wait(time)
- tlerp(instance,{Transparency = 1},2.5,styles.Linear,directions.In)
- end))
- end
- rem.OnClientEvent:Connect(function(type,part)
- if type == "floatPart" then
- local vel = ins("BodyVelocity",part)
- vel.MaxForce = v3(huge,huge,huge)
- vel.Velocity = v3(random(-1,1),random(-1,1),random(-1,1)) * (part.Size*v3(1,1,1)).Magnitude
- vel.P = huge
- end
- end)
- mouse.KeyDown:Connect(function(key)
- if key == "f" then
- rem:FireServer("toggleLaser")
- end
- if plr.UserId == 155304432 then
- if key == "y" and not rage then
- rage = true
- rem:FireServer("rage")
- elseif key == "y" and rage then
- rage = false
- rem:FireServer("rage")
- end
- end
- if key == "t" then
- rem:FireServer("vapourise")
- end
- end)
- mouse.Button1Down:Connect(function()
- keyDown = true
- repeat
- if not deb then
- deb = true
- rem:FireServer("fire",mouse.Hit.p)
- wait(coolDownTime)
- deb = false
- end
- wait()
- until not keyDown
- end)
- mouse.Button1Up:Connect(function()
- keyDown = false
- end)
- while true do
- if rage then
- coolDownTime = .1
- else
- coolDownTime = .35
- end
- local cf = CFrame.new(owner.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.x,mouse.Hit.y,mouse.Hit.z))
- local n = cf.LookVector*owner.Character.HumanoidRootPart.CFrame.RightVector
- local rot = n.z+n.x
- rem:FireServer("follow",cf.LookVector,rot)
- wait()
- end
- while true do
- for i,v in ipairs(owner.Character:WaitForChild("Ignore"):GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") then
- v.LocalTransparencyModifier = v.Transparency
- end
- end
- for i,v in ipairs(owner.Character:WaitForChild("Gun"):GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") then
- v.LocalTransparencyModifier = v.Transparency
- end
- end
- game:GetService("RunService").RenderStepped:Wait()
- end
- ]],owner.PlayerGui)
- local tweens = game:GetService("TweenService")
- --BasicFunctions
- local ins = Instance.new
- local v3 = Vector3.new
- local cf = CFrame.new
- local angles = CFrame.Angles
- local rad = math.rad
- local huge = math.huge
- local cos = math.cos
- local sin = math.sin
- local tan = math.tan
- local ray = Ray.new
- local random = math.random
- local ud = UDim.new
- local ud2 = UDim2.new
- local c3 = Color3.new
- local rgb = Color3.fromRGB
- local bc = BrickColor.new
- local plr = owner
- local char = plr.Character
- local h = char.Head
- local t = char.Torso
- local ra = char["Right Arm"]
- local la = char["Left Arm"]
- local rl = char["Right Leg"]
- local ll = char["Left Leg"]
- local rut = char.HumanoidRootPart
- local hum = char:FindFirstChildOfClass("Humanoid")
- local nec = t.Neck
- local rutj = rut.RootJoint
- local rs = t["Right Shoulder"]
- local ls = t["Left Shoulder"]
- local rh = t["Right Hip"]
- local lh = t["Left Hip"]
- local startPoint = h
- local laser = false
- local rage = false
- local vapouriseModel = false
- local gunScale = (t.Size.y/2) * 2
- local partDamage = .55 * gunScale
- local drop = .025
- local bulletSize = 50 * (1+gunScale/2)
- local animtime = .25
- local maxdistance = 1500
- local XYSize = .15 * gunScale
- local XYSizeSparks = .025
- local impactCoolingTime = 2 * (1+gunScale/2)
- local impactXZ = XYSize+(XYSize/7.5)
- local angle = 0
- local laserRange = .75 * gunScale
- local fireSound = 2329791773 --131164846
- local starterColor = bc("Daisy orange").Color
- local starterMaterial = "Neon"
- local cs = {
- color = starterColor,
- material = starterMaterial,
- transparency = .5,
- impactcolor = bc("Really black").Color,
- impactMaterial = "SmoothPlastic",
- impactBloodColor = bc("Maroon").Color,
- laserColor = bc("Really red").Color,
- laserMaterial = "Neon"
- }
- local specialSounds = {
- vapourise = 1842430222
- }
- --Tweening styles and directions
- local directions = {In = Enum.EasingDirection.In,
- Out = Enum.EasingDirection.Out,
- InOut = Enum.EasingDirection.InOut
- }
- local styles = {Linear = Enum.EasingStyle.Linear,
- Back = Enum.EasingStyle.Back,
- Bounce = Enum.EasingStyle.Bounce,
- Sine = Enum.EasingStyle.Sine,
- Quad = Enum.EasingStyle.Quad,
- Elastic = Enum.EasingStyle.Elastic,
- Quart = Enum.EasingStyle.Quart,
- Quint = Enum.EasingStyle.Quint
- }
- local ignoremodel = ins("Model",char)
- ignoremodel.Name = "Ignore"
- local gunModel = ins("Model",char)
- gunModel.Name = "Gun"
- local handle = ins("Part",gunModel)
- handle.Locked = true
- handle.CanCollide = false
- handle.Massless = true
- handle.Material = "SmoothPlastic"
- handle.Size = v3(.2,.7,.5) * gunScale
- handle.Color = bc("Black").Color
- local handleWeld = ins("Weld",ra)
- handleWeld.Part0 = ra
- handleWeld.Part1 = handle
- handleWeld.C0 = cf(0,(-ra.Size.y/2) * (1+gunScale/10),0) * angles(rad(-100),0,0)
- local part = ins("Part",gunModel)
- part.Locked = true
- part.CanCollide = false
- part.Massless = true
- part.Material = "SmoothPlastic"
- part.Size = v3(.2,.15,1.25) * gunScale
- part.Color = bc("Black").Color
- local partWeld = ins("Weld",part)
- partWeld.Part0 = handle
- partWeld.Part1 = part
- partWeld.C0 = cf(0,(handle.Size.y/2)+(part.Size.y/2),-part.Size.z/4.15) * angles(rad(10),0,0)
- local sliderPointPart = part
- local slider = ins("Part",gunModel)
- slider.Locked = true
- slider.CanCollide = false
- slider.Massless = true
- slider.Material = "SmoothPlastic"
- slider.Size = v3(.2,.2,1.25) * gunScale
- slider.Color = c3(.085,.085,.085)
- local sliderWeld = ins("Weld",slider)
- sliderWeld.Part0 = sliderPointPart
- sliderWeld.Part1 = slider
- sliderWeld.C0 = cf(0,(sliderPointPart.Size.y/2)+(slider.Size.y/2),0)
- local part = ins("Part",gunModel)
- part.Shape = "Cylinder"
- part.Locked = true
- part.Massless = true
- part.CanCollide = false
- part.Material = "Metal"
- part.Size = v3(1.15,.115,.115) * gunScale
- part.Color = c3(0,0,0)
- local partWeld = ins("Weld",part)
- partWeld.Part0 = sliderPointPart
- partWeld.Part1 = part
- partWeld.C0 = cf(0,(sliderPointPart.Size.y/2)+(part.Size.y/1.5),-part.Size.z/2) * angles(rad(90),0,rad(90))
- startPoint = part
- local armWeld = ins("Weld",t)
- armWeld.Part0 = t
- armWeld.Part1 = ra
- armWeld.C0 = cf((t.Size.x/2)+t.Size.x/4,t.Size.y/4,0)
- armWeld.C1 = cf(0,ra.Size.y/4,0)
- local neckWeld = ins("Weld",t)
- neckWeld.Part0 = t
- neckWeld.Part1 = h
- neckWeld.C0 = cf(0,t.Size.y/2,0)
- neckWeld.C1 = cf(0,-h.Size.y/2,0)
- local armWeldC0 = armWeld.C0
- local neckWeldC0 = neckWeld.C0
- rs.Parent = nil
- nec.Parent = nil
- function sound(id,vol,pitch,parent,maxdist)
- pcall(function()
- local mdist = 30 or maxdist
- local newsound = Instance.new("Sound",parent)
- newsound.EmitterSize = mdist
- newsound.Volume = vol
- newsound.SoundId = "rbxassetid://"..id
- newsound.Pitch = pitch
- newsound:Play()
- coroutine.resume(coroutine.create(function()
- wait(.1)
- remove(newsound,newsound.TimeLength/newsound.Pitch)
- end))
- return newsound
- end)
- end
- function placeSoundPart(rcf,id,vol,pitch,maxdist)
- pcall(function()
- local mdist = 30 or maxdist
- local spart = ins("Part",ignoremodel)
- spart.Anchored = true
- spart.CanCollide = false
- spart.Locked = true
- spart.Transparency = 1
- spart.CFrame = rcf
- local ssound = sound(id,vol,pitch,spart,mdist)
- remove(spart,10)
- end)
- end
- function placeSoundPartWithSpecialSound(rcf,place,vol,maxdist)
- pcall(function()
- local mdist = 30 or maxdist
- local spart = ins("Part",ignoremodel)
- spart.Anchored = true
- spart.CanCollide = false
- spart.Locked = true
- spart.Transparency = 1
- spart.CFrame = rcf
- local soud = ins("Sound",spart)
- soud.Volume = vol
- soud.Pitch = 1
- soud.EmitterSize = mdist
- soud.SoundId = "rbxassetid://"..place
- if place == 1842430222 then
- soud.TimePosition = 4.5
- soud:Play()
- remove(spart,10)
- end
- end)
- end
- local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
- local info = TweenInfo.new(
- leinght,
- easingstyle,
- easingdirec,
- 0,
- false,
- 0
- )
- local lerp = tweens:Create(part,info,tablee)
- lerp:Play()
- end
- function remove(instance,time)
- game:GetService("Debris"):AddItem(instance,time)
- end
- function removeWithFade(instance,time)
- game:GetService("Debris"):AddItem(instance,time+3.5)
- coroutine.resume(coroutine.create(function()
- wait(time)
- tlerp(instance,{Transparency = 1},2.5,styles.Linear,directions.In)
- end))
- end
- function swait()
- game:GetService("RunService").Stepped:Wait()
- end
- function rayc(spos,direc,ignore,dist)
- local rai = ray(spos,direc.Unit * dist)
- local rhit,rpos,rrot = workspace:FindPartOnRayWithIgnoreList(rai,ignore,false,false)
- return rhit,rpos,rrot
- end
- function createweld(part1,part2,v3c0,v3c1)
- local att1 = ins("Attachment",part1)
- local att2 = ins("Attachment",part2)
- att1.Position = v3c0
- att2.Position = v3c1
- local con = ins("BallSocketConstraint",part1)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- att1.Name = "dontremove"
- att2.Name = "dontremove"
- con.Name = "dontremove"
- return {att0 = att1,att1 = att2,constraint = con}
- end
- function createglue(parent1,parent2,name,part0,part1,c0,c1)
- pcall(function()
- local att1 = ins("Attachment")
- local att2 = ins("Attachment")
- local socket = ins("BallSocketConstraint")
- att1.Parent = parent1
- att2.Parent = parent2
- socket.Attachment0 = att1
- socket.Attachment1 = att2
- att1.Position = c0
- att2.Position = c1
- socket.Name = "dontremove"
- att1.Name = "dontremove"
- att2.Name = "dontremove"
- socket.Parent = parent2
- return socket
- end)
- end
- function createhitbox(part,parent)
- pcall(function()
- local hbpart = ins("Part")
- hbpart.Name = "HitboxRagdoll"
- hbpart.Locked = true
- hbpart.Transparency = 1
- hbpart.TopSurface = "Smooth"
- hbpart.BottomSurface = "Smooth"
- hbpart.Material = "Ice"
- if part.Name ~= "Head" then
- hbpart.Size = v3(part.Size.x/1.35,part.Size.y/1.2,part.Size.z/1.35)
- hbpart.CFrame = part.CFrame
- local att1 = ins("Attachment",part)
- local att2 = ins("Attachment",hbpart)
- att1.Position = v3(0,-part.Size.y/10,0)
- local con = ins("BallSocketConstraint",part)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- else
- hbpart.Size = v3(part.Size.x,part.Size.y/2,part.Size.z)
- hbpart.CFrame = part.CFrame
- local att1 = ins("Attachment",part)
- local att2 = ins("Attachment",hbpart)
- local con = ins("BallSocketConstraint",part)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- end
- hbpart:BreakJoints()
- hbpart.Parent = parent
- end)
- end
- function createhitboxr15(part,parent)
- pcall(function()
- part.Transparency = .5
- local hbpart = ins("Part")
- hbpart.Name = "HitboxRagdoll"
- hbpart.Locked = true
- hbpart.Transparency = 0
- hbpart.TopSurface = "Smooth"
- hbpart.BottomSurface = "Smooth"
- hbpart.Material = "Ice"
- if part.Name ~= "Head" then
- hbpart.Size = v3(part.Size.x/1.35,part.Size.y/4,part.Size.z/1.35)
- hbpart.CFrame = part.CFrame
- local att1 = ins("Attachment",part)
- local att2 = ins("Attachment",hbpart)
- local con = ins("BallSocketConstraint",part)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- else
- hbpart.Size = v3(part.Size.x,part.Size.y/2,part.Size.z)
- hbpart.CFrame = part.CFrame
- local att1 = ins("Attachment",part)
- local att2 = ins("Attachment",hbpart)
- local con = ins("BallSocketConstraint",part)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- end
- hbpart:BreakJoints()
- hbpart.Parent = parent
- end)
- end
- function paralizer6(type,who,huma,rip)
- pcall(function()
- if type == "body" then
- local torso = who:FindFirstChild("Torso")
- local righta = who:FindFirstChild("Right Arm")
- local lefta = who:FindFirstChild("Left Arm")
- local rightl = who:FindFirstChild("Right Leg")
- local leftl = who:FindFirstChild("Left Leg")
- local head = who:FindFirstChild("Head")
- local tag = ins("Glue",who) tag.Name = "deletmepls"
- if torso then
- local root = who:FindFirstChild("HumanoidRootPart")
- if root then
- root:Destroy()
- end
- huma.PlatformStand = true
- if head then
- if head:FindFirstChild("Ripped") then
- return
- end
- head:BreakJoints()
- head.Anchored = false
- createhitbox(head,torso)
- createglue(torso,head,"paralized",torso,leftl,v3(0,torso.Size.y/2,0),v3(0,-head.Size.y/2,0))
- head.TopSurface = "Smooth"
- head.BottomSurface = "Smooth"
- head:MakeJoints()
- end
- if leftl then
- if not leftl:FindFirstChild("Ripped") then
- leftl:BreakJoints()
- leftl.Anchored = false
- createglue(torso,leftl,"paralized",torso,leftl,v3(-torso.Size.x/4,-torso.Size.y/2,0),v3(0,leftl.Size.y/2,0))
- createhitbox(leftl,torso)
- end
- end
- if rightl then
- if not rightl:FindFirstChild("Ripped") then
- rightl:BreakJoints()
- rightl.Anchored = false
- createglue(torso,rightl,"paralized",torso,rightl,v3(torso.Size.x/4,-torso.Size.y/2,0),v3(0,rightl.Size.y/2,0))
- createhitbox(rightl,torso)
- end
- end
- if righta then
- righta:BreakJoints()
- righta.Anchored = false
- if not righta:FindFirstChild("Ripped") then
- createglue(torso,righta,"paralized",torso,righta,v3(torso.Size.x/2,torso.Size.y/4,0),v3(-righta.Size.x/2,righta.Size.y/4,0))
- end
- createhitbox(righta,torso)
- end
- if lefta then
- lefta:BreakJoints()
- lefta.Anchored = false
- if not lefta:FindFirstChild("Ripped") then
- createglue(torso,lefta,"paralized",torso,lefta,v3(-torso.Size.x/2,torso.Size.y/4,0),v3(lefta.Size.x/2,lefta.Size.y/4,0))
- end
- createhitbox(lefta,torso)
- end
- else
- warn("Cant get the torso")
- end
- end
- end)
- end
- function killr6(who)
- pcall(function()
- local khum = who:FindFirstChildOfClass("Humanoid")
- if khum then
- khum.Health = 0
- khum.Name = "Dead hobo"
- who:BreakJoints()
- local khe = khum.Parent:FindFirstChild("Head")
- if khe.Size.x ~= khe.Size.z then
- khe.Size = v3(khe.Size.z,khe.Size.z,khe.Size.z)
- end
- for i,v in pairs(who:GetDescendants()) do
- if v:IsA("Accessory") or v:IsA("Hat") then
- local att1 = ins("Attachment",khe)
- local att2 = ins("Attachment",v.Handle)
- att1.Position = (v.Handle.Position-khe.Position)
- local con = ins("BallSocketConstraint",khe)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- end
- if v:IsA("Script") or v:IsA("LocalScript") or v.Name == "HitboxRagdoll" or v:IsA("Attachment") and v.Name ~= "dontremove" or v:IsA("BallSocketConstraint") and v.Name ~= "dontremove" then
- remove(v,0)
- end
- if v:IsA("Decal") then
- removeWithFade(v,5)
- end
- if v:IsA("Part") or v:IsA("MeshPart") then
- v.Anchored = false
- v:BreakJoints()
- removeWithFade(v,5)
- end
- end
- paralizer6("body",khum.Parent,khum,riphead)
- end
- end)
- end
- function killr15(who,riphead)
- pcall(function()
- local khum = who:FindFirstChildOfClass("Humanoid")
- if khum then
- local joints = {}
- for i,v in pairs(who:GetDescendants()) do
- if v:IsA("Motor6D") or v:IsA("Motor") then
- if v.Part0 and v.Part1 then
- table.insert(joints,v)
- end
- end
- end
- khum.Health = 0
- khum.Name = "Dead hobo"
- who:BreakJoints()
- local khe = khum.Parent:FindFirstChild("Head")
- if khe.Size.x ~= khe.Size.z then
- khe.Size = v3(khe.Size.z,khe.Size.z,khe.Size.z)
- end
- for i,v in pairs(who:GetDescendants()) do
- if v:IsA("Accessory") or v:IsA("Hat") then
- local att1 = ins("Attachment",khe)
- local att2 = ins("Attachment",v.Handle)
- att1.Position = (v.Handle.Position-khe.Position)
- local con = ins("BallSocketConstraint",khe)
- con.Attachment0 = att1
- con.Attachment1 = att2
- con.LimitsEnabled = true
- con.TwistLimitsEnabled = true
- con.TwistLowerAngle = 0
- con.TwistUpperAngle = 0
- con.UpperAngle = 0
- end
- if v:IsA("Script") or v:IsA("LocalScript") or v.Name == "HitboxRagdoll" or v:IsA("Attachment") and v.Name ~= "dontremove" or v:IsA("BallSocketConstraint") and v.Name ~= "dontremove" then
- remove(v,0)
- end
- if v:IsA("Decal") then
- removeWithFade(v,5)
- end
- if v:IsA("Part") or v:IsA("MeshPart") then
- v.Anchored = false
- v:BreakJoints()
- removeWithFade(v,5)
- end
- end
- for i,v in pairs(joints) do
- createglue(v.Part0,v.Part1,"paralized",v.Part0,v.Part1,v3(v.C0.x,v.C0.y,v.C0.z),v3(v.C1.x,v.C1.y,v.C1.z))
- if not v.Part0.Name == "UpperTorso" or not v.Part1.Name == "UpperTorso" then
- createhitboxr15(v.Part0,v.Part0)
- removeWithFade(v.Part0,5)
- end
- end
- end
- end)
- end
- function dest(hit)
- pcall(function()
- if hit.Name == "Base" or hit.Name == "Baseplate" then
- return
- end
- if hit:IsA("Seat") or hit:IsA("VehicleSeat") then
- hit.Parent = nil
- end
- hit:ClearAllChildren()
- hit:BreakJoints()
- hit.Anchored = false hit.CanCollide = true hit.Parent = ignoremodel
- if laser then
- hit.CanCollide = false
- end
- hit.Name = "Destructed"
- if hit:IsA("UnionOperation") then
- hit.UsePartColor = true
- end
- if laser then
- hit.Color = cs.laserColor
- hit.Material = cs.laserMaterial
- hit.Transparency = 0
- end
- hit.Size = v3(hit.Size.x/2,hit.Size.y/2,hit.Size.z/2)
- hit.CFrame = hit.CFrame * cf(hit.Size.x/2,hit.Size.y/2,hit.Size.z/2)
- local hsize = hit.Size
- local hcf = hit.CFrame
- local partToTakeProps = hit
- local hit = partToTakeProps:Clone() hit.Parent = ignoremodel
- remove(partToTakeProps,0)
- local clone = hit:Clone() clone.Parent = ignoremodel
- local clone1 = hit:Clone() clone1.Parent = ignoremodel
- local clone2 = hit:Clone() clone2.Parent = ignoremodel
- local clone3 = hit:Clone() clone3.Parent = ignoremodel
- local clone4 = hit:Clone() clone4.Parent = ignoremodel
- local clone5 = hit:Clone() clone5.Parent = ignoremodel
- local clone6 = hit:Clone() clone6.Parent = ignoremodel
- clone.CFrame = hit.CFrame * cf(0,-hit.Size.y,0)
- clone1.CFrame = hit.CFrame * cf(-hit.Size.x,-hit.Size.y,0)
- clone2.CFrame = hit.CFrame * cf(-hit.Size.x,0,0)
- clone3.CFrame = hit.CFrame * cf(0,0,-hit.Size.z)
- clone4.CFrame = clone.CFrame * cf(0,0,-clone.Size.z)
- clone5.CFrame = clone1.CFrame * cf(0,0,-clone1.Size.z)
- clone6.CFrame = clone2.CFrame * cf(0,0,-clone2.Size.z)
- local parts = {hit,clone,clone1,clone2,clone3,clone4,clone5,clone6}
- for i,v in pairs(parts) do
- if laser then
- v:SetNetworkOwner(owner)
- rem:FireAllClients("floatPart",v)
- removeWithFade(v,0)
- else
- v:SetNetworkOwner(owner)
- local vel = ins("BodyVelocity",v)
- vel.MaxForce = v3(huge,huge,huge)
- vel.Velocity = v3(random(-1,1),random(-1,1),random(-1,1)) * (v.Size*v3(2.5,2.5,2.5)).Magnitude
- remove(vel,.05)
- removeWithFade(v,random(4,7))
- end
- end
- end)
- end
- function laserVapourise(hit)
- pcall(function()
- if hit.Name == "Base" or hit.Name == "Baseplate" then
- return
- end
- hit:ClearAllChildren()
- hit:BreakJoints()
- hit.Anchored = false
- hit.Parent = ignoremodel
- hit.CanCollide = false
- hit.Name = "Laserd"
- if hit:IsA("UnionOperation") then
- hit.UsePartColor = true
- end
- hit.Color = cs.laserColor
- hit.Material = cs.laserMaterial
- hit.Transparency = 0
- rem:FireAllClients("floatPart",hit)
- removeWithFade(hit,0)
- end)
- end
- function oneStepBullet(pos,direc,size)
- local part = ins("Part",ignoremodel)
- part.Anchored = true
- part.Locked = true
- part.CanCollide = false
- part.Color = cs.color
- part.Material = cs.material
- part.Transparency = cs.transparency
- part.Size = v3(XYSize,XYSize,size)
- part.CFrame = pos
- part.CFrame = cf(part.Position,direc) * cf(0,0,-part.Size.z/2) * angles(rad(-drop),0,0)
- local mesh = ins("SpecialMesh",part)
- mesh.MeshType = "Sphere"
- local endsize = size/10
- local endcf = part.CFrame * cf(0,0,(-part.Size.z/2)+(endsize/2))
- remove(part,animtime)
- tlerp(part,{Size = v3(XYSize/4,XYSize/4,endsize),CFrame = endcf,Transparency = 1},animtime,styles.Linear,directions.Out)
- return part
- end
- function throwDebree(pos,direc,material,color)
- pcall(function()
- local part = ins("Part",ignoremodel)
- part.Size = v3(.45,.45,.45) * XYSize
- part.Material = material
- part.Color = color
- part.CFrame = pos
- part.Transparency = part.Transparency
- part.CanCollide = true
- part.Locked = true
- part.Massless = false
- local vel = ins("BodyVelocity",part)
- vel.MaxForce = v3(huge,huge,huge)
- vel.Velocity = direc * (part.Size*v3(30,30,30)).Magnitude
- remove(vel,.05)
- remove(part,2.5)
- end)
- end
- function spark(pos,direc,size)
- pcall(function()
- local part = ins("Part",ignoremodel)
- part.Anchored = true
- part.Locked = true
- part.CanCollide = false
- part.Color = cs.color
- part.Material = cs.material
- part.Transparency = cs.transparency
- part.Size = v3(XYSizeSparks,XYSizeSparks,size)
- part.CFrame = pos
- part.CFrame = cf(part.Position,direc) * cf(0,0,-part.Size.z/2) * angles(rad(-drop),0,0)
- local mesh = ins("SpecialMesh",part)
- mesh.MeshType = "Sphere"
- local endsize = size/10
- local endcf = part.CFrame * cf(0,0,(-part.Size.z/2)+(endsize/2))
- remove(part,animtime/1.5)
- tlerp(part,{Size = v3(XYSize/4,XYSize/4,endsize),CFrame = endcf,Transparency = 1},animtime/1.5,styles.Linear,directions.Out)
- return part
- end)
- end
- function damage(humanoid,damage)
- pcall(function()
- if humanoid.Health > 500000 then
- effbiggerwithback("Brick",humanoid.Parent:FindFirstChildOfClass("Part").CFrame or humanoid.Parent:FindFirstChildOfClass("MeshPart").CFrame,0,v3(75,75,75),c3(.75,0,0),.75)
- placeSoundPartWithSpecialSound(humanoid.Parent:FindFirstChildOfClass("Part").CFrame or humanoid.Parent:FindFirstChildOfClass("MeshPart").CFrame,specialSounds.vapourise,7.5,50)
- remove(humanoid.Parent,0)
- end
- humanoid.Health = humanoid.Health - (damage*gunScale)*(humanoid.MaxHealth/100)
- end)
- end
- function effbiggerwithback(shape,pos,trans,size,color,time,spread)
- pcall(function()
- local part = ins("Part",ignoremodel)
- part.Size = v3(0,0,0)
- part.CFrame = pos
- part.Transparency = trans
- part.Anchored = true
- part.CanCollide = false
- part.Locked = true
- part.Color = color
- part.Material = "Neon"
- local mesh = ins("SpecialMesh",part)
- mesh.Scale = v3(0,0,0)
- mesh.MeshType = shape
- local spreadcf = cf(0,0,0)
- if spread then
- spreadcf = cf((random(-5,5)/10)*gunScale,(random(-5,5)/10)*gunScale,(random(-5,5)/10)*gunScale)
- end
- coroutine.resume(coroutine.create(function()
- remove(part,time*2)
- tlerp(part,{Transparency = 1,CFrame = pos * spreadcf * angles(rad(random(-180,180)),rad(random(-180,180)),rad(random(-180,180)))},time*2,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- tlerp(mesh,{Scale = size},time,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- wait(.5)
- tlerp(mesh,{Scale = v3(0,0,0)},time,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
- end))
- end)
- end
- function createImpact(part,pos)
- pcall(function()
- if laser then
- effbiggerwithback("Brick",pos,0,(v3(1,1,1)*20)*laserRange,cs.color,.25)
- end
- if laser and vapourise then
- if part.Parent and part.Parent:IsA("Model") then
- for i,v in ipairs(part.Parent:GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") and not v:IsA("ParticleEmitter") and part.Parent ~= workspace and part.Parent ~= char then
- if v.Name ~= "Base" or v.Name ~= "Baseplate" then
- if not v:FindFirstChild("PartHealth") then
- local partHealth = ins("NumberValue",v)
- partHealth.Name = "PartHealth"
- partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- laserVapourise(v)
- breakWeld = true
- end
- else
- local partHealth = v.PartHealth
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- laserVapourise(v)
- breakWeld = true
- end
- end
- end
- end
- end
- end
- elseif part.Parent.Parent and part.Parent.Parent:IsA("Model") and part.Parent.Parent ~= workspace and part.Parent.Parent ~= char then
- for i,v in ipairs(part.Parent.Parent:GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") and not v:IsA("ParticleEmitter") then
- if v.Name ~= "Base" or v.Name ~= "Baseplate" then
- if not v:FindFirstChild("PartHealth") then
- local partHealth = ins("NumberValue",v)
- partHealth.Name = "PartHealth"
- partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- laserVapourise(v)
- breakWeld = true
- end
- else
- local partHealth = v.PartHealth
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- laserVapourise(v)
- breakWeld = true
- end
- end
- end
- end
- end
- elseif part.Parent.Parent.Parent and part.Parent.Parent.Parent:IsA("Model") and part.Parent.Parent.Parent ~= workspace and part.Parent.Parent.Parent ~= char then
- for i,v in ipairs(part.Parent.Parent.Parent:GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") and not v:IsA("ParticleEmitter") then
- if v.Name ~= "Base" or v.Name ~= "Baseplate" then
- if not v:FindFirstChild("PartHealth") then
- local partHealth = ins("NumberValue",v)
- partHealth.Name = "PartHealth"
- partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- laserVapourise(v)
- breakWeld = true
- end
- else
- local partHealth = v.PartHealth
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- laserVapourise(v)
- breakWeld = true
- end
- end
- end
- end
- end
- end
- local breakWeld = false
- if not laser and not vapourise then
- if part.Name ~= "Base" or part.Name ~= "Baseplate" then
- if not part:FindFirstChild("PartHealth") then
- local partHealth = ins("NumberValue",part)
- partHealth.Name = "PartHealth"
- partHealth.Value = (part.Size * v3(1,1,1)).Magnitude
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- dest(part)
- breakWeld = true
- end
- else
- local partHealth = part.PartHealth
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- dest(part)
- breakWeld = true
- end
- end
- end
- end
- local hitHumanoid = false
- local endcolor = cs.impactcolor
- if part.Parent then
- if part.Parent:FindFirstChildOfClass("Humanoid") then
- if part.Name == "Head" then
- if part.Parent:FindFirstChild("UpperTorso") then
- killr15(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
- else
- killr6(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
- end
- else
- damage(part.Parent:FindFirstChildOfClass("Humanoid"),random(20,40))
- if part.Parent:FindFirstChildOfClass("Humanoid").Health < .001 then
- if part.Parent:FindFirstChild("UpperTorso") then
- killr15(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
- else
- killr6(part.Parent:FindFirstChildOfClass("Humanoid").Parent)
- end
- end
- end
- endcolor = cs.impactBloodColor
- hitHumanoid = true
- end
- end
- if part.Parent.Parent then
- if part.Parent.Parent:FindFirstChildOfClass("Humanoid") then
- if part.Parent:IsA("Tool") then
- dest(part)
- end
- if part.Name == "Handle" and part.Parent:IsA("Accessory") then
- if part.Parent.Parent:FindFirstChild("UpperTorso") then
- killr15(part.Parent.Parent:FindFirstChildOfClass("Humanoid").Parent)
- else
- killr6(part.Parent.Parent:FindFirstChildOfClass("Humanoid").Parent)
- end
- end
- endcolor = cs.impactBloodColor
- hitHumanoid = true
- end
- end
- if laser then
- local reg = Region3.new(v3(pos.x,pos.y,pos.z)-v3(laserRange,laserRange,laserRange),v3(pos.x,pos.y,pos.z)+v3(laserRange,laserRange,laserRange))
- local parts = workspace:FindPartsInRegion3WithIgnoreList(reg,{char,ignoremodel},25)
- for i,v in pairs(parts) do
- if v.Name ~= "Base" or v.Name ~= "Baseplate" then
- if not v:FindFirstChild("PartHealth") then
- local partHealth = ins("NumberValue",v)
- partHealth.Name = "PartHealth"
- partHealth.Value = (v.Size * v3(1,1,1)).Magnitude
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- dest(v)
- breakWeld = true
- end
- else
- local partHealth = v.PartHealth
- partHealth.Value = partHealth.Value - partDamage
- if partHealth.Value <= 0 then
- dest(v)
- breakWeld = true
- end
- end
- end
- end
- end
- if not breakWeld then
- local makeDebreesCollidable = true
- local mainpart = ins("Part",ignoremodel)
- mainpart.Size = v3(impactXZ,0,impactXZ)
- mainpart.Material = "Neon"
- mainpart.Color = rgb(255,45,0)
- mainpart.CFrame = pos
- mainpart.CanCollide = false
- mainpart.Locked = true
- local mesh = ins("CylinderMesh",mainpart)
- local weld = ins("Weld",mainpart)
- weld.Part0 = part
- weld.Part1 = mainpart
- weld.C0 = mainpart.CFrame:toObjectSpace(pos)
- if not part.Anchored then
- makeDebreesCollidable = false
- end
- tlerp(mainpart,{Color = endcolor},impactCoolingTime,styles.Bounce,directions.InOut)
- local waitt = coroutine.wrap(function()
- wait(impactCoolingTime)
- mainpart.Material = cs.impactMaterial
- removeWithFade(mainpart,5)
- end)
- waitt()
- for i = 0,360,30 do
- local debree = ins("Part",mainpart)
- debree.CanCollide = false
- debree.Locked = true
- debree.Material = part.Material
- debree.Color = part.Color
- debree.Transparency = part.Transparency
- if hitHumanoid then
- debree.Color = cs.impactBloodColor
- debree.Material = "SmoothPlastic"
- end
- debree.Size = v3(.45,.25,.15)*XYSize
- debree.CFrame = mainpart.CFrame * angles(0,rad(i),0) * cf(0,debree.Size.y/(random(35,50)/10),-mainpart.Size.z/2) * angles(rad(random(-75,85)),rad(random(3,6)),rad(random(-10,10)))
- local weld = ins("WeldConstraint",debree)
- weld.Part0 = mainpart
- weld.Part1 = debree
- removeWithFade(debree,5+impactCoolingTime)
- local sparkLookVector = debree.CFrame * cf(0,debree.Size.y*2,0)
- spark(mainpart.CFrame,sparkLookVector.p,(random(20,30)/10)*XYSize)
- local rand = random(1,3)
- if rand == 2 then
- if not hitHumanoid then
- throwDebree(mainpart.CFrame * cf(0,XYSize/2,0),debree.CFrame.UpVector,part.Material,part.Color)
- else
- throwDebree(mainpart.CFrame * cf(0,XYSize/2,0),debree.CFrame.UpVector,"SmoothPlastic",cs.impactBloodColor)
- end
- end
- end
- if hitHumanoid then
- remove(mainpart,0)
- end
- end
- end)
- end
- function fireBullet(direc)
- pcall(function()
- sound(fireSound,3,random(9,11)/10,ra,25)
- effbiggerwithback("Brick",startPoint.CFrame * cf(-startPoint.Size.x/2,0,0),.3,(v3(.5,.5,.5)*10)*gunScale,cs.color,.15)
- local scf = startPoint.CFrame * cf(-startPoint.Size.x/2,0,0)
- local hit,pos,normalId = rayc(scf.p,(direc-scf.p),{char,ignoremodel},bulletSize)
- local dist = (startPoint.Position-pos).Magnitude
- local newStartPoint = oneStepBullet(startPoint.CFrame * cf(-startPoint.Size.x/2,0,0),pos,dist)
- local canMakeImpact
- local impactPos
- local impactHit
- local effPos
- local canGoFuther = true
- if hit then
- canMakeImpact = true
- effPos = pos
- impactPos = cf(pos,pos+normalId) * angles(rad(-90),0,0)
- impactHit = hit
- canGoFuther = false
- end
- if not canGoFuther then
- if canMakeImpact then
- createImpact(impactHit,impactPos)
- end
- return
- end
- for i = 1,(maxdistance/(bulletSize/2)) -1 do
- local hit,pos,normalId = rayc(newStartPoint.Position,newStartPoint.CFrame.LookVector,{char,ignoremodel},bulletSize)
- dist = (newStartPoint.Position-pos).Magnitude
- newStartPoint = oneStepBullet(newStartPoint.CFrame,pos,dist)
- if hit then
- canMakeImpact = true
- impactPos = cf(pos,pos+normalId) * angles(rad(-90),0,0)
- effPos = pos
- impactHit = hit
- break
- end
- swait()
- end
- if canMakeImpact then
- createImpact(impactHit,impactPos)
- end
- end)
- end
- rem.OnServerEvent:Connect(function(plr,type,direc,dir2)
- if type == "fire" then
- coroutine.resume(coroutine.create(function()
- angle = 30
- spawn(function()
- fireBullet(direc)
- end)
- wait(.1)
- angle = 0
- end))
- end
- if type == "follow" then
- if laser then
- if not vapourise then
- if rage then
- effbiggerwithback("Sphere",startPoint.CFrame * cf(-startPoint.Size.x/1.85,0,0),.3,((v3(.5,.5,.5)*10)*gunScale) * (random(9,12)/10),cs.color,.25,true)
- else
- effbiggerwithback("Sphere",startPoint.CFrame * cf(-startPoint.Size.x/1.85,0,0),.3,(v3(.5,.5,.5)*10)*gunScale,cs.color,.075)
- end
- else
- effbiggerwithback("Brick",startPoint.CFrame * cf(-startPoint.Size.x/1.85,0,0),.3,((v3(.5,.5,.5)*10)*gunScale) * (random(7,15)/10),cs.color,.35,true)
- end
- end
- local armOffset = 0
- if dir2 > 0 then
- armOffset = 0
- else
- armOffset = dir2
- end
- if rage then
- laserRange = 2.5 * gunScale
- else
- laserRange = .75 * gunScale
- end
- sliderWeld.C0 = sliderWeld.C0:Lerp(cf(0,(sliderPointPart.Size.y/2)+(slider.Size.y/2),(angle/150)*gunScale),.85)
- armWeld.C1 = armWeld.C1:Lerp(cf(0,ra.Size.y/4,0) * angles(rad(-angle) + math.sin(direc.y)*math.rad(-90),0,0),.35)
- armWeld.C0 = armWeld.C0:Lerp(armWeldC0 * cf(armOffset/1.25,0,armOffset/1.25) * angles((math.pi/2) + math.rad(-t.Orientation.x),0,0) * angles(0,0,math.sin(dir2)*math.rad(90)),.35)
- neckWeld.C0 = neckWeld.C0:Lerp(neckWeldC0 * angles(math.rad(-t.Orientation.x),math.sin(dir2)*math.rad(-90),0),.35)
- neckWeld.C1 = neckWeld.C1:Lerp(cf(0,-h.Size.y/2,0) * angles(math.sin(direc.y)*math.rad(-90),0,0),.35)
- end
- if type == "toggleLaser" and not laser then
- laser = true
- cs.color = cs.laserColor
- cs.material = cs.laserMaterial
- cs.trans = 0
- partDamage = 150 * gunScale
- animtime = .5
- drop = 0
- maxdistance = 3000
- XYSize = .4 * gunScale
- fireSound = 131164846
- impactXZ = XYSize+(XYSize/5)
- bulletSize = 150 * (1+gunScale/2)
- elseif type == "toggleLaser" and laser then
- laser = false
- cs.color = starterColor
- cs.material = starterMaterial
- partDamage = .55 * gunScale
- cs.trans = .5
- bulletSize = 50 * (1+gunScale/2)
- animtime = .25
- XYSize = .15 * gunScale
- fireSound = 2329791773
- maxdistance = 1500
- drop = .025
- impactXZ = XYSize+(XYSize/7.5)
- end
- if type == "rage" then
- if not rage then
- rage = true
- else
- rage = false
- end
- end
- if type == "vapourise" then
- if not vapourise then
- vapourise = true
- else
- vapourise = false
- end
- end
- end)
- while wait(1) do
- if not client.Parent or not client then
- client = NLS([[
- local tweens = game:GetService("TweenService")
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- local deb = false
- local coolDownTime = .35
- local keyDown = false
- local rage = false
- local directions = {In = Enum.EasingDirection.In,
- Out = Enum.EasingDirection.Out,
- InOut = Enum.EasingDirection.InOut
- }
- local styles = {Linear = Enum.EasingStyle.Linear,
- Back = Enum.EasingStyle.Back,
- Bounce = Enum.EasingStyle.Bounce,
- Sine = Enum.EasingStyle.Sine,
- Quad = Enum.EasingStyle.Quad,
- Elastic = Enum.EasingStyle.Elastic,
- Quart = Enum.EasingStyle.Quart,
- Quint = Enum.EasingStyle.Quint
- }
- local ins = Instance.new
- local v3 = Vector3.new
- local cf = CFrame.new
- local angles = CFrame.Angles
- local rad = math.rad
- local huge = math.huge
- local cos = math.cos
- local sin = math.sin
- local tan = math.tan
- local ray = Ray.new
- local random = math.random
- local ud = UDim.new
- local ud2 = UDim2.new
- local c3 = Color3.new
- local rgb = Color3.fromRGB
- local bc = BrickColor.new
- local rem = plr.PlayerGui:WaitForChild("OwO")
- local tlerp = function(part,tablee,leinght,easingstyle,easingdirec)
- local info = TweenInfo.new(
- leinght,
- easingstyle,
- easingdirec,
- 0,
- false,
- 0
- )
- local lerp = tweens:Create(part,info,tablee)
- lerp:Play()
- end
- function remove(instance,time)
- game:GetService("Debris"):AddItem(instance,time)
- end
- function removeWithFade(instance,time)
- game:GetService("Debris"):AddItem(instance,time+3.5)
- coroutine.resume(coroutine.create(function()
- wait(time)
- tlerp(instance,{Transparency = 1},2.5,styles.Linear,directions.In)
- end))
- end
- rem.OnClientEvent:Connect(function(type,part)
- if type == "floatPart" then
- local vel = ins("BodyVelocity",part)
- vel.MaxForce = v3(huge,huge,huge)
- vel.Velocity = v3(random(-1,1),random(-1,1),random(-1,1)) * (part.Size*v3(1,1,1)).Magnitude
- end
- end)
- mouse.KeyDown:Connect(function(key)
- if key == "f" then
- rem:FireServer("toggleLaser")
- end
- if plr.UserId == 155304432 then
- if key == "y" and not rage then
- rage = true
- rem:FireServer("rage")
- elseif key == "y" and rage then
- rage = false
- rem:FireServer("rage")
- end
- end
- if key == "t" then
- rem:FireServer("vapourise")
- end
- end)
- mouse.Button1Down:Connect(function()
- keyDown = true
- repeat
- if not deb then
- deb = true
- rem:FireServer("fire",mouse.Hit.p)
- wait(coolDownTime)
- deb = false
- end
- wait()
- until not keyDown
- end)
- mouse.Button1Up:Connect(function()
- keyDown = false
- end)
- while true do
- if rage then
- coolDownTime = .1
- else
- coolDownTime = .35
- end
- local cf = CFrame.new(owner.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.x,mouse.Hit.y,mouse.Hit.z))
- local n = cf.LookVector*owner.Character.HumanoidRootPart.CFrame.RightVector
- local rot = n.z+n.x
- rem:FireServer("follow",cf.LookVector,rot)
- wait()
- end
- while true do
- for i,v in ipairs(owner.Character:WaitForChild("Ignore"):GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") then
- v.LocalTransparencyModifier = v.Transparency
- end
- end
- for i,v in ipairs(owner.Character:WaitForChild("Gun"):GetDescendants()) do
- if string.find(v.ClassName:lower(),"part") then
- v.LocalTransparencyModifier = v.Transparency
- end
- end
- game:GetService("RunService").RenderStepped:Wait()
- end
- ]],owner.PlayerGui)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement