Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Script1 = Instance.new("Script")
- Part2 = Instance.new("Part")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- SpecialMesh6 = Instance.new("SpecialMesh")
- Script7 = Instance.new("Script")
- Script8 = Instance.new("Script")
- Script9 = Instance.new("Script")
- Script10 = Instance.new("Script")
- ParticleEmitter11 = Instance.new("ParticleEmitter")
- Tool0.Name = "Chainsaw"
- Tool0.Parent = mas
- Tool0.TextureId = "rbxassetid://1166197683"
- Tool0.GripPos = Vector3.new(0, 0, 1.5)
- Script1.Name = "SwordScript"
- Script1.Parent = Tool0
- table.insert(cors,sandbox(Script1,function()
- -------- OMG HAX
- local game = game
- r = game:service("RunService")
- local damage = 19
- sword = script.Parent.Handle
- Tool = script.Parent
- function slice(hit)
- if (hit.Parent == nil) then return end -- happens when bullet hits sword
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- end
- function blow(hit)
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- local vCharacter = Tool.Parent
- local vPlayer = game.Players:playerFromCharacter(vCharacter)
- local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
- if humanoid~=nil and humanoid ~= hum and hum ~= nil then
- tagHumanoid(humanoid, vPlayer)
- humanoid:TakeDamage(damage)
- wait(1)
- untagHumanoid(humanoid)
- end
- end
- function tagHumanoid(humanoid)
- creator_tag = Instance.new("ObjectValue")
- creator_tag.Value = player
- creator_tag.Name = "creator"
- creator_tag.Parent = humanoid
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- firing = false
- function onActivated()
- if not Tool.Enabled then
- return
- end
- character = Tool.Parent;
- local humanoid = character.Humanoid
- if humanoid == nil then
- print("Humanoid not found")
- return
- end
- player = game.Players:findFirstChild(character.Name)
- if Tool.Handle:findFirstChild("Startup") ~= nil then
- Tool.Handle.Startup:play()
- end
- Tool.Enabled = false
- firing = true
- connection = script.Parent.Handle.Touched:connect(blow)
- Tool.Handle.attack:play()
- Tool.Handle.idle:stop()
- while firing do -- hold down the mouse button for a continuous attack
- Tool.Enabled = false
- wait(.25)
- end
- Tool.Handle.attack:stop()
- Tool.Handle.idle:play()
- connection:disconnect()
- Tool.Enabled = true
- end
- function onDeactivated()
- firing = false
- end
- function onEquipped() --gotta start the sounds!
- Tool.Handle.idle:play()
- Tool.Handle.start:play()
- end
- script.Parent.Activated:connect(onActivated)
- script.Parent.Deactivated:connect(onDeactivated)
- script.Parent.Equipped:connect(onEquipped)
- end))
- Part2.Name = "Handle"
- Part2.Parent = Tool0
- Part2.Material = Enum.Material.SmoothPlastic
- Part2.BrickColor = BrickColor.new("Dark stone grey")
- Part2.Reflectance = 0.40000000596046
- Part2.Rotation = Vector3.new(-90, 56, 90)
- Part2.FormFactor = Enum.FormFactor.Plate
- Part2.Size = Vector3.new(1, 0.800000012, 4)
- Part2.CFrame = CFrame.new(-6.00945282, 1.45000994, -11.5, 0, -0.559192896, 0.829037607, 0, 0.829037607, 0.559192896, -1, 0, 0)
- Part2.BottomSurface = Enum.SurfaceType.Smooth
- Part2.TopSurface = Enum.SurfaceType.Smooth
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part2.Position = Vector3.new(-6.00945282, 1.45000994, -11.5)
- Part2.Orientation = Vector3.new(-34, 90, 0)
- Part2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Sound3.Name = "idle"
- Sound3.Parent = Part2
- Sound3.SoundId = "http://www.roblox.com/asset/?id=2766581"
- Sound3.Volume = 1
- Sound3.Looped = true
- Sound4.Name = "attack"
- Sound4.Parent = Part2
- Sound4.SoundId = "http://www.roblox.com/asset/?id=161420059"
- Sound4.Looped = true
- Sound5.Name = "start"
- Sound5.Parent = Part2
- Sound5.SoundId = "rbxassetid://258741207"
- Sound5.Volume = 2
- SpecialMesh6.Name = "KnifeMesh"
- SpecialMesh6.Parent = Part2
- SpecialMesh6.MeshId = "rbxassetid://536945307"
- SpecialMesh6.Offset = Vector3.new(0, -0.200000003, 0)
- SpecialMesh6.Scale = Vector3.new(0.111000001, 0.111000001, 0.111000001)
- SpecialMesh6.TextureId = "rbxassetid://536945378"
- SpecialMesh6.MeshType = Enum.MeshType.FileMesh
- SpecialMesh6.Scale = Vector3.new(0.111000001, 0.111000001, 0.111000001)
- Script7.Name = "Entry"
- Script7.Parent = mas
- table.insert(cors,sandbox(Script7,function()
- function enter(plyr)
- plyr.CharacterAdded:connect(function()
- print("Corpsifying...")
- local scrip = script.Corpse:clone()
- scrip.Disabled = false
- scrip.Parent = plyr.Character
- end)
- end
- game.Players.PlayerAdded:connect(enter)
- for i, v in pairs(game.Players:GetChildren()) do
- repeat wait() until v.Character
- if v.Character:findFirstChild("Corpse") == nil then
- local scrip = script.Corpse:clone()
- scrip.Disabled = false
- scrip.Parent = v.Character
- enter(v)
- end
- end
- end))
- Script8.Name = "Corpse"
- Script8.Parent = Script7
- Script8.Disabled = true
- table.insert(cors,sandbox(Script8,function()
- Character = script.Parent
- Humanoid = Character.Humanoid
- Torso = Character.Torso
- function OnDeath()
- print("Death")
- local cleaner = script:findFirstChild("BodyCleanup")
- cleaner.Parent = nil
- cleaner.Disabled = false
- Character.archivable = true
- oldCharacter = Character
- Humanoid.MaxHealth = 0
- for i,v in pairs(oldCharacter.Head:GetChildren()) do
- if v:IsA("Sound") then
- v:Remove()
- end
- end
- Character = Character:Clone()
- Character.Parent = workspace
- Character.Name = ""
- Character:findFirstChild("Corpse"):Remove()
- for i,v in pairs(oldCharacter:GetChildren()) do
- if v:IsA("BasePart") then
- v.CanCollide = false
- v.Transparency = 1
- end
- end
- Humanoid.Parent = nil
- cleaner.Parent = Character
- Torso = Character:findFirstChild("Torso")
- if Torso then
- local Head = Character:FindFirstChild("Head")
- if Head then
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = Torso
- Neck.Part1 = Head
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = Torso
- end
- local Limb = Character:FindFirstChild("Right Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Arm")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Right Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- local Limb = Character:FindFirstChild("Left Leg")
- if Limb then
- Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = Torso
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = Torso
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = Character
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- --[
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = Character
- local Weld = Instance.new("Weld")
- Weld.Part0 = Torso
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = Torso
- --]]
- end
- wait(3)
- Character:Remove()
- end
- Humanoid.Died:connect(OnDeath)
- end))
- Script9.Name = "BodyCleanup"
- Script9.Parent = Script8
- Script9.Disabled = true
- table.insert(cors,sandbox(Script9,function()
- wait(5)
- script.Parent.Parent = nil
- end))
- Script10.Name = "Realistic Blood"
- Script10.Parent = mas
- table.insert(cors,sandbox(Script10,function()
- ------/// PUT IN Workspace OR ServerScriptStorage <3 \\\------
- ------ Programmed by BuildIntoGames; Removing this line will kill 5 children
- ---- Change these settings to change stuff (keep the commas, lua doesn't understand n00b syntax)
- local settings = {
- splatters_per_health_inc = 1, ---- The amount of blood splatters made when you lose (damage_inc) of health
- damage_inc = 3, ---- The increment of damage that must be done at a time to trigger blood splatters
- remove_time = 20, ---- The time (in seconds) until a blood splatter is removed after it is created
- min_splatter_time = 0, ---- The delay time (minimum) until another blood splatter is made
- max_splatter_time = 0.05, ---- The delay time (maximum) until another blood splatter is made
- min_transparency = 0.2, ---- The (minimum) transparency of a blood splatter
- max_transparency = 0, ---- The (maximum) transparency of a blood splatter
- min_size_x = 3, ---- The (minimum) size of a blood splatter on the X axis
- max_size_x = 8, ---- The (maximum) size of a blood splatter on the X axis
- min_size_z = 3, ---- The (minimum) size of a blood splatter on the Z axis
- max_size_z = 8, ---- The (maximum) size of a blood splatter on the Z axis
- tran_tw_time_min = 0.1, ---- The (minimum) time to tween the size of a blood splatter
- tran_tw_time_max = 0.5, ---- The (maximum) time to tween the size of a blood splatter
- size_tw_time_min = 0.1, ---- The (minimum) time to tween the transparency of a blood splatter
- size_tw_time_max = 0.6 ---- The (maximum) time to tween the transparency of a blood splatter
- }
- --- These are the IDs of possible blood textures, I already set 3 up for u k
- local blood_textures = {
- 176678030,
- 176678048,
- 176678086
- }
- -------------- I'm not responsible for any PAIN if you edit past this (pun intended)
- local blood_folder = Instance.new("Folder",game.Workspace)
- blood_folder.Name = "Blood.Splatter.Particles"
- function create_blood_splatter(player_class)
- local blood_parts = {"Left Leg","Right Leg","Torso","Right Arm","Left Arm","Head"}
- local chosen_part
- if(player_class.humanoid.Health <= 0) then
- repeat wait() chosen_part = blood_parts[math.random(1,#blood_parts)] until player_class.character:FindFirstChild(chosen_part)
- chosen_part = player_class.character[chosen_part]
- local blood_emmiter = script.Blood:Clone()
- blood_emmiter.Parent = chosen_part
- blood_emmiter.Enabled = true
- else
- chosen_part = player_class.torso
- end
- local ray = Ray.new(chosen_part.Position, Vector3.new(0,-100,0))
- local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray, {blood_folder , unpack(player_class.character:GetChildren())} , true)
- if(hit) then
- local blood = Instance.new("Part",blood_folder)
- blood.Anchored = true
- blood.CanCollide = false
- blood.Transparency = 1
- blood.Name = "Particle_Blood"
- blood.FormFactor = Enum.FormFactor.Custom
- blood.Size = Vector3.new(0.01 , 0.1 , 0.01)
- blood.CFrame = CFrame.new(position)
- local blood_decal = Instance.new("Decal",blood)
- blood_decal.Transparency = 1
- blood_decal.Texture = "http://www.roblox.com/asset/?id=" .. blood_textures[math.random(1,#blood_textures)]
- blood_decal.Face = "Top"
- game.Debris:AddItem(blood,settings.remove_time+20)
- local edit_blood = coroutine.wrap(function()
- local original_size = blood.Size
- local original_transparency = blood_decal.Transparency
- local new_transparency = math.random(settings.max_transparency*100,settings.min_transparency*100)/100
- local new_size = Vector3.new(math.random(settings.min_size_x*100,settings.max_size_x*100)/100 , blood.Size.Y , math.random(settings.min_size_z*100,settings.max_size_z*100)/100)
- local tran_tw_time = math.random(settings.tran_tw_time_min*100,settings.tran_tw_time_max*100)/100
- local size_tw_time = math.random(settings.size_tw_time_min*100,settings.size_tw_time_max*100)/100
- for i = 1,10*tran_tw_time do
- wait()
- local perc = i/(10*tran_tw_time)
- blood_decal.Transparency = original_transparency - (perc*new_transparency)
- end
- for i = 1,10*size_tw_time do
- wait()
- local perc = i/(10*size_tw_time)
- blood.Size = Vector3.new(original_size.X+(perc*new_size.X) , original_size.Y , original_size.Z+(perc*new_size.Z))
- end
- wait(settings.remove_time)
- blood:Destroy()
- end)
- edit_blood()
- end
- end
- function monitor_character(player_class)
- local last_health = player_class.humanoid.Health
- player_class.humanoid.HealthChanged:connect(function()
- if(player_class.humanoid.Health < last_health) then
- if(last_health - player_class.humanoid.Health >= settings.damage_inc) then
- for i = 1,settings.splatters_per_health_inc*((last_health - player_class.humanoid.Health)/settings.damage_inc) do
- create_blood_splatter(player_class)
- if(settings.max_splatter_time > 0) then
- wait(math.random(settings.min_splatter_time*100,settings.max_splatter_time*100)/100)
- end
- end
- end
- end
- last_health = player_class.humanoid.Health
- end)
- end
- function monitor_player(player)
- repeat wait() until player.Character ~= nil
- player.CharacterAdded:connect(function()
- local player_class = {
- player = player,
- character = player.Character,
- torso = player.Character:WaitForChild("Torso"),
- head = player.Character:WaitForChild("Head"),
- humanoid = player.Character:WaitForChild("Humanoid"),
- }
- monitor_character(player_class)
- end)
- local player_class = {
- player = player,
- character = player.Character,
- torso = player.Character:WaitForChild("Torso"),
- head = player.Character:WaitForChild("Head"),
- humanoid = player.Character:WaitForChild("Humanoid"),
- }
- monitor_character(player_class)
- end
- game.Players.PlayerAdded:connect(function(player)
- monitor_player(player)
- end)
- for i,v in ipairs(game.Players:GetChildren()) do
- if(v.ClassName == "Player") then
- monitor_player(v)
- end
- end
- ----- Bonus credit to BuildIntoGames if you try to steal this and remove the credits at the top, you shady n00b
- end))
- ParticleEmitter11.Name = "Blood"
- ParticleEmitter11.Parent = Script10
- ParticleEmitter11.Transparency = NumberSequence.new(1,0.33125001192093,0.32499998807907,1)
- ParticleEmitter11.Size = NumberSequence.new(0,1.1250001192093,1)
- ParticleEmitter11.Color = ColorSequence.new(Color3.new(0.337255, 0.337255, 0.337255),Color3.new(1, 1, 1))
- ParticleEmitter11.Enabled = false
- ParticleEmitter11.Texture = "http://www.roblox.com/asset/?id=251300537"
- ParticleEmitter11.Acceleration = Vector3.new(0, -10, 0)
- ParticleEmitter11.Lifetime = NumberRange.new(1, 2)
- ParticleEmitter11.Speed = NumberRange.new(1, 2)
- ParticleEmitter11.Color = ColorSequence.new(Color3.new(0.337255, 0.337255, 0.337255),Color3.new(1, 1, 1))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement