Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = owner
- local char = plr.Character
- local torso = char:FindFirstChild('Torso') or char:FindFirstChild('HumanoidRootPart')
- local hum = nil
- local saved_tools = _G[plr.Name .. ' tools anti death']
- local shirt = ''
- local pants = ''
- local bodyColors = {
- leftArmColorId = nil,
- torsoColorId = nil,
- rightArmColorId = nil,
- headColorId = nil,
- leftLegColorId = nil,
- rightLegColorId = nil
- }
- local cdata = game:GetService("Players"):GetCharacterAppearanceInfoAsync(plr.UserId)
- bodyColors = cdata.bodyColors
- if not char then
- plr:LoadCharacter()
- wait()
- end
- if char then
- local _shirt = char:FindFirstChild('Shirt')
- if _shirt then
- shirt = _shirt.ShirtTemplate
- end
- local _pants = char:FindFirstChild('Pants')
- if _pants then
- pants = _pants.PantsTemplate
- end
- end
- if saved_tools then
- saved_tools:Destroy()
- end
- _G[plr.Name .. ' tools anti death'] = Instance.new("Folder")
- saved_tools = _G[plr.Name .. ' tools anti death']
- script.Parent = game:GetService("ServerScriptService")
- function make_char()
- --spawn(function()
- char = Instance.new("Model")
- head = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- local Decal3 = Instance.new("Decal")
- torso = Instance.new("Part")
- local Decal5 = Instance.new("Decal")
- local Motor6 = Instance.new("Motor")
- local Motor7 = Instance.new("Motor")
- local Motor8 = Instance.new("Motor")
- local Motor9 = Instance.new("Motor")
- local Motor10 = Instance.new("Motor")
- local larm = Instance.new("Part")
- local rarm = Instance.new("Part")
- local lleg = Instance.new("Part")
- local rleg = Instance.new("Part")
- hum = Instance.new("Humanoid")
- local CFrameValue16 = Instance.new("CFrameValue")
- local BoolValue17 = Instance.new("BoolValue")
- local IntValue18 = Instance.new("IntValue")
- local BoolValue19 = Instance.new("BoolValue")
- local BrickColorValue20 = Instance.new("BrickColorValue")
- local BoolValue21 = Instance.new("BoolValue")
- local BoolValue22 = Instance.new("BoolValue")
- local BoolValue23 = Instance.new("BoolValue")
- local Vector3Value24 = Instance.new("Vector3Value")
- local BoolValue25 = Instance.new("BoolValue")
- local BoolValue26 = Instance.new("BoolValue")
- local BodyColors27 = Instance.new("BodyColors")
- local BoolValue28 = Instance.new("BoolValue")
- local IntValue30 = Instance.new("IntValue")
- local IntValue31 = Instance.new("IntValue")
- local IntValue32 = Instance.new("IntValue")
- char.Name = game:GetService("HttpService"):GenerateGUID(false) or '' -- character name
- char.Parent = workspace
- char.PrimaryPart = head
- head.Name = "Head"
- head.Parent = char
- head.CFrame = CFrame.new(-6.13871098, 4.49999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- head.Position = Vector3.new(-6.13871098, 4.49999905, -11.4352522)
- head.Color = Color3.new(0.643137, 0.741176, 0.278431)
- head.Size = Vector3.new(2, 1, 1)
- head.BrickColor = BrickColor.new("Br. yellowish green")
- head.TopSurface = Enum.SurfaceType.Smooth
- head.brickColor = BrickColor.new("Br. yellowish green")
- head.FormFactor = Enum.FormFactor.Symmetric
- head.formFactor = Enum.FormFactor.Symmetric
- SpecialMesh2.Parent = head
- SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal3.Name = "face"
- Decal3.Parent = head
- Decal3.Texture = "http://www.roblox.com/asset/?id=8560915"
- torso.Name = "Torso"
- torso.Parent = char
- torso.CFrame = CFrame.new(-6.13871098, 2.99999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- torso.Position = Vector3.new(-6.13871098, 2.99999905, -11.4352522)
- torso.Color = Color3.new(1, 1, 0)
- torso.Size = Vector3.new(2, 2, 1)
- torso.BrickColor = BrickColor.new("New Yeller")
- torso.LeftParamA = 0
- torso.LeftParamB = 0
- torso.LeftSurface = Enum.SurfaceType.Weld
- torso.RightParamA = 0
- torso.RightParamB = 0
- torso.RightSurface = Enum.SurfaceType.Weld
- torso.brickColor = BrickColor.new("New Yeller")
- torso.FormFactor = Enum.FormFactor.Symmetric
- torso.formFactor = Enum.FormFactor.Symmetric
- Decal5.Name = "roblox"
- Decal5.Parent = torso
- Motor6.Name = "Right Shoulder"
- Motor6.Parent = torso
- Motor6.MaxVelocity = 0.15000000596046
- Motor6.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6.Part0 = torso
- Motor6.Part1 = rarm
- Motor6.Part1 = rarm
- Motor7.Name = "Left Shoulder"
- Motor7.Parent = torso
- Motor7.MaxVelocity = 0.15000000596046
- Motor7.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor7.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor7.Part0 = torso
- Motor7.Part1 = larm
- Motor7.Part1 = larm
- Motor8.Name = "Right Hip"
- Motor8.Parent = torso
- Motor8.MaxVelocity = 0.10000000149012
- Motor8.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor8.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor8.Part0 = torso
- Motor8.Part1 = rleg
- Motor8.Part1 = rleg
- Motor9.Name = "Left Hip"
- Motor9.Parent = torso
- Motor9.MaxVelocity = 0.10000000149012
- Motor9.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor9.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor9.Part0 = torso
- Motor9.Part1 = lleg
- Motor9.Part1 = lleg
- Motor10.Name = "Neck"
- Motor10.Parent = torso
- Motor10.MaxVelocity = 0.10000000149012
- Motor10.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor10.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor10.Part0 = torso
- Motor10.Part1 = head
- Motor10.Part1 = head
- larm.Name = "Left Arm"
- larm.Parent = char
- larm.CFrame = CFrame.new(-7.63871098, 2.99999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- larm.Position = Vector3.new(-7.63871098, 2.99999905, -11.4352522)
- larm.Color = Color3.new(0.643137, 0.741176, 0.278431)
- larm.Size = Vector3.new(1, 2, 1)
- larm.BrickColor = BrickColor.new("Br. yellowish green")
- larm.CanCollide = false
- larm.brickColor = BrickColor.new("Br. yellowish green")
- larm.FormFactor = Enum.FormFactor.Symmetric
- larm.formFactor = Enum.FormFactor.Symmetric
- rarm.Name = "Right Arm"
- rarm.Parent = char
- rarm.CFrame = CFrame.new(-4.63871098, 2.99999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- rarm.Position = Vector3.new(-4.63871098, 2.99999905, -11.4352522)
- rarm.Color = Color3.new(0.643137, 0.741176, 0.278431)
- rarm.Size = Vector3.new(1, 2, 1)
- rarm.BrickColor = BrickColor.new("Br. yellowish green")
- rarm.CanCollide = false
- rarm.brickColor = BrickColor.new("Br. yellowish green")
- rarm.FormFactor = Enum.FormFactor.Symmetric
- rarm.formFactor = Enum.FormFactor.Symmetric
- lleg.Name = "Left Leg"
- lleg.Parent = char
- lleg.CFrame = CFrame.new(-6.63871098, 0.999999046, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- lleg.Position = Vector3.new(-6.63871098, 0.999999046, -11.4352522)
- lleg.Color = Color3.new(1, 1, 0)
- lleg.Size = Vector3.new(1, 2, 1)
- lleg.BottomSurface = Enum.SurfaceType.Smooth
- lleg.BrickColor = BrickColor.new("New Yeller")
- lleg.CanCollide = false
- lleg.TopSurface = Enum.SurfaceType.Inlet
- lleg.brickColor = BrickColor.new("New Yeller")
- lleg.FormFactor = Enum.FormFactor.Symmetric
- lleg.formFactor = Enum.FormFactor.Symmetric
- rleg.Name = "Right Leg"
- rleg.Parent = char
- rleg.CFrame = CFrame.new(-5.63871098, 0.999999046, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- rleg.Position = Vector3.new(-5.63871098, 0.999999046, -11.4352522)
- rleg.Color = Color3.new(1, 1, 0)
- rleg.Size = Vector3.new(1, 2, 1)
- rleg.BottomSurface = Enum.SurfaceType.Smooth
- rleg.BrickColor = BrickColor.new("New Yeller")
- rleg.CanCollide = false
- rleg.TopSurface = Enum.SurfaceType.Inlet
- rleg.brickColor = BrickColor.new("New Yeller")
- rleg.FormFactor = Enum.FormFactor.Symmetric
- rleg.formFactor = Enum.FormFactor.Symmetric
- hum.Parent = char
- hum.LeftLeg = lleg
- hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
- hum.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- hum.RightLeg = rleg
- hum.Torso = torso
- CFrameValue16.Name = "IsAPlayer"
- CFrameValue16.Parent = char
- BoolValue17.Name = "Respawn"
- BoolValue17.Parent = char
- BoolValue17.Value = true
- IntValue18.Name = "Force_Weapon"
- IntValue18.Parent = char
- BoolValue19.Name = "IsOnTeam"
- BoolValue19.Parent = char
- BrickColorValue20.Name = "Team"
- BrickColorValue20.Parent = BoolValue19
- BrickColorValue20.Value = BrickColor.new("Really black")
- BoolValue21.Name = "ShowTag"
- BoolValue21.Parent = BoolValue19
- BoolValue22.Name = "IgnoreCombatFF"
- BoolValue22.Parent = char
- BoolValue22.Value = true
- BoolValue23.Name = "DropWeapon"
- BoolValue23.Parent = char
- BoolValue23.Value = true
- Vector3Value24.Name = "PathTo"
- Vector3Value24.Parent = char
- BoolValue25.Name = "Wander"
- BoolValue25.Parent = char
- BoolValue25.Value = true
- BoolValue26.Name = "PrintMap"
- BoolValue26.Parent = char
- BodyColors27.Parent = char
- BodyColors27.HeadColor = BrickColor.new(bodyColors.headColorId) or BrickColor.new("Br. yellowish green")
- BodyColors27.LeftArmColor = BrickColor.new(bodyColors.leftArmColorId) or BrickColor.new("Br. yellowish green")
- BodyColors27.LeftLegColor = BrickColor.new(bodyColors.leftLegColorId) or BrickColor.new("New Yeller")
- BodyColors27.RightArmColor = BrickColor.new(bodyColors.rightArmColorId) or BrickColor.new("Br. yellowish green")
- BodyColors27.RightLegColor = BrickColor.new(bodyColors.rightLegColorId) or BrickColor.new("New Yeller")
- BodyColors27.TorsoColor = BrickColor.new(bodyColors.torsoColorId) or BrickColor.new("New Yeller")
- BoolValue28.Name = "ForceColors"
- BoolValue28.Parent = BodyColors27
- local Hat0 = Instance.new("Hat")
- local Part1 = Instance.new("Part")
- local SpecialMesh2 = Instance.new("SpecialMesh")
- local Hat3 = Instance.new("Hat")
- local Part4 = Instance.new("Part")
- local SpecialMesh5 = Instance.new("SpecialMesh")
- Hat0.Name = "ClockworksShades"
- Hat0.Parent = char
- Hat0.AttachmentPoint = CFrame.new(0, 0.25999999, 0.150000006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Hat0.AttachmentPos = Vector3.new(0, 0.25999999, 0.150000006)
- Part1.Name = "Handle"
- Part1.Parent = Hat0
- Part1.CFrame = CFrame.new(6.14723778, 4.73999882, -13.5720253, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part1.Position = Vector3.new(6.14723778, 4.73999882, -13.5720253)
- Part1.Size = Vector3.new(1, 1.60000002, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.CanCollide = false
- Part1.Locked = true
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.formFactor = Enum.FormFactor.Plate
- SpecialMesh2.Parent = Part1
- SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1577360"
- SpecialMesh2.Scale = Vector3.new(1, 1.29999995, 1)
- SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=1577349"
- SpecialMesh2.MeshType = Enum.MeshType.FileMesh
- Hat3.Name = "DominoCrown"
- Hat3.Parent = char
- Hat3.AttachmentPoint = CFrame.new(0, -0.449999988, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Hat3.AttachmentPos = Vector3.new(0, -0.449999988, 0)
- Part4.Name = "Handle"
- Part4.Parent = Hat3
- Part4.CFrame = CFrame.new(6.14723778, 5.44999886, -13.4220257, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.Position = Vector3.new(6.14723778, 5.44999886, -13.4220257)
- Part4.Size = Vector3.new(1, 0.800000012, 1)
- Part4.BottomSurface = Enum.SurfaceType.Smooth
- Part4.CanCollide = false
- Part4.Locked = true
- Part4.TopSurface = Enum.SurfaceType.Smooth
- Part4.FormFactor = Enum.FormFactor.Plate
- Part4.formFactor = Enum.FormFactor.Plate
- SpecialMesh5.Parent = Part4
- SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=1031410"
- SpecialMesh5.Scale = Vector3.new(1.10000002, 1.10000002, 1.10000002)
- SpecialMesh5.TextureId = "http://www.roblox.com/asset/?id=1031417"
- SpecialMesh5.MeshType = Enum.MeshType.FileMesh
- if shirt ~= '' then
- local _shirt = Instance.new("Shirt")
- _shirt.ShirtTemplate = shirt
- _shirt.Parent = char
- end
- if pants ~= '' then
- local _pants = Instance.new("Pants")
- _pants.PantsTemplate = pants
- _pants.Parent = char
- end
- plr.Character = char
- set_owner()
- --Delay(0, function() --Vanilla Sound
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- spawn(function()
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end)
- end
- function newSound(id)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.archivable = false
- sound.Parent = head
- return sound
- end
- local sDied = newSound("rbxasset://sounds/uuhhh.wav")
- local sFallingDown = newSound("rbxasset://sounds/splat.wav")
- local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
- local sGettingUp = newSound("rbxasset://sounds/hit.wav")
- local sJumping = newSound("rbxasset://sounds/button.wav")
- local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
- sRunning.Looped = true
- local Figure = char
- local Head = waitForChild(Figure, "Head")
- local Humanoid = waitForChild(Figure, "Humanoid")
- function onDied()
- sDied:Play()
- end
- function onState(state, sound)
- if state then
- sound:Play()
- else
- sound:Pause()
- end
- end
- function onRunning(speed)
- if speed>0 then
- sRunning:Play()
- else
- sRunning:Pause()
- end
- end
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
- Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
- Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
- Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
- --end)
- --Delay(0, function() --Vanilla Health
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- spawn(function()
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end)
- end
- local Figure = char
- local Humanoid = waitForChild(Figure, "Humanoid")
- local regening = false
- function regenHealth()
- if regening then return end
- regening = true
- spawn(function()
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- end)
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- --end)
- --Delay(0, function() --Vanilla Animate, Multiple Additions
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- spawn(function()
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end)
- end
- local Figure = char
- local Clone = Figure:Clone()
- local Torso = waitForChild(Figure, "Torso")
- local Joints = Torso:GetChildren()
- for All = 1, #Joints do
- if Joints.className == "Motor" or Joints.className == "Motor6D" then
- Joints[All]:Remove()
- end
- end
- local RightShoulder = Instance.new("Motor")
- local LeftShoulder = Instance.new("Motor")
- local RightHip = Instance.new("Motor")
- local LeftHip = Instance.new("Motor")
- local Neck = Instance.new("Motor")
- local Humanoid = waitForChild(Figure, "Humanoid")
- ZStat = 1
- ZStat2 = 0
- local pose = "Standing"
- RightShoulder.Part0 = Torso
- RightShoulder.Part1 = Figure["Right Arm"]
- RightShoulder.MaxVelocity = 0.15
- RightShoulder.Name = "Right Shoulder"
- RightShoulder.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RightShoulder.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RightShoulder.Parent = Torso
- LeftShoulder.Part0 = Torso
- LeftShoulder.Part1 = Figure["Left Arm"]
- LeftShoulder.MaxVelocity = 0.15
- LeftShoulder.Name = "Left Shoulder"
- LeftShoulder.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LeftShoulder.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LeftShoulder.Parent = Torso
- RightHip.Part0 = Torso
- RightHip.Part1 = Figure["Right Leg"]
- RightHip.MaxVelocity = 0.1
- RightHip.Name = "Right Hip"
- RightHip.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RightHip.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- RightHip.Parent = Torso
- LeftHip.Part0 = Torso
- LeftHip.Part1 = Figure["Left Leg"]
- LeftHip.MaxVelocity = 0.1
- LeftHip.Name = "Left Hip"
- LeftHip.C0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LeftHip.C1 = CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- LeftHip.Parent = Torso
- Neck.Part0 = Torso
- Neck.Part1 = Figure["Head"]
- Neck.MaxVelocity = 0.1
- Neck.Name = "Neck"
- Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- Neck.Parent = Torso
- local toolAnim = "None"
- local toolAnimTime = 0
- SpawnModel = Instance.new("Model")
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function CheckTag(Tag)
- if char:FindFirstChild("IsLocalEnemy") == nil and char:FindFirstChild("IsAZombie") == nil and Tag.ClassName == "ObjectValue" and Tag.Value ~= nil and Tag.Value.ClassName == "Player" and Tag.Value.Character ~= nil then
- if Tag.Value.Character:FindFirstChild("IsLocalEnemy") == nil then
- if (char.IsOnTeam.Value == true and IsInCombat == false and char.IsOnTeam.Team.Value == Tag.Value.TeamColor) or char.IsOnTeam.Value == false then
- local Tag2 = Instance.new("CFrameValue", Tag.Value.Character)
- Tag2.Name = "IsLocalEnemy"
- --print(Tag.Value.Character.Name .." Has Become An Outlaw")
- end
- end
- if Tag.Value.Character:FindFirstChild("Loc" ..char.Name) ~= nil then
- Tag.Value.Character:FindFirstChild("Loc" ..char.Name):Remove()
- end
- local Found = Instance.new("CFrameValue", Tag.Value.Character)
- Found.Name = "Loc" ..char.Name
- game:GetService("Debris"):AddItem(Found, 3)
- elseif char:FindFirstChild("IsLocalEnemy") == nil and char:FindFirstChild("IsAZombie") == nil and Tag.ClassName == "StringValue" and game.Players:FindFirstChild(Tag.Value) ~= nil and game.Players[Tag.Value].Character ~= nil then
- if game.Players[Tag.Value].Character:FindFirstChild("IsLocalEnemy") == nil then
- if (char.IsOnTeam.Value == true and IsInCombat == false and char.IsOnTeam.Team.Value == game.Players[Tag.Value].TeamColor) or char.IsOnTeam.Value == false then
- local Tag2 = Instance.new("CFrameValue", game.Players[Tag.Value].Character)
- Tag2.Name = "IsLocalEnemy"
- --print(Tag.Value .." Has Become An Outlaw")
- end
- end
- if game.Players[Tag.Value].Character:FindFirstChild("Loc" ..char.Name) ~= nil then
- game.Players[Tag.Value].Character:FindFirstChild("Loc" ..char.Name):Remove()
- end
- local Found = Instance.new("CFrameValue", game.Players[Tag.Value].Character)
- Found.Name = "Loc" ..char.Name
- game:GetService("Debris"):AddItem(Found, 3)
- elseif char:FindFirstChild("IsLocalEnemy") == nil and char:FindFirstChild("IsAZombie") == nil and Tag.ClassName == "StringValue" and workspace:FindFirstChild(Tag.Value) ~= nil then
- if workspace[Tag.Value]:FindFirstChild("IsLocalEnemy") == nil then
- if (char.IsOnTeam.Value == true and IsInCombat == false and workspace[Tag.Value].IsOnTeam.Value == true and char.IsOnTeam.Team.Value == workspace[Tag.Value].IsOnTeam.Team.Value) or char.IsOnTeam.Value == false or workspace[Tag.Value].IsOnTeam.Value == false then
- local Tag2 = Instance.new("CFrameValue", workspace[Tag.Value])
- Tag2.Name = "IsLocalEnemy"
- --print(Tag.Value .." Has Become An Outlaw")
- end
- end
- if workspace[Tag.Value]:FindFirstChild("Loc" ..char.Name) ~= nil then
- workspace[Tag.Value]:FindFirstChild("Loc" ..char.Name):Remove()
- end
- local Found = Instance.new("CFrameValue", workspace[Tag.Value])
- Found.Name = "Loc" ..char.Name
- game:GetService("Debris"):AddItem(Found, 3)
- elseif (char:FindFirstChild("IsLocalEnemy") ~= nil or char:FindFirstChild("IsAZombie") ~= nil) and Tag.ClassName == "ObjectValue" and Tag.Value ~= nil and Tag.Value.ClassName == "Player" and Tag.Value.Character ~= nil then
- local Found = Instance.new("CFrameValue", Tag.Value.Character)
- Found.Name = "Loc" ..char.Name
- game:GetService("Debris"):AddItem(Found, 3)
- elseif (char:FindFirstChild("IsLocalEnemy") ~= nil or char:FindFirstChild("IsAZombie") ~= nil) and Tag.ClassName == "StringValue" and workspace:FindFirstChild(Tag.Value) ~= nil then
- local Found = Instance.new("CFrameValue", workspace[Tag.Value])
- Found.Name = "Loc" ..char.Name
- game:GetService("Debris"):AddItem(Found, 3)
- end
- end
- function CheckSpawns(Object)
- local Parts = Object:GetChildren()
- for Check = 1, #Parts do
- if Parts[Check].className == "SpawnLocation" then
- local I = Instance.new("Vector3Value", SpawnModel)
- I.Value = Parts[Check].Position
- end
- CheckSpawns(Parts[Check])
- end
- end
- function onDied()
- pose = "Dead"
- --[[
- wait(5)
- if char.Respawn.Value == true then
- CheckSpawns(Workspace)
- local Spawn = SpawnModel:GetChildren()
- Clone.Parent = workspace
- if #Spawn > 0 then
- Spawn = Spawn[math.random(1, #Spawn)].Value
- Clone:MoveTo(Spawn)
- else
- Clone:MoveTo(Vector3.new(0, 50, 0))
- end
- end
- Figure:Remove()
- return
- ]]
- end
- function onJumping()
- pose = "Jumping"
- end
- function onClimbing()
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function moveJump()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = (3.14/ZStat)
- LeftShoulder.DesiredAngle = (-3.14/ZStat)
- RightHip.DesiredAngle = (0)
- LeftHip.DesiredAngle = (0)
- end
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = (3.14/ZStat)
- LeftShoulder.DesiredAngle = (-3.14/ZStat)
- RightHip.DesiredAngle = (0)
- LeftHip.DesiredAngle = (0)
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder.DesiredAngle = (3.14 /2)
- LeftShoulder.DesiredAngle = (-3.14 /2)
- RightHip.DesiredAngle = (3.14 /2)
- LeftHip.DesiredAngle = (-3.14 /2)
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- RightShoulder.DesiredAngle = (1.57)
- return
- end
- if (toolAnim == "Slash") then
- RightShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = (0)
- return
- end
- if (toolAnim == "Lunge") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightHip.MaxVelocity = 0.5
- LeftHip.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = (1.57)
- LeftShoulder.DesiredAngle = (1.0)
- RightHip.DesiredAngle = (1.57)
- LeftHip.DesiredAngle = (1.0)
- return
- end
- end
- function move(time)
- local amplitude
- local frequency
- if (pose == "Jumping") then
- moveJump()
- return
- end
- if (pose == "FreeFall") then
- moveFreeFall()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- local climbFudge = 0
- if (pose == "Running") then
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- amplitude = 1
- frequency = 9
- elseif (pose == "Climbing") then
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- amplitude = 1
- frequency = 9
- climbFudge = 3.14
- else
- amplitude = 0.1
- frequency = 1
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- RightShoulder.DesiredAngle = (desiredAngle + climbFudge) + ZStat2
- LeftShoulder.DesiredAngle = (desiredAngle - climbFudge) -ZStat2
- RightHip.DesiredAngle = (-desiredAngle)
- LeftHip.DesiredAngle = (-desiredAngle)
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.ChildAdded:connect(CheckTag)
- OriginalTime = 0.1
- Time = OriginalTime
- spawn(function()
- while Figure.Parent~=nil do
- Time = Time + 0.1
- wait(OriginalTime)
- move(Time)
- end
- end)
- --end)
- --[[
- spawn(function()
- while char and char.Parent and torso and torso.Parent do
- wait(math.random(40, 70 + math.random(30, 120)) / 10)
- local Weapon = nil
- local ToolCheck = char:GetChildren()
- for Check = 1, #ToolCheck do
- if ToolCheck[Check].ClassName == "Tool" then
- Weapon = ToolCheck[Check]
- end
- end
- if Weapon ~= nil and Weapon:FindFirstChild("Active") ~= nil and Weapon:FindFirstChild("TargetPos") ~= nil and Weapon:FindFirstChild("Type") ~= nil then
- if Weapon.Type.Value == "HealDrink" then
- Weapon.Active.Value = true
- end
- end
- end
- end)
- ]]
- --end)
- end
- function set_owner()
- if char then else return end
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("BasePart") and v:CanSetNetworkOwnership() then
- v:SetNetworkOwner(plr)
- end
- end
- end
- local oldpos = CFrame.new()
- local rebirthing = false
- local updating_inv = false
- local connection = nil
- local barrier = nil
- if torso then
- oldpos = torso.CFrame
- end
- local remote = Instance.new("RemoteEvent")
- remote.Parent = plr['PlayerGui']
- remote.OnServerEvent:Connect(function(lplr,pos)
- if not rebirthing and (plr == lplr) then
- --oldpos = pos
- end
- end)
- local ls = [[
- local plr = game:GetService("Players").LocalPlayer
- local char = nil
- local torso = nil
- local hum = nil
- local remote = script.Parent
- local camera = workspace.CurrentCamera
- camera.CameraType = Enum.CameraType.Custom
- game:GetService("RunService").Heartbeat:Connect(function()
- spawn(function()
- if not char or not char.Parent or not torso or not torso.Parent or not hum or not hum.Parent then
- repeat wait() until plr.Character
- char = plr.Character
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
- hum = char:FindFirstChildOfClass("Humanoid")
- end
- if torso and torso.Parent then
- --remote:FireServer(torso.CFrame)
- end
- if char and char.Parent and hum and hum.Parent then
- camera.CameraSubject = hum
- end
- end)
- end)
- ]]
- NLS(ls,remote)
- local pdata = {
- ws = 16,
- hh = 0,
- msa = 89,
- jp = 50,
- sit = false,
- platformstand = false,
- autorotate = true,
- usejumppower = true,
- autojump = true,
- --breakjoints = false
- --jump = false,
- }
- function update_pdata(...)
- local data = ...
- pdata = data
- end
- function update_inv()
- if not updating_inv then else return end
- updating_inv = true
- for i,v in pairs(saved_tools:GetChildren()) do v:Destroy(); end;
- for i,v in pairs(plr['Backpack']:GetChildren()) do
- v:Clone().Parent = saved_tools
- end
- for i,v in pairs(char:GetChildren()) do
- v:Clone().Parent = saved_tools
- end
- updating_inv = false
- end
- function load_inv()
- spawn(function()
- for i,v in pairs(saved_tools:GetChildren()) do
- v:Clone().Parent = plr['Backpack']
- end
- end)
- end
- function smart_add(p)
- spawn(function()
- for i,v in pairs(p:GetChildren()) do
- v.ChildAdded:Connect(function(obj)
- if obj:IsA('Script') or obj:IsA('LocalScript') or obj:IsA('BodyForce') or obj:IsA('BodyGyro') or obj:IsA('BodyAngularVelocity') or obj:IsA('BodyPosition') or obj:IsA('BodyMover') or obj:IsA('BodyVelocity') or obj:IsA('BodyThrust') then
- obj:Destroy()
- end
- end)
- end
- end)
- end
- function load_pdata(char,torso,hum)
- pcall(function()
- hum.WalkSpeed = pdata.ws or 16;
- hum.HipHeight = pdata.hh or 0;
- hum.MaxSlopeAngle = pdata.msa or 89;
- hum.JumpPower = pdata.jp or 50;
- hum.Sit = pdata.sit or false;
- hum.PlatformStand = pdata.platformstand or false;
- hum.AutoRotate = pdata.autorotate or true;
- hum.UseJumpPower = pdata.usejumppower or true;
- hum.AutoJumpEnabled = pdata.autojump or true;
- hum.BreakJointsOnDeath = false;
- hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false);
- hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false);
- hum.MaxHealth = 1/0
- hum.Health = 1/0
- torso.Velocity = Vector3.new()
- torso.CFrame = oldpos
- local ff = char:FindFirstChildOfClass("ForceField")
- if ff then
- ff:Destroy()
- end
- local ff = Instance.new("ForceField")
- ff.Visible = false
- ff.Parent = char
- smart_add(char)
- make_barrier(torso,char,workspace)
- end)
- end
- function make_barrier(root,char,p)
- spawn(function()
- barrier = Instance.new("Part")
- barrier.Name = game:GetService("HttpService"):GenerateGUID(false) or ''
- barrier.Transparency = 1
- barrier.Size = Vector3.new(10,10,10)
- barrier.CanCollide = false
- barrier.Massless = true
- barrier.Locked = true
- barrier.Archivable = false
- barrier.Parent = p
- local weld = Instance.new("Weld")
- weld.Part0 = root
- weld.Part1 = barrier
- weld.Parent = barrier
- barrier.Touched:Connect(function(obj)
- local n = string.lower(obj.Name)
- --local found = false
- if (n and (n == 'base' or n == 'baseplate')) or (char and obj:IsDescendantOf(char)) or not obj:FindFirstChildOfClass('TouchInterest') then
- --found = true
- else
- obj = nil;
- end
- end)
- connection = p.ChildRemoved:Connect(function(obj)
- if obj == barrier or obj == weld then
- if obj then obj:Destroy(); end; if connection then connection:Disconnect(); end;
- make_barrier(root,char,p)
- end
- end)
- barrier.ChildRemoved:Connect(function(obj)
- if obj == weld then
- if connection then connection:Disconnect(); end; if barrier then barrier:Destroy(); end;
- make_barrier(root,char,p)
- end
- end)
- end)
- end
- function rebirth()
- rebirthing = true
- make_char()
- --load_inv()
- load_pdata(char,torso,hum)
- rebirthing = false
- setup()
- end
- function setup()
- local died = false
- local function alive()
- local alive = false
- if char and char.Parent and (char.Parent == workspace) and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
- alive = true
- end
- return alive
- end
- --spawn(function()
- while not died do
- if not alive() then
- died = true
- end
- if not alive() and not rebirthing then
- rebirth()
- end
- if alive() and not rebirthing and not died then
- local tdata = {
- --ws = hum.WalkSpeed,
- --hh = hum.HipHeight,
- --msa = hum.MaxSlopeAngle,
- --jp = hum.JumpPower,
- sit = hum.Sit,
- --platformstand = hum.PlatformStand,
- --autorotate = hum.AutoRotate,
- --usejumppower = hum.UseJumpPower,
- --autojump = hum.AutoJumpEnabled,
- }
- --update_inv()
- update_pdata(tdata)
- if char then
- --plr.Character = char
- end
- hum.MaxHealth = 1/0; hum.Health = 1/0;
- if 100 >= (torso.Position.Y-workspace.FallenPartsDestroyHeight) then
- barrier.Velocity = Vector3.new()
- barrier.Position = Vector3.new(math.random(1,100),5,math.random(1,100))
- end
- oldpos = torso.CFrame
- end
- game:GetService("RunService").Heartbeat:Wait(1/30)
- end
- --end)
- end
- rebirth()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement