Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RunService = game:GetService("RunService")
- wait(.5)
- local part = Instance.new("Part", workspace)
- part.Material = Enum.Material.Glass
- part.Position = game.Players["Toad_85"].Character.Head.Position + Vector3.new(0,10,0)
- part.Color = Color3.fromRGB(0, 0, 255)
- part.TopSurface = "Smooth"
- part.BottomSurface = "Smooth"
- local partpart = Instance.new("ParticleEmitter", part)
- partpart.LightEmission = 1
- partpart.LightInfluence = 1
- partpart.Size = NumberSequence.new (4.54, 0)
- partpart.Texture = "http://www.roblox.com/asset/?id=1082139505"
- partpart.Size = NumberSequence.new (.9, .9)
- partpart.Name="ElectricShock"
- partpart.Lifetime = NumberRange.new(.1,.1)
- partpart.Rate = 1000
- partpart.RotSpeed = NumberRange.new(1000,1000)
- partpart.Speed=NumberRange.new(30,30)
- partpart.SpreadAngle= Vector2.new(180, 180)
- partpart.Enabled = false
- local partlight = Instance.new("PointLight", part)
- partlight.Brightness = 5.24
- partlight.Enabled = false
- partlight.Range = 6
- partlight.Shadows = true
- part.Touched:Connect(function(hit)
- if hit.Parent ~= workspace and hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("Dying") == nil and hit.Parent:FindFirstChildOfClass("Humanoid").Health > 0 then
- local a = Instance.new("IntValue", hit.Parent)
- a.Name="Dying"
- local savedo = part.Orientation
- local weld = Instance.new("WeldConstraint")
- if part.Anchored == false then
- weld.Parent = hit
- weld.Part0 = hit
- weld.Part1 = part
- end
- local hum = hit.Parent:FindFirstChild("Humanoid")
- hum.WalkSpeed = 0
- hum.JumpPower = 0
- hum.HipHeight = 0
- local light = partlight:Clone()
- light.Parent = hit.Parent.Torso
- local sound = Instance.new("Sound", script.Parent)
- sound.Volume = 4
- sound.SoundId = "rbxassetid://165796875"
- sound.Parent = hit.Parent.Torso
- sound:Play()
- local ActiveTracks = hum:GetPlayingAnimationTracks()
- for _,v in pairs(ActiveTracks) do
- v:Stop()
- end
- local char = hit.Parent
- local bodyparts = char:GetChildren()
- for i, bodypart in pairs (bodyparts) do
- if bodypart:FindFirstChild("IsElectrocuted") == nil then
- local b = Instance.new("IntValue", bodypart)
- b.Name="IsElectrocuted"
- end
- end
- for i, bodypart in pairs (bodyparts) do
- if bodypart:IsA("BasePart") then
- local particle = partpart:Clone()
- particle.Name ="toad's trap thing lol"
- particle.Parent = bodypart
- particle.Enabled = true
- partpart.Enabled = true
- end
- end
- local everypart = char:GetDescendants()
- for i, part in pairs(everypart) do
- if part.ClassName=="Shirt" or part.ClassName=="Pants" or part.ClassName=="ShirtGraphic" or part.ClassName=="Decal" then
- part:Destroy()
- end
- if part:IsA("BasePart") then
- part.Color = Color3.fromRGB(0,0,0)
- part.Material="Slate"
- end
- if part:FindFirstChildOfClass("SpecialMesh") then
- local mesh = part:FindFirstChildOfClass("SpecialMesh")
- mesh.TextureId=""
- end
- if part.ClassName=="CharacterMesh" then
- part.OverlayTextureId = 0
- end
- end
- local joints = char.Torso:GetChildren()
- for i, joint in pairs(joints) do
- if joint.ClassName=="Motor6D" then
- joint.C0 = joint.C0 * CFrame.fromEulerAnglesXYZ(math.random(-50,50)/100,math.random(-50,50)/100,math.random(-50,50)/100)
- end
- end
- for i = 1, 51 do
- wait(.001)
- if light.Enabled==false then
- light.Enabled = true
- elseif light.Enabled==true then
- light.Enabled = false
- end
- if char.HumanoidRootPart:FindFirstChild("RootJoint") ~= nil then
- char.HumanoidRootPart.RootJoint.C0 = char.Torso.Neck.C0 * CFrame.fromEulerAnglesXYZ(math.random(-25,25)/100,math.random(-25,25)/100,math.random(-25,25)/100)
- end
- for i, joint in pairs(joints) do
- if joint.ClassName=="Motor6D" then
- joint.C0 = joint.C0 * CFrame.fromEulerAnglesXYZ(math.random(-10,10)/100,math.random(-10,10)/100,math.random(-10,10)/100)
- end
- end
- end
- weld:Destroy()
- light:Destroy()
- hum.PlatformStand = true
- part.Orientation = savedo
- sound:Destroy()
- for i, bodypart in pairs(bodyparts) do
- if bodypart:IsA("BasePart") then
- partpart.Enabled = false
- bodypart:FindFirstChild("toad's trap thing lol").Enabled = false
- game.Debris:AddItem(bodypart:FindFirstChild("toad's trap thing lol"), .5)
- end
- end
- wait(.5)
- hum.Health = 0
- if hit.Parent:FindFirstChild("HumanoidRootPart") then
- hit.Parent.HumanoidRootPart.CanCollide = false
- end
- for i, bodypart in pairs (bodyparts) do
- if bodypart:IsA("BasePart") then
- RunService.Heartbeat:Wait()
- bodypart.Velocity = bodypart.Velocity + Vector3.new(math.random(-50,50),50,math.random(-50,50))
- end
- end
- wait(.25)
- a:Destroy()
- elseif hit:FindFirstChild("Dying") == nil and hit.Anchored == false and hit.Name~="HumanoidRootPart" and (hit.CanCollide == true and hit.Transparency ~= 1) and hit:FindFirstChild("IsElectrocuted") == nil and (hit.Material == Enum.Material.Metal or hit.Material == Enum.Material.CorrodedMetal or hit.Material == Enum.Material.Foil or hit.Material == Enum.Material.Grass or hit.Material == Enum.Material.Ice) then
- local a = Instance.new("IntValue", hit)
- a.Name="Dying"
- if hit:FindFirstChild("IsElectrocuted") == nil then
- local b = Instance.new("IntValue", hit)
- b.Name="IsElectrocuted"
- end
- local savedo = part.Orientation
- local a1 = Instance.new("Attachment")
- local a2 = Instance.new("Attachment")
- local r = Instance.new("AlignPosition")
- local r2 = Instance.new("AlignOrientation")
- local weld = Instance.new("WeldConstraint")
- if hit.Parent:FindFirstChild("Humanoid") then
- a1.Parent = hit
- a2.Parent = part
- r.Parent = hit
- r2.Parent = hit
- a1.Position = Vector3.new(0,0,0)
- a1.Name = hit.Name .. " Elec"
- a2.WorldPosition = hit.Position
- a2.Name = hit.Parent.Name .. " Elec"
- a1.WorldOrientation = hit.Orientation
- a2.WorldOrientation = hit.Orientation
- r.Name = hit.Name .. " AlignPositionElec"
- r.Attachment0 = a1
- r.Attachment1 = a2
- r.Responsiveness = 200
- r.RigidityEnabled = false
- r2.Name = hit.Name .. " AlignOrientationElec"
- r2.Attachment0 = a1
- r2.Attachment1 = a2
- r2.Responsiveness = 50
- r2.RigidityEnabled = true
- end
- if hit.Parent:FindFirstChild("Humanoid") == nil then
- weld.Parent = hit
- weld.Part0 = hit
- weld.Part1 = part
- end
- local light = partlight:Clone()
- light.Parent = hit
- local sound = Instance.new("Sound", script.Parent)
- sound.Volume = 4
- sound.SoundId = "rbxassetid://165796875"
- sound.Parent = hit
- sound:Play()
- local particle = partpart:Clone()
- particle.Parent = hit
- particle.Enabled = true
- partpart.Enabled = true
- if hit:IsA("BasePart") and hit.Material ~= Enum.Material.Ice then
- hit.Color = Color3.fromRGB(0,0,0)
- hit.Material="Slate"
- end
- if hit:FindFirstChildOfClass("SpecialMesh") then
- local mesh = hit:FindFirstChildOfClass("SpecialMesh")
- mesh.TextureId=""
- end
- if hit.ClassName=="MeshPart" then
- hit.TextureID = ""
- end
- for i = 1, 51 do
- wait(.001)
- hit.CFrame = hit.CFrame * CFrame.fromEulerAnglesXYZ(math.random(-25,25)/100,math.random(-25,25)/100,math.random(-25,25)/100)
- end
- a1:Destroy()
- a2:Destroy()
- r:Destroy()
- r2:Destroy()
- weld:Destroy()
- light.Enabled = false
- part.Orientation = savedo
- partpart.Enabled = false
- particle.Enabled = false
- game.Debris:AddItem(particle, .5)
- light:Destroy()
- sound:Destroy()
- part.ElectricShock.Enabled = false
- wait(.25)
- a:Destroy()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement