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"))
- Script0 = Instance.new("Script")
- Script1 = Instance.new("Script")
- Script2 = Instance.new("Script")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Sound5 = Instance.new("Sound")
- Sound6 = Instance.new("Sound")
- Sound7 = Instance.new("Sound")
- Sound8 = Instance.new("Sound")
- Sound9 = Instance.new("Sound")
- Sound10 = Instance.new("Sound")
- Sound11 = Instance.new("Sound")
- Tool12 = Instance.new("Tool")
- Script13 = Instance.new("Script")
- LocalScript14 = Instance.new("LocalScript")
- RemoteEvent15 = Instance.new("RemoteEvent")
- Animation16 = Instance.new("Animation")
- Part17 = Instance.new("Part")
- SpecialMesh18 = Instance.new("SpecialMesh")
- Sound19 = Instance.new("Sound")
- Sound20 = Instance.new("Sound")
- Script21 = Instance.new("Script")
- Script0.Name = "BloodLoader"
- Script0.Parent = mas
- table.insert(cors,sandbox(Script0,function()
- print("Draco_Studios' Blood Script has been loaded!")
- if script.Parent:FindFirstChild("DeleteMe") then
- script.Parent.DeleteMe:Destroy()
- end
- script.Parent=game.ServerScriptService
- game.Players.PlayerAdded:connect(function(p)
- p.CharacterAdded:connect(function(c)
- script.BloodPool:Clone().Parent=c
- c.Humanoid.Died:connect(function()
- wait(6)
- script.BloodPool:Clone().Parent=c
- end)
- end)
- end)
- end))
- Script1.Name = "BloodPool"
- Script1.Parent = Script0
- table.insert(cors,sandbox(Script1,function()
- local Char=script.Parent
- local Hum=Char:WaitForChild("Humanoid")
- local Tor=Char:WaitForChild("Torso")
- local M=math.random
- local R=math.rad
- local rates={0.05,0.075,0.1,0.15}
- local smooth=function(P)
- local SM=Enum.SurfaceType.SmoothNoOutlines
- P.TopSurface=SM
- P.BottomSurface=SM
- P.RightSurface=SM
- P.LeftSurface=SM
- P.FrontSurface=SM
- P.BackSurface=SM
- end
- local function BloodPool(Part,Size)
- local Pool=Instance.new("Part",game.Workspace)
- Pool.TopSurface=0
- Pool.CanCollide=false
- Pool.BrickColor=BrickColor.new("Crimson")
- Instance.new("CylinderMesh",Pool)
- Pool.Anchored=true
- Pool.Name="BloodPoolPart"
- smooth(Pool)
- Pool.FormFactor=Enum.FormFactor.Custom
- Pool.Size=Size
- local c=Part.CFrame*CFrame.new(M(-3.01,3.01),-2.9,M(-3.01,3.01))
- coroutine.resume(coroutine.create(function()
- local rate=rates[M(1,#rates)]
- game.Debris:AddItem(Pool,15)
- for i=1,M(25,70) do
- wait()
- Pool.CFrame=c
- Pool.Size=Pool.Size+Vector3.new(rate,0,rate)
- end
- wait(5)
- Pool:Destroy()
- end))
- end
- local function BloodDrops(Size,Area)
- local Blood=Instance.new("Part",game.Workspace)
- Blood.BrickColor=BrickColor.new("Crimson")
- Blood.TopSurface=0
- Blood.CanCollide=false
- Blood.Anchored=false
- Blood.FormFactor=Enum.FormFactor.Custom
- Blood.Size=Size
- Blood.CFrame=Area*CFrame.new(M(-1.00,1.00),M(-1.00,1.00),M(-1.00,1.00))
- return Blood
- end
- local Heath=Hum.Health
- Hum.Changed:connect(function()
- if Hum.Health<Heath then
- Heath=Hum.Health
- for i=1, math.random(4,10)do
- local Size=Vector3.new(M(-0.25,0.25),.2,M(-.25,.25))
- local Blood=BloodDrops(Size,Tor.CFrame)
- local Stopper=false
- local Size2=Vector3.new(M(-0.25,0.25),.2,M(-.25,.25))
- BloodPool(Tor,Size2)
- end
- end
- end)
- end))
- Script2.Name = "DiedScript"
- Script2.Parent = mas
- table.insert(cors,sandbox(Script2,function()
- function Died(p)
- wait(.001)
- local tracks=script:GetChildren()
- local rn=math.random(1,#tracks)
- local track=tracks[rn]
- if track~=nil then
- track:play()
- wait(5)
- track:pause()
- end
- end
- function Hum(p)
- hum = p:findFirstChild("Humanoid")
- if hum ~= nil then
- hum.Died:connect(function(hum) Died(p) end)
- end
- end
- function Enter(p)
- p.CharacterAdded:connect(Hum)
- end
- game.Players.PlayerAdded:connect(Enter)
- end))
- Sound3.Parent = Script2
- Sound3.SoundId = "rbxassetid://232921590"
- Sound4.Parent = Script2
- Sound4.SoundId = "rbxassetid://232921580"
- Sound5.Parent = Script2
- Sound5.SoundId = "rbxassetid://232921573"
- Sound6.Parent = Script2
- Sound6.SoundId = "rbxassetid://169907033"
- Sound7.Parent = Script2
- Sound7.SoundId = "rbxassetid://167094166"
- Sound8.Parent = Script2
- Sound8.SoundId = "rbxassetid://166221396"
- Sound9.Parent = Script2
- Sound9.SoundId = "rbxassetid://166221367"
- Sound10.Parent = Script2
- Sound10.SoundId = "rbxassetid://166221318"
- Sound11.Parent = Script2
- Sound11.SoundId = "rbxassetid://166221285"
- Tool12.Parent = mas
- Tool12.TextureId = "http://www.roblox.com/asset/?id=210600756"
- Tool12.GripForward = Vector3.new(-0, -0.707106769, -0.707106769)
- Tool12.GripPos = Vector3.new(0, -0.300000012, 0.699999988)
- Tool12.GripUp = Vector3.new(0, 0.707106769, -0.707106769)
- Script13.Name = "Server"
- Script13.Parent = Tool12
- table.insert(cors,sandbox(Script13,function()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Handle = Tool:WaitForChild("Handle")
- local FriendlyFire = false
- local AttackPower = 1
- local AttackDamage = 100
- local AtackRechargeTime = 3
- local AttackRecharge = 1/AtackRechargeTime
- local AttackSpeed = 256
- local Equipped = false
- local Heartbeat = game:GetService("RunService").Heartbeat
- local Knives = {}
- --returns the wielding player of this tool
- function getPlayer()
- local char = Tool.Parent
- return game:GetService("Players"):GetPlayerFromCharacter(char)
- end
- --helpfully checks a table for a specific value
- function contains(t, v)
- for _, val in pairs(t) do
- if val == v then
- return true
- end
- end
- return false
- end
- --tags a human for the ROBLOX KO system
- function tagHuman(human)
- local tag = Instance.new("ObjectValue")
- tag.Value = getPlayer()
- tag.Name = "creator"
- tag.Parent = human
- game:GetService("Debris"):AddItem(tag)
- end
- --used by checkTeams
- function sameTeam(otherHuman)
- local player = getPlayer()
- local otherPlayer = game:GetService("Players"):GetPlayerFromCharacter(otherHuman.Parent)
- if player and otherPlayer then
- return player.TeamColor == otherPlayer.TeamColor
- end
- return false
- end
- --use this to determine if you want this human to be harmed or not, returns boolean
- function checkTeams(otherHuman)
- return not (sameTeam(otherHuman) and not FriendlyFire)
- end
- function getKnife()
- local knife = Handle:clone()
- knife.Transparency = 0
- knife.Hit.Pitch = math.random(90, 110)/100
- local lift = Instance.new("BodyForce")
- lift.force = Vector3.new(0, 196.2, 0) * knife:GetMass() * 0.8
- lift.Parent = knife
- local proj = Tool.Projectile:Clone()
- proj.Disabled = false
- proj.Parent = knife
- return knife
- end
- function equippedLoop()
- while Equipped do
- local dt = Heartbeat:wait()
- if AttackPower < 1 then
- AttackPower = AttackPower + dt * AttackRecharge
- if AttackPower > 1 then
- AttackPower = 1
- end
- end
- Handle.Transparency = 1 - AttackPower
- end
- end
- function onLeftDown(mousePos)
- local knife = getKnife()
- knife.CFrame = CFrame.new(Handle.Position, mousePos)
- knife.Velocity = knife.CFrame.lookVector * AttackSpeed * AttackPower
- local damage = AttackDamage * AttackPower
- local touched
- touched = knife.Touched:connect(function(part)
- if part:IsDescendantOf(Tool.Parent) then return end
- if contains(Knives, part) then return end
- if part.Parent and part.Parent:FindFirstChild("Humanoid") then
- local human = part.Parent.Humanoid
- if checkTeams(human) then
- tagHuman(human)
- human:TakeDamage(damage)
- knife.Hit:Play()
- end
- end
- knife.Projectile:Destroy()
- local w = Instance.new("Weld")
- w.Part0 = part
- w.Part1 = knife
- w.C0 = part.CFrame:toObjectSpace(knife.CFrame)
- w.Parent = w.Part0
- touched:disconnect()
- end)
- table.insert(Knives, knife)
- knife.Parent = workspace
- game:GetService("Debris"):AddItem(knife, 3.5)
- delay(2, function()
- knife.Transparency = 1
- end)
- Remote:FireClient(getPlayer(), "PlayAnimation", "Throw")
- Handle.Throw.Pitch = 0.8 + 0.4 * AttackPower
- Handle.Throw:Play()
- AttackPower = 0
- end
- function onRemote(player, func, ...)
- if player ~= getPlayer() then return end
- if func == "LeftDown" then
- onLeftDown(...)
- end
- end
- function onEquip()
- Equipped = true
- equippedLoop()
- end
- function onUnequip()
- Equipped = false
- end
- Remote.OnServerEvent:connect(onRemote)
- Tool.Equipped:connect(onEquip)
- Tool.Unequipped:connect(onUnequip)
- end))
- LocalScript14.Name = "Client"
- LocalScript14.Parent = Tool12
- table.insert(cors,sandbox(LocalScript14,function()
- local Player = game:GetService("Players").LocalPlayer
- local UIS = game:GetService("UserInputService")
- local Mouse = Player:GetMouse()
- local Tool = script.Parent
- local Remote = Tool:WaitForChild("Remote")
- local Tracks = {}
- local InputType = Enum.UserInputType
- local BeganConnection, EndedConnection
- function playAnimation(animName, ...)
- if Tracks[animName] then
- Tracks[animName]:Play()
- else
- local anim = Tool:FindFirstChild(animName)
- if anim and Tool.Parent and Tool.Parent:FindFirstChild("Humanoid") then
- Tracks[animName] = Tool.Parent.Humanoid:LoadAnimation(anim)
- playAnimation(animName, ...)
- end
- end
- end
- function stopAnimation(animName)
- if Tracks[animName] then
- Tracks[animName]:Stop()
- end
- end
- function inputBegan(input)
- if input.UserInputType == InputType.MouseButton1 then
- Remote:FireServer("LeftDown", Mouse.Hit.p)
- end
- end
- function inputEnded(input)
- if input.UserInputType == InputType.MouseButton1 then
- Remote:FireServer("LeftUp")
- end
- end
- function onRemote(func, ...)
- if func == "PlayAnimation" then
- playAnimation(...)
- elseif func == "StopAnimation" then
- stopAnimation(...)
- end
- end
- function onEquip()
- BeganConnection = UIS.InputBegan:connect(inputBegan)
- EndedConnection = UIS.InputEnded:connect(inputEnded)
- end
- function onUnequip()
- if BeganConnection then
- BeganConnection:disconnect()
- BeganConnection = nil
- end
- if EndedConnection then
- EndedConnection:disconnect()
- EndedConnection = nil
- end
- end
- Tool.Equipped:connect(onEquip)
- Tool.Unequipped:connect(onUnequip)
- Remote.OnClientEvent:connect(onRemote)
- end))
- RemoteEvent15.Name = "Remote"
- RemoteEvent15.Parent = Tool12
- Animation16.Name = "Throw"
- Animation16.Parent = Tool12
- Animation16.AnimationId = "http://www.roblox.com/asset/?id=207107855"
- Part17.Name = "Handle"
- Part17.Parent = Tool12
- Part17.Rotation = Vector3.new(90, 0, 0)
- Part17.CanCollide = false
- Part17.FormFactor = Enum.FormFactor.Custom
- Part17.Size = Vector3.new(2.19999552, 4.39999008, 21.9999542)
- Part17.CFrame = CFrame.new(-21.9000015, 65.9999695, -22.8000031, 0.99999994, 0, 0, 0, 2.98023224e-08, -0.999999881, 0, 0.999999881, 2.98023224e-08)
- Part17.BottomSurface = Enum.SurfaceType.Smooth
- Part17.TopSurface = Enum.SurfaceType.Smooth
- Part17.Position = Vector3.new(-21.9000015, 65.9999695, -22.8000031)
- Part17.Orientation = Vector3.new(89.9700012, 0, 0)
- SpecialMesh18.Parent = Part17
- SpecialMesh18.MeshId = "rbxassetid://536945307"
- SpecialMesh18.Scale = Vector3.new(1.22099745, 1.22099745, 1.22099745)
- SpecialMesh18.TextureId = "rbxassetid://536945378"
- SpecialMesh18.MeshType = Enum.MeshType.FileMesh
- SpecialMesh18.Scale = Vector3.new(1.22099745, 1.22099745, 1.22099745)
- Sound19.Name = "Throw"
- Sound19.Parent = Part17
- Sound19.SoundId = "http://www.roblox.com/asset/?id=97095069"
- Sound20.Name = "Hit"
- Sound20.Parent = Part17
- Sound20.SoundId = "http://www.roblox.com/asset/?id=93706376"
- Script21.Name = "Projectile"
- Script21.Parent = Tool12
- Script21.Disabled = true
- table.insert(cors,sandbox(Script21,function()
- local Projectile = script.Parent
- local Heartbeat = game:GetService("RunService").Heartbeat
- while Heartbeat:wait() do
- Projectile.CFrame = CFrame.new(Projectile.Position, Projectile.Position + Projectile.Velocity)
- end
- end))
- 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