Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Guest 7241
- --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"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Decal2 = Instance.new("Decal")
- Script3 = Instance.new("Script")
- Model4 = Instance.new("Model")
- Part5 = Instance.new("Part")
- Part6 = Instance.new("Part")
- Part7 = Instance.new("Part")
- Motor6D8 = Instance.new("Motor6D")
- Motor6D9 = Instance.new("Motor6D")
- Motor6D10 = Instance.new("Motor6D")
- Motor6D11 = Instance.new("Motor6D")
- Motor6D12 = Instance.new("Motor6D")
- BodyGyro13 = Instance.new("BodyGyro")
- Part14 = Instance.new("Part")
- Part15 = Instance.new("Part")
- Weld16 = Instance.new("Weld")
- Weld17 = Instance.new("Weld")
- Weld18 = Instance.new("Weld")
- Weld19 = Instance.new("Weld")
- Weld20 = Instance.new("Weld")
- Weld21 = Instance.new("Weld")
- Weld22 = Instance.new("Weld")
- Weld23 = Instance.new("Weld")
- Weld24 = Instance.new("Weld")
- Weld25 = Instance.new("Weld")
- Weld26 = Instance.new("Weld")
- Weld27 = Instance.new("Weld")
- Weld28 = Instance.new("Weld")
- Weld29 = Instance.new("Weld")
- Weld30 = Instance.new("Weld")
- Weld31 = Instance.new("Weld")
- Weld32 = Instance.new("Weld")
- Weld33 = Instance.new("Weld")
- Weld34 = Instance.new("Weld")
- Weld35 = Instance.new("Weld")
- Weld36 = Instance.new("Weld")
- Weld37 = Instance.new("Weld")
- Weld38 = Instance.new("Weld")
- Weld39 = Instance.new("Weld")
- Weld40 = Instance.new("Weld")
- Weld41 = Instance.new("Weld")
- Weld42 = Instance.new("Weld")
- Weld43 = Instance.new("Weld")
- Weld44 = Instance.new("Weld")
- Weld45 = Instance.new("Weld")
- Weld46 = Instance.new("Weld")
- Weld47 = Instance.new("Weld")
- Weld48 = Instance.new("Weld")
- Weld49 = Instance.new("Weld")
- Weld50 = Instance.new("Weld")
- Weld51 = Instance.new("Weld")
- Weld52 = Instance.new("Weld")
- Weld53 = Instance.new("Weld")
- Weld54 = Instance.new("Weld")
- Weld55 = Instance.new("Weld")
- Weld56 = Instance.new("Weld")
- Weld57 = Instance.new("Weld")
- Weld58 = Instance.new("Weld")
- Weld59 = Instance.new("Weld")
- Weld60 = Instance.new("Weld")
- Weld61 = Instance.new("Weld")
- Weld62 = Instance.new("Weld")
- Weld63 = Instance.new("Weld")
- Weld64 = Instance.new("Weld")
- Weld65 = Instance.new("Weld")
- Weld66 = Instance.new("Weld")
- Weld67 = Instance.new("Weld")
- Weld68 = Instance.new("Weld")
- Weld69 = Instance.new("Weld")
- Weld70 = Instance.new("Weld")
- Weld71 = Instance.new("Weld")
- Weld72 = Instance.new("Weld")
- Weld73 = Instance.new("Weld")
- Weld74 = Instance.new("Weld")
- Weld75 = Instance.new("Weld")
- Weld76 = Instance.new("Weld")
- Weld77 = Instance.new("Weld")
- Weld78 = Instance.new("Weld")
- Weld79 = Instance.new("Weld")
- Weld80 = Instance.new("Weld")
- Weld81 = Instance.new("Weld")
- Weld82 = Instance.new("Weld")
- Weld83 = Instance.new("Weld")
- Weld84 = Instance.new("Weld")
- Weld85 = Instance.new("Weld")
- Weld86 = Instance.new("Weld")
- Weld87 = Instance.new("Weld")
- Weld88 = Instance.new("Weld")
- Weld89 = Instance.new("Weld")
- Weld90 = Instance.new("Weld")
- Weld91 = Instance.new("Weld")
- Weld92 = Instance.new("Weld")
- Weld93 = Instance.new("Weld")
- Weld94 = Instance.new("Weld")
- Weld95 = Instance.new("Weld")
- Weld96 = Instance.new("Weld")
- Weld97 = Instance.new("Weld")
- Weld98 = Instance.new("Weld")
- Part99 = Instance.new("Part")
- SpecialMesh100 = Instance.new("SpecialMesh")
- Decal101 = Instance.new("Decal")
- Script102 = Instance.new("Script")
- Tool103 = Instance.new("Tool")
- Part104 = Instance.new("Part")
- SpecialMesh105 = Instance.new("SpecialMesh")
- Script106 = Instance.new("Script")
- BodyAngularVelocity107 = Instance.new("BodyAngularVelocity")
- IntValue108 = Instance.new("IntValue")
- IntValue109 = Instance.new("IntValue")
- NumberValue110 = Instance.new("NumberValue")
- BoolValue111 = Instance.new("BoolValue")
- StringValue112 = Instance.new("StringValue")
- BoolValue113 = Instance.new("BoolValue")
- IntValue114 = Instance.new("IntValue")
- Script115 = Instance.new("Script")
- Script116 = Instance.new("Script")
- IntValue117 = Instance.new("IntValue")
- Script118 = Instance.new("Script")
- BoolValue119 = Instance.new("BoolValue")
- Script120 = Instance.new("Script")
- Script121 = Instance.new("Script")
- Script122 = Instance.new("Script")
- Weld123 = Instance.new("Weld")
- Script124 = Instance.new("Script")
- Humanoid125 = Instance.new("Humanoid")
- Script126 = Instance.new("Script")
- Weld127 = Instance.new("Weld")
- Script128 = Instance.new("Script")
- Script129 = Instance.new("Script")
- Script130 = Instance.new("Script")
- Script131 = Instance.new("Script")
- Weld132 = Instance.new("Weld")
- Script133 = Instance.new("Script")
- Weld134 = Instance.new("Weld")
- Script135 = Instance.new("Script")
- Script136 = Instance.new("Script")
- Script137 = Instance.new("Script")
- Script138 = Instance.new("Script")
- Script139 = Instance.new("Script")
- Script140 = Instance.new("Script")
- Script141 = Instance.new("Script")
- Script142 = Instance.new("Script")
- NumberValue143 = Instance.new("NumberValue")
- IntValue144 = Instance.new("IntValue")
- BoolValue145 = Instance.new("BoolValue")
- NumberValue146 = Instance.new("NumberValue")
- Script147 = Instance.new("Script")
- Script148 = Instance.new("Script")
- Weld149 = Instance.new("Weld")
- Script150 = Instance.new("Script")
- Weld151 = Instance.new("Weld")
- Script152 = Instance.new("Script")
- Weld153 = Instance.new("Weld")
- Script154 = Instance.new("Script")
- Weld155 = Instance.new("Weld")
- Script156 = Instance.new("Script")
- Script157 = Instance.new("Script")
- Script158 = Instance.new("Script")
- Script159 = Instance.new("Script")
- Script160 = Instance.new("Script")
- Script161 = Instance.new("Script")
- Script162 = Instance.new("Script")
- Script163 = Instance.new("Script")
- Script164 = Instance.new("Script")
- Script165 = Instance.new("Script")
- IntValue166 = Instance.new("IntValue")
- Script167 = Instance.new("Script")
- Script168 = Instance.new("Script")
- Script169 = Instance.new("Script")
- Script170 = Instance.new("Script")
- IntValue171 = Instance.new("IntValue")
- Script172 = Instance.new("Script")
- Script173 = Instance.new("Script")
- Script174 = Instance.new("Script")
- Model0.Name = "dont delete"
- Model0.Parent = mas
- Part1.Name = "BotSpawn"
- Part1.Parent = Model0
- Part1.Rotation = Vector3.new(180, 0, -180)
- Part1.Anchored = true
- Part1.Size = Vector3.new(6, 1.20000005, 6)
- Part1.CFrame = CFrame.new(36.0099983, 0.600000024, -15.9499798, -0.999994278, 3.97376493e-24, 0, 4.04159671e-24, 1, -2.66773825e-25, 0, -2.71330754e-25, -0.999994278)
- Part1.BackSurface = Enum.SurfaceType.Weld
- Part1.BottomSurface = Enum.SurfaceType.Weld
- Part1.FrontSurface = Enum.SurfaceType.Weld
- Part1.LeftSurface = Enum.SurfaceType.Weld
- Part1.RightSurface = Enum.SurfaceType.Weld
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Position = Vector3.new(36.0099983, 0.600000024, -15.9499798)
- Part1.Orientation = Vector3.new(0, 180, 0)
- Decal2.Parent = Part1
- Decal2.Texture = "rbxasset://Textures/SpawnLocation.png"
- Decal2.Face = Enum.NormalId.Top
- Script3.Name = "Respawn"
- Script3.Parent = Part1
- table.insert(cors,sandbox(Script3,function()
- Figure = script.Parent.Parent:findFirstChild("Guest 7241")
- NewFig = Figure:Clone()
- Humanoid = Figure.Humanoid
- Debris = game:GetService("Debris")
- function onDied()
- wait(5)
- OldFigure = Figure
- Respawn = NewFig:Clone()
- Respawn.Parent = script.Parent.Parent
- Respawn:MakeJoints()
- Humanoid = Respawn.Humanoid
- Humanoid.Died:connect(onDied)
- OldFigure:Remove()
- ForceField = Instance.new("ForceField")
- ForceField.Parent = Respawn
- Debris:AddItem(ForceField, 11)
- Figure = Respawn
- end
- Humanoid.Died:connect(onDied)
- end))
- Model4.Name = "Guest 7241"
- Model4.Parent = Model0
- Part5.Name = "Left Leg"
- Part5.Parent = Model4
- Part5.BrickColor = BrickColor.new("Bright blue")
- Part5.Rotation = Vector3.new(180, 0, 180)
- Part5.RotVelocity = Vector3.new(-2.12814831e-22, 1.90315357e-22, -2.08932575e-22)
- Part5.Velocity = Vector3.new(3.62148461e-20, 0.0218018591, 3.68462111e-20)
- Part5.CanCollide = false
- Part5.FormFactor = Enum.FormFactor.Symmetric
- Part5.Size = Vector3.new(1, 2, 1)
- Part5.CFrame = CFrame.new(36.5099831, 2.20053005, -16.449976, -0.999994099, -1.53733789e-21, -5.96042966e-08, -1.5372765e-21, 1, -5.38734948e-22, 5.96042966e-08, -5.38736614e-22, -0.999994099)
- Part5.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part5.Position = Vector3.new(36.5099831, 2.20053005, -16.449976)
- Part5.Orientation = Vector3.new(0, -180, 0)
- Part5.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part6.Name = "Right Leg"
- Part6.Parent = Model4
- Part6.BrickColor = BrickColor.new("Bright blue")
- Part6.Rotation = Vector3.new(180, 0, 180)
- Part6.CanCollide = false
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(1, 2, 1)
- Part6.CFrame = CFrame.new(35.5099983, 2.20053005, -16.449976, -0.999994099, -1.53733789e-21, -5.96042966e-08, -1.5372765e-21, 1, -5.38734948e-22, 5.96042966e-08, -5.38736614e-22, -0.999994099)
- Part6.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part6.Position = Vector3.new(35.5099983, 2.20053005, -16.449976)
- Part6.Orientation = Vector3.new(0, -180, 0)
- Part6.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part7.Name = "Torso"
- Part7.Parent = Model4
- Part7.BrickColor = BrickColor.new("Bright green")
- Part7.Rotation = Vector3.new(180, 0, -180)
- Part7.FormFactor = Enum.FormFactor.Symmetric
- Part7.Size = Vector3.new(2, 2, 1)
- Part7.CFrame = CFrame.new(36.0099983, 4.19956493, -16.449976, -0.999994278, 3.97376493e-24, 0, 4.04159671e-24, 1, -2.66773825e-25, 0, -2.71330754e-25, -0.999994278)
- Part7.BottomSurface = Enum.SurfaceType.Smooth
- Part7.Color = Color3.new(0.294118, 0.592157, 0.294118)
- Part7.Position = Vector3.new(36.0099983, 4.19956493, -16.449976)
- Part7.Orientation = Vector3.new(0, 180, 0)
- Part7.Color = Color3.new(0.294118, 0.592157, 0.294118)
- Motor6D8.Name = "Right Shoulder"
- Motor6D8.Parent = Part7
- Motor6D8.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D8.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D8.DesiredAngle = 1.5700000524521
- Motor6D8.MaxVelocity = 0.5
- Motor6D9.Name = "Right Hip"
- Motor6D9.Parent = Part7
- Motor6D9.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D9.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D9.DesiredAngle = -0.0587741099298
- Motor6D9.MaxVelocity = 0.10000000149012
- Motor6D10.Name = "Neck"
- Motor6D10.Parent = Part7
- Motor6D10.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D10.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D10.MaxVelocity = 0.10000000149012
- Motor6D11.Name = "Left Shoulder"
- Motor6D11.Parent = Part7
- Motor6D11.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D11.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D11.DesiredAngle = 0.0587741099298
- Motor6D11.MaxVelocity = 0.5
- Motor6D12.Name = "Left Hip"
- Motor6D12.Parent = Part7
- Motor6D12.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D12.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D12.DesiredAngle = -0.0587741099298
- Motor6D12.MaxVelocity = 0.10000000149012
- BodyGyro13.Parent = Part7
- Part14.Name = "Left Arm"
- Part14.Parent = Model4
- Part14.BrickColor = BrickColor.new("Bright yellow")
- Part14.Rotation = Vector3.new(180, 0, 180)
- Part14.CanCollide = false
- Part14.FormFactor = Enum.FormFactor.Symmetric
- Part14.Size = Vector3.new(1, 2, 1)
- Part14.CFrame = CFrame.new(34.5099983, 4.20004702, -16.449976, -0.999994099, -1.53733789e-21, -5.96042966e-08, -1.5372765e-21, 1, -5.38734948e-22, 5.96042966e-08, -5.38736614e-22, -0.999994099)
- Part14.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part14.Position = Vector3.new(34.5099983, 4.20004702, -16.449976)
- Part14.Orientation = Vector3.new(0, -180, 0)
- Part14.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part15.Name = "Right Arm"
- Part15.Parent = Model4
- Part15.BrickColor = BrickColor.new("Bright yellow")
- Part15.Rotation = Vector3.new(180, 0, 180)
- Part15.RotVelocity = Vector3.new(-2.12814831e-22, 1.90315357e-22, -2.08932575e-22)
- Part15.Velocity = Vector3.new(3.6061766e-20, 0.0218018591, 3.66108976e-20)
- Part15.CanCollide = false
- Part15.FormFactor = Enum.FormFactor.Symmetric
- Part15.Size = Vector3.new(1, 2, 1)
- Part15.CFrame = CFrame.new(37.5099831, 4.70014811, -16.4499741, -0.999993742, -1.53733991e-21, -5.96042753e-08, -1.53727387e-21, 1, -5.38734544e-22, 5.96042753e-08, -5.38736715e-22, -0.999993742)
- Part15.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part15.Position = Vector3.new(37.5099831, 4.70014811, -16.4499741)
- Part15.Orientation = Vector3.new(0, -180, 0)
- Part15.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Weld16.Name = "RightGrip"
- Weld16.Parent = Part15
- Weld16.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld16.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld17.Name = "RightGrip"
- Weld17.Parent = Part15
- Weld17.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld17.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld18.Name = "RightGrip"
- Weld18.Parent = Part15
- Weld18.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld18.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld19.Name = "RightGrip"
- Weld19.Parent = Part15
- Weld19.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld19.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld20.Name = "RightGrip"
- Weld20.Parent = Part15
- Weld20.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld20.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld21.Name = "RightGrip"
- Weld21.Parent = Part15
- Weld21.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld21.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld22.Name = "RightGrip"
- Weld22.Parent = Part15
- Weld22.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld22.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld23.Name = "RightGrip"
- Weld23.Parent = Part15
- Weld23.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld23.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld24.Name = "RightGrip"
- Weld24.Parent = Part15
- Weld24.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld24.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld25.Name = "RightGrip"
- Weld25.Parent = Part15
- Weld25.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld25.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld26.Name = "RightGrip"
- Weld26.Parent = Part15
- Weld26.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld26.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld27.Name = "RightGrip"
- Weld27.Parent = Part15
- Weld27.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld27.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld28.Name = "RightGrip"
- Weld28.Parent = Part15
- Weld28.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld28.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld29.Name = "RightGrip"
- Weld29.Parent = Part15
- Weld29.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld29.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld30.Name = "RightGrip"
- Weld30.Parent = Part15
- Weld30.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld30.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld31.Name = "RightGrip"
- Weld31.Parent = Part15
- Weld31.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld31.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld32.Name = "RightGrip"
- Weld32.Parent = Part15
- Weld32.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld32.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld33.Name = "RightGrip"
- Weld33.Parent = Part15
- Weld33.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld33.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld34.Name = "RightGrip"
- Weld34.Parent = Part15
- Weld34.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld34.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld35.Name = "RightGrip"
- Weld35.Parent = Part15
- Weld35.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld35.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld36.Name = "RightGrip"
- Weld36.Parent = Part15
- Weld36.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld36.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld37.Name = "RightGrip"
- Weld37.Parent = Part15
- Weld37.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld37.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld38.Name = "RightGrip"
- Weld38.Parent = Part15
- Weld38.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld38.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld39.Name = "RightGrip"
- Weld39.Parent = Part15
- Weld39.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld39.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld40.Name = "RightGrip"
- Weld40.Parent = Part15
- Weld40.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld40.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld41.Name = "RightGrip"
- Weld41.Parent = Part15
- Weld41.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld41.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld42.Name = "RightGrip"
- Weld42.Parent = Part15
- Weld42.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld42.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld43.Name = "RightGrip"
- Weld43.Parent = Part15
- Weld43.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld43.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld44.Name = "RightGrip"
- Weld44.Parent = Part15
- Weld44.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld44.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld45.Name = "RightGrip"
- Weld45.Parent = Part15
- Weld45.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld45.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld46.Name = "RightGrip"
- Weld46.Parent = Part15
- Weld46.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld46.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld47.Name = "RightGrip"
- Weld47.Parent = Part15
- Weld47.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld47.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld48.Name = "RightGrip"
- Weld48.Parent = Part15
- Weld48.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld48.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld49.Name = "RightGrip"
- Weld49.Parent = Part15
- Weld49.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld49.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld50.Name = "RightGrip"
- Weld50.Parent = Part15
- Weld50.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld50.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld51.Name = "RightGrip"
- Weld51.Parent = Part15
- Weld51.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld51.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld52.Name = "RightGrip"
- Weld52.Parent = Part15
- Weld52.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld52.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld53.Name = "RightGrip"
- Weld53.Parent = Part15
- Weld53.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld53.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld54.Name = "RightGrip"
- Weld54.Parent = Part15
- Weld54.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld54.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld55.Name = "RightGrip"
- Weld55.Parent = Part15
- Weld55.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld55.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld56.Name = "RightGrip"
- Weld56.Parent = Part15
- Weld56.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld56.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld57.Name = "RightGrip"
- Weld57.Parent = Part15
- Weld57.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld57.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld58.Name = "RightGrip"
- Weld58.Parent = Part15
- Weld58.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld58.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld59.Name = "RightGrip"
- Weld59.Parent = Part15
- Weld59.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld59.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld60.Name = "RightGrip"
- Weld60.Parent = Part15
- Weld60.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld60.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld61.Name = "RightGrip"
- Weld61.Parent = Part15
- Weld61.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld61.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld62.Name = "RightGrip"
- Weld62.Parent = Part15
- Weld62.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld62.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld63.Name = "RightGrip"
- Weld63.Parent = Part15
- Weld63.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld63.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld64.Name = "RightGrip"
- Weld64.Parent = Part15
- Weld64.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld64.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld65.Name = "RightGrip"
- Weld65.Parent = Part15
- Weld65.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld65.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld66.Name = "RightGrip"
- Weld66.Parent = Part15
- Weld66.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld66.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld67.Name = "RightGrip"
- Weld67.Parent = Part15
- Weld67.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld67.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld68.Name = "RightGrip"
- Weld68.Parent = Part15
- Weld68.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld68.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld69.Name = "RightGrip"
- Weld69.Parent = Part15
- Weld69.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld69.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld70.Name = "RightGrip"
- Weld70.Parent = Part15
- Weld70.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld70.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld71.Name = "RightGrip"
- Weld71.Parent = Part15
- Weld71.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld71.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld72.Name = "RightGrip"
- Weld72.Parent = Part15
- Weld72.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld72.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld73.Name = "RightGrip"
- Weld73.Parent = Part15
- Weld73.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld73.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld74.Name = "RightGrip"
- Weld74.Parent = Part15
- Weld74.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld74.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld75.Name = "RightGrip"
- Weld75.Parent = Part15
- Weld75.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld75.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld76.Name = "RightGrip"
- Weld76.Parent = Part15
- Weld76.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld76.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld77.Name = "RightGrip"
- Weld77.Parent = Part15
- Weld77.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld77.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld78.Name = "RightGrip"
- Weld78.Parent = Part15
- Weld78.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld78.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld79.Name = "RightGrip"
- Weld79.Parent = Part15
- Weld79.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld79.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld80.Name = "RightGrip"
- Weld80.Parent = Part15
- Weld80.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld80.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld81.Name = "RightGrip"
- Weld81.Parent = Part15
- Weld81.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld81.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld82.Name = "RightGrip"
- Weld82.Parent = Part15
- Weld82.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld82.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld83.Name = "RightGrip"
- Weld83.Parent = Part15
- Weld83.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld83.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld84.Name = "RightGrip"
- Weld84.Parent = Part15
- Weld84.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld84.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld85.Name = "RightGrip"
- Weld85.Parent = Part15
- Weld85.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld85.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld86.Name = "RightGrip"
- Weld86.Parent = Part15
- Weld86.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld86.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld87.Name = "RightGrip"
- Weld87.Parent = Part15
- Weld87.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld87.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld88.Name = "RightGrip"
- Weld88.Parent = Part15
- Weld88.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld88.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld89.Name = "RightGrip"
- Weld89.Parent = Part15
- Weld89.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld89.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld90.Name = "RightGrip"
- Weld90.Parent = Part15
- Weld90.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld90.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld91.Name = "RightGrip"
- Weld91.Parent = Part15
- Weld91.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld91.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld92.Name = "RightGrip"
- Weld92.Parent = Part15
- Weld92.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld92.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld93.Name = "RightGrip"
- Weld93.Parent = Part15
- Weld93.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld93.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld94.Name = "RightGrip"
- Weld94.Parent = Part15
- Weld94.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld94.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld95.Name = "RightGrip"
- Weld95.Parent = Part15
- Weld95.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld95.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld96.Name = "RightGrip"
- Weld96.Parent = Part15
- Weld96.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld96.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld97.Name = "RightGrip"
- Weld97.Parent = Part15
- Weld97.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld97.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld98.Name = "RightGrip"
- Weld98.Parent = Part15
- Weld98.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0)
- Weld98.C1 = CFrame.new(0, 0, -1.5, 0, 0, 1, 1, 0, 0, 0, 1, 0)
- Weld98.Part0 = Part15
- Weld98.Part1 = Part104
- Part99.Name = "Head"
- Part99.Parent = Model4
- Part99.BrickColor = BrickColor.new("Bright yellow")
- Part99.Rotation = Vector3.new(180, 0, -180)
- Part99.FormFactor = Enum.FormFactor.Symmetric
- Part99.Size = Vector3.new(2, 1, 1)
- Part99.CFrame = CFrame.new(36.0099983, 5.69956493, -16.449976, -0.999988556, 5.83156944e-24, 0, 5.9672543e-24, 1, -3.91456127e-25, 0, -4.00568505e-25, -0.999988556)
- Part99.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part99.Position = Vector3.new(36.0099983, 5.69956493, -16.449976)
- Part99.Orientation = Vector3.new(0, 180, 0)
- Part99.Color = Color3.new(0.960784, 0.803922, 0.188235)
- SpecialMesh100.Parent = Part99
- SpecialMesh100.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh100.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal101.Name = "face"
- Decal101.Parent = Part99
- Decal101.Texture = "rbxasset://textures/face.png"
- Script102.Name = "README"
- Script102.Parent = Model4
- table.insert(cors,sandbox(Script102,function()
- --Sword Bot v.2 Manual
- --Sword Bot v.2 can be set on deathmatch mode, or can be set to simply target a single person without harming anthing else.
- --Sword Bot v.2 CANNOT kill humanoids named Zombie!
- --Toggle Deathmatch value on and off to change if the bot attacks all or just one person.
- --Change Target to the name of the thing you want the bot to follow and blox.
- --Change Target to nothing if you want it to just stand around.
- --Change Distance to how far your bot will see
- --Delete the value called BotFriend if you want your Bot to be killed by other bots in deathmatch.
- --Copy and paste the value called BotFriend into whatever you do not want the bot to attack.
- --Toggle Twirl on and off to change if the bot will twirl it's sword on touch, twirling does more damage, but also takes alot.
- --And Damage is the amount of damage the sword will inflict.
- --Coming Soon = Team Mode
- end))
- Tool103.Name = "LinkedSword"
- Tool103.Parent = Model4
- Tool103.TextureId = "rbxasset://Textures/Sword128.png"
- Tool103.GripForward = Vector3.new(-1, -0, -0)
- Tool103.GripPos = Vector3.new(0, 0, -1.5)
- Tool103.GripRight = Vector3.new(0, 1, 0)
- Tool103.GripUp = Vector3.new(0, 0, 1)
- Part104.Name = "Handle"
- Part104.Parent = Tool103
- Part104.BrickColor = BrickColor.new("Bright yellow")
- Part104.Reflectance = 0.40000000596046
- Part104.Rotation = Vector3.new(0, 0, 90)
- Part104.RotVelocity = Vector3.new(-2.12814831e-22, 1.90315357e-22, -2.08932575e-22)
- Part104.Velocity = Vector3.new(3.6138306e-20, 0.0218018591, 3.68237124e-20)
- Part104.CanCollide = false
- Part104.FormFactor = Enum.FormFactor.Plate
- Part104.Size = Vector3.new(2, 0.800000012, 4)
- Part104.CFrame = CFrame.new(37.5099831, 3.70014811, -14.9499836, -1.53733991e-21, -0.999993742, 5.96042753e-08, 1, -1.53727387e-21, 5.38734544e-22, -5.38736715e-22, 5.96042753e-08, 0.999993742)
- Part104.BottomSurface = Enum.SurfaceType.Smooth
- Part104.TopSurface = Enum.SurfaceType.Smooth
- Part104.Color = Color3.new(0.960784, 0.803922, 0.188235)
- Part104.Position = Vector3.new(37.5099831, 3.70014811, -14.9499836)
- Part104.Orientation = Vector3.new(0, 0, 90)
- Part104.Color = Color3.new(0.960784, 0.803922, 0.188235)
- SpecialMesh105.Parent = Part104
- SpecialMesh105.MeshId = "rbxasset://fonts/sword.mesh"
- SpecialMesh105.Scale = Vector3.new(2, 2, 1)
- SpecialMesh105.TextureId = "rbxasset://textures/SwordTexture.png"
- SpecialMesh105.VertexColor = Vector3.new(2, 2, 2)
- SpecialMesh105.MeshType = Enum.MeshType.FileMesh
- SpecialMesh105.Scale = Vector3.new(2, 2, 1)
- Script106.Name = "Damage"
- Script106.Parent = Part104
- table.insert(cors,sandbox(Script106,function()
- function onTouched(part)
- foe = script.Parent.Parent.Parent.Target.Value
- deathmatch = script.Parent.Parent.Parent.Deathmatch.Value
- twirl = script.Parent.Parent.Parent.Twirl.Value
- damage = script.Parent.Parent.Parent.Damage.Value
- if part.Parent:findFirstChild("Humanoid") ~= nil then
- if part.Parent.Name == foe and deathmatch ~= true then
- part.Parent.Humanoid.Health = part.Parent.Humanoid.Health - damage
- if twirl == true then
- script.Parent.BodyAngularVelocity.angularvelocity = Vector3.new(0,20,0)
- wait(0.5)
- script.Parent.BodyAngularVelocity.angularvelocity = Vector3.new(0,0,0)
- end
- elseif deathmatch ~= false and part.Parent:findFirstChild("BotFriend") == nil then
- part.Parent.Humanoid.Health = part.Parent.Humanoid.Health - damage
- if twirl == true then
- script.Parent.BodyAngularVelocity.angularvelocity = Vector3.new(0,20,0)
- wait(0.5)
- script.Parent.BodyAngularVelocity.angularvelocity = Vector3.new(0,0,0)
- end
- end
- end
- end
- script.Parent.Touched:connect(onTouched)
- end))
- BodyAngularVelocity107.Parent = Part104
- BodyAngularVelocity107.maxTorque = Vector3.new(0, 400000, 0)
- BodyAngularVelocity107.MaxTorque = Vector3.new(0, 400000, 0)
- BodyAngularVelocity107.AngularVelocity = Vector3.new(0, 0, 0)
- IntValue108.Name = "Mode"
- IntValue108.Parent = Model4
- IntValue109.Name = "hit"
- IntValue109.Parent = Model4
- IntValue109.Value = 2
- NumberValue110.Name = "Distance"
- NumberValue110.Parent = Model4
- NumberValue110.Value = 2000
- BoolValue111.Name = "Twirl"
- BoolValue111.Parent = Model4
- BoolValue111.Value = true
- StringValue112.Name = "Target"
- StringValue112.Parent = Model4
- StringValue112.Value = "Player"
- BoolValue113.Name = "Twirl"
- BoolValue113.Parent = Model4
- BoolValue113.Value = true
- IntValue114.Name = "Timber"
- IntValue114.Parent = Model4
- Script115.Name = "FellCheck"
- Script115.Parent = Model4
- table.insert(cors,sandbox(Script115,function()
- hits = script.Parent.hit --This keeps track of how much "hp" the tree has left
- local newtree = script.Parent:clone() --for inserting a new tree later
- while true do --infinite loop
- if hits.Value < 1 then --if the tree has less than 1 "hp" then
- script.Parent:BreakJoints() --make tree able to fall over.
- wait(3) --wait a while
- script.Parent:remove() --remove the tree
- wait(10) --wait a while
- newtree.Parent = game.Workspace --insert a new tree
- newtree:MakeJoints() --make tree unable to fall over
- end
- wait(1) --wait a while before checking trees hp again
- end
- end))
- Script116.Name = "Animate"
- Script116.Parent = Model4
- table.insert(cors,sandbox(Script116,function()
- --Simple Easy Animations, credit to miked for the joint config.
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- --itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- --itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- --itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- --itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- 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
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- 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
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- IntValue117.Name = "BotFriend"
- IntValue117.Parent = Model4
- Script118.Name = "Respawn"
- Script118.Parent = Model4
- table.insert(cors,sandbox(Script118,function()
- name="Humanoid"
- robo=script.Parent:clone()
- while true do
- wait(60)
- if script.Parent.Humanoid.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- script.Parent:remove()
- end
- end
- end))
- BoolValue119.Name = "Deathmatch"
- BoolValue119.Parent = Model4
- BoolValue119.Value = true
- Script120.Name = "Regenerator"
- Script120.Parent = Model4
- Script120.Disabled = true
- table.insert(cors,sandbox(Script120,function()
- clone = script.Parent.clone()
- goblin = script.Parent
- goblin.remove()
- clone.Parent = game.Workspace
- end))
- Script121.Name = "Health"
- Script121.Parent = Model4
- table.insert(cors,sandbox(Script121,function()
- script.Parent.Humanoid.Health = script.Parent.Humanoid.MaxHealth
- while true do
- wait(0.1)
- if script.Parent.Humanoid.Health ~= script.Parent.Humanoid.MaxHealth then
- script.Parent.Humanoid.Health = script.Parent.Humanoid.Health + 1
- end
- end
- end))
- Script122.Name = "Follow"
- Script122.Parent = Model4
- table.insert(cors,sandbox(Script122,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 14
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld123.Name = "Virus"
- Weld123.Parent = Script122
- Script124.Name = "Move"
- Script124.Parent = Model4
- table.insert(cors,sandbox(Script124,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Humanoid125.Parent = Model4
- Humanoid125.NameOcclusion = Enum.NameOcclusion.NoOcclusion
- Humanoid125.RightLeg = Part6
- Humanoid125.LeftLeg = Part5
- Humanoid125.Torso = Part7
- Humanoid125.Health = 40
- Humanoid125.MaxHealth = 40
- Humanoid125.WalkSpeed = 20
- Script126.Name = "Follow"
- Script126.Parent = Model4
- table.insert(cors,sandbox(Script126,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 13
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld127.Name = "Virus"
- Weld127.Parent = Script126
- Script128.Name = "Move"
- Script128.Parent = Model4
- table.insert(cors,sandbox(Script128,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script129.Name = "Move"
- Script129.Parent = Model4
- table.insert(cors,sandbox(Script129,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script130.Name = "Move"
- Script130.Parent = Model4
- table.insert(cors,sandbox(Script130,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script131.Name = "Follow"
- Script131.Parent = Model4
- table.insert(cors,sandbox(Script131,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 13
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld132.Name = "Virus"
- Weld132.Parent = Script131
- Script133.Name = "Follow"
- Script133.Parent = Model4
- table.insert(cors,sandbox(Script133,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 14
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld134.Name = "Virus"
- Weld134.Parent = Script133
- Script135.Name = "Move"
- Script135.Parent = Model4
- table.insert(cors,sandbox(Script135,function()
- local CurrentPart = nil
- local MaxInc = 1000000
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script136.Name = "Animate"
- Script136.Parent = Model4
- table.insert(cors,sandbox(Script136,function()
- --Simple Easy Animations, credit to miked for the joint config.
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- --itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- --itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- --itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- --itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- 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
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- 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
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- Script137.Name = "Move"
- Script137.Parent = Model4
- table.insert(cors,sandbox(Script137,function()
- local CurrentPart = nil
- local MaxInc = 1000000
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script138.Name = "Move"
- Script138.Parent = Model4
- table.insert(cors,sandbox(Script138,function()
- local CurrentPart = nil
- local MaxInc = 1000000
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script139.Name = "Animate"
- Script139.Parent = Model4
- table.insert(cors,sandbox(Script139,function()
- --Simple Easy Animations, credit to miked for the joint config.
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- --itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- --itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- --itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- --itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- 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
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- 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
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- Script140.Name = "Animate"
- Script140.Parent = Model4
- table.insert(cors,sandbox(Script140,function()
- --Simple Easy Animations, credit to miked for the joint config.
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- --itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- --itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- --itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- --itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- 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
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- 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
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- Script141.Name = "Animate"
- Script141.Parent = Model4
- table.insert(cors,sandbox(Script141,function()
- --Simple Easy Animations, credit to miked for the joint config.
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- --itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- --itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- --itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- --itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- 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
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- 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
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- Script142.Name = "Animate"
- Script142.Parent = Model4
- table.insert(cors,sandbox(Script142,function()
- --Simple Easy Animations, credit to miked for the joint config.
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- --itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- --itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- --itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- --itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- -- ANIMATION
- -- declarations
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- -- functions
- function onRunning(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- 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
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- -- same as jump for now
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- 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
- LeftShoulder.DesiredAngle = desiredAngle - climbFudge
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- 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)
- -- main program
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- NumberValue143.Name = "Damage"
- NumberValue143.Parent = Model4
- NumberValue143.Value = 2
- IntValue144.Name = "BotFriend"
- IntValue144.Parent = Model4
- BoolValue145.Name = "Deathmatch"
- BoolValue145.Parent = Model4
- BoolValue145.Value = true
- NumberValue146.Name = "Distance"
- NumberValue146.Parent = Model4
- NumberValue146.Value = 2000
- Script147.Name = "FellCheck"
- Script147.Parent = Model4
- table.insert(cors,sandbox(Script147,function()
- hits = script.Parent.hit --This keeps track of how much "hp" the tree has left
- local newtree = script.Parent:clone() --for inserting a new tree later
- while true do --infinite loop
- if hits.Value < 1 then --if the tree has less than 1 "hp" then
- script.Parent:BreakJoints() --make tree able to fall over.
- wait(3) --wait a while
- script.Parent:remove() --remove the tree
- wait(10) --wait a while
- newtree.Parent = game.Workspace --insert a new tree
- newtree:MakeJoints() --make tree unable to fall over
- end
- wait(1) --wait a while before checking trees hp again
- end
- end))
- Script148.Name = "Follow"
- Script148.Parent = Model4
- table.insert(cors,sandbox(Script148,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 14
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld149.Name = "Virus"
- Weld149.Parent = Script148
- Script150.Name = "Follow"
- Script150.Parent = Model4
- table.insert(cors,sandbox(Script150,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 13
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld151.Name = "Virus"
- Weld151.Parent = Script150
- Script152.Name = "Follow"
- Script152.Parent = Model4
- table.insert(cors,sandbox(Script152,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 13
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld153.Name = "Virus"
- Weld153.Parent = Script152
- Script154.Name = "Follow"
- Script154.Parent = Model4
- table.insert(cors,sandbox(Script154,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 25
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Humanoid:MoveTo(target.Position, target)
- end
- end
- end))
- Weld155.Name = "Virus"
- Weld155.Parent = Script154
- Script156.Name = "Health"
- Script156.Parent = Model4
- table.insert(cors,sandbox(Script156,function()
- script.Parent.Humanoid.Health = script.Parent.Humanoid.MaxHealth
- while true do
- wait(0.1)
- if script.Parent.Humanoid.Health ~= script.Parent.Humanoid.MaxHealth then
- script.Parent.Humanoid.Health = script.Parent.Humanoid.Health + 1
- end
- end
- end))
- Script157.Name = "Move"
- Script157.Parent = Model4
- table.insert(cors,sandbox(Script157,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script158.Name = "Move"
- Script158.Parent = Model4
- table.insert(cors,sandbox(Script158,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script159.Name = "Move"
- Script159.Parent = Model4
- table.insert(cors,sandbox(Script159,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script160.Name = "Move"
- Script160.Parent = Model4
- table.insert(cors,sandbox(Script160,function()
- local CurrentPart = nil
- local MaxInc = 5
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script161.Name = "Move"
- Script161.Parent = Model4
- table.insert(cors,sandbox(Script161,function()
- local CurrentPart = nil
- local MaxInc = 1000000
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script162.Name = "Move"
- Script162.Parent = Model4
- table.insert(cors,sandbox(Script162,function()
- local CurrentPart = nil
- local MaxInc = 1000000
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script163.Name = "Move"
- Script163.Parent = Model4
- table.insert(cors,sandbox(Script163,function()
- local CurrentPart = nil
- local MaxInc = 1000000
- function onTouched(hit)
- if hit.Parent == nil then
- return
- end
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid == nil then
- CurrentPart = hit
- end
- end
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- while true do
- print(childName)
- child = parent.ChildAdded:wait()
- if child.Name==childName then
- return child
- end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local Torso = waitForChild(Figure, "Torso")
- local Left = waitForChild(Figure, "Left Leg")
- local Right = waitForChild(Figure, "Right Leg")
- Humanoid.Jump = true
- Left.Touched:connect(onTouched)
- Right.Touched:connect(onTouched)
- while true do
- wait(math.random(2, 6))
- if CurrentPart ~= nil then
- if math.random(1, 2) == 1 then
- Humanoid.Jump = False
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script164.Name = "README"
- Script164.Parent = Model4
- table.insert(cors,sandbox(Script164,function()
- --Sword Bot v.2 Manual
- --Sword Bot v.2 can be set on deathmatch mode, or can be set to simply target a single person without harming anthing else.
- --Sword Bot v.2 CANNOT kill humanoids named Zombie!
- --Toggle Deathmatch value on and off to change if the bot attacks all or just one person.
- --Change Target to the name of the thing you want the bot to follow and blox.
- --Change Target to nothing if you want it to just stand around.
- --Change Distance to how far your bot will see
- --Delete the value called BotFriend if you want your Bot to be killed by other bots in deathmatch.
- --Copy and paste the value called BotFriend into whatever you do not want the bot to attack.
- --Toggle Twirl on and off to change if the bot will twirl it's sword on touch, twirling does more damage, but also takes alot.
- --And Damage is the amount of damage the sword will inflict.
- --Coming Soon = Team Mode
- end))
- Script165.Name = "KO"
- Script165.Parent = Model4
- table.insert(cors,sandbox(Script165,function()
- Humanoid = script.Parent.Humanoid -- Or Zombie Or Whatever
- function PwntX_X()
- local tag = Humanoid:findFirstChild("creator")
- if tag ~= nil then
- if tag.Value ~= nil then
- local Leaderstats = tag.Value:findFirstChild("leaderstats")
- if Leaderstats ~= nil then
- Leaderstats.Xp.Value = Leaderstats.EXP.Value + 100
- wait(0.1)
- script:remove()
- end
- end
- end
- end
- Humanoid.Died:connect(PwntX_X)
- end))
- IntValue166.Name = "Mode"
- IntValue166.Parent = Model4
- Script167.Name = "SwordCarrier"
- Script167.Parent = Model4
- table.insert(cors,sandbox(Script167,function()
- possibleAnims = { "Lunge", "Slash", "Slash" }
- ------------------
- --SPAWNING--
- ------------------
- -- credit to miked
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- miked.Head:makeJoints()
- ------------------
- ------------------
- while true do
- local p = game.Players:GetChildren()
- for i = 1,#p do
- if p[i].Character~=nil then
- if p[i].Character:findFirstChild("Torso")~=nil then
- if (p[i].Character.Torso.Position - script.Parent.Torso.Position).magnitude < 5 then
- local anim = Instance.new("StringValue")
- anim.Value = possibleAnims[math.random(1, #possibleAnims)]
- anim.Name = "toolanim"
- anim.Parent = script.Parent.LinkedSword
- end
- end
- end
- end
- wait(0.5)
- end
- end))
- Script168.Name = "Animate"
- Script168.Parent = Model4
- table.insert(cors,sandbox(Script168,function()
- function waitForChild(parent, childName)
- while true do
- local child = parent:findFirstChild(childName)
- if child then
- return child
- end
- parent.ChildAdded:wait()
- end
- end
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Enemy")
- local pose = "Standing"
- local toolAnim = "None"
- local toolAnimTime = 0
- local isSeated = false
- function onRunning(speed)
- if isSeated then return end
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- isSeated = false
- 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()
- isSeated = true
- pose = "Seated"
- print("Seated")
- end
- function moveJump()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 3.14
- LeftShoulder.DesiredAngle = -3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveFreeFall()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = 1
- LeftShoulder.DesiredAngle = -1
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveClimb()
- RightShoulder.MaxVelocity = 0.5
- LeftShoulder.MaxVelocity = 0.5
- RightShoulder.DesiredAngle = -3.14
- LeftShoulder.DesiredAngle = 3.14
- RightHip.DesiredAngle = 0
- LeftHip.DesiredAngle = 0
- end
- function moveSit()
- print("Move Sit")
- 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()
- kidTable = Figure:children()
- if (kidTable ~= nil) then
- numKids = #kidTable
- for i=1,numKids do
- if (kidTable[i].className == "Tool") then return kidTable[i] end
- end
- end
- return nil
- end
- function getToolAnim(tool)
- c = tool:children()
- for i=1,#c do
- if (c[i].Name == "toolanim" and c[i].className == "StringValue") then
- return c[i]
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- RightShoulder.DesiredAngle = 1.57
- return
- end
- if (toolAnim == "Slash") then
- script.Parent.LinkedSword.Handle.Slash:Play()
- 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 == "Climbing") then
- moveClimb()
- return
- end
- if (pose == "Seated") then
- moveSit()
- return
- end
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- if (pose == "Running") then
- amplitude = 1
- frequency = 9
- else
- amplitude = 0.1
- frequency = 1
- end
- desiredAngle = amplitude * math.sin(time*frequency)
- RightShoulder.DesiredAngle = desiredAngle
- LeftShoulder.DesiredAngle = desiredAngle
- RightHip.DesiredAngle = -desiredAngle
- LeftHip.DesiredAngle = -desiredAngle
- local tool = getTool()
- if tool ~= nil then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject ~= nil 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)
- local nextTime = 0
- local runService = game:service("RunService");
- while Figure.Parent~=nil do
- time = runService.Stepped:wait()
- if time > nextTime then
- move(time)
- nextTime = time + 0.1
- end
- end
- end))
- Script169.Name = "Follow"
- Script169.Parent = Model4
- table.insert(cors,sandbox(Script169,function()
- local larm = script.Parent:FindFirstChild("Left Arm")
- local rarm = script.Parent:FindFirstChild("Right Arm")
- function findNearestTorso(pos)
- local list = game.Workspace:children()
- local torso = nil
- local dist = 15
- local temp = nil
- local human = nil
- local temp2 = nil
- for x = 1, #list do
- temp2 = list[x]
- if (temp2.className == "Model") and (temp2 ~= script.Parent) then
- temp = temp2:findFirstChild("Torso")
- human = temp2:findFirstChild("Humanoid")
- if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
- if (temp.Position - pos).magnitude < dist then
- torso = temp
- dist = (temp.Position - pos).magnitude
- end
- end
- end
- end
- return torso
- end
- while true do
- wait(0.1)
- local target = findNearestTorso(script.Parent.Torso.Position)
- if target ~= nil then
- script.Parent.Enemy:MoveTo(target.Position, target)
- end
- end
- end))
- Script170.Name = "Updater"
- Script170.Parent = Model4
- table.insert(cors,sandbox(Script170,function()
- h = script.Parent
- while true do
- h.Name = h.EnemySettings.EnemyName.Value .. " LV." .. h.EnemySettings.EnemyLevel.Value .. " (" .. h.Enemy.Health .. "%)"
- Wait(0)
- end
- end))
- IntValue171.Name = "Mode"
- IntValue171.Parent = Model4
- Script172.Name = "Respawn"
- Script172.Parent = Model4
- table.insert(cors,sandbox(Script172,function()
- name="Enemy"
- robo=script.Parent:clone()
- while true do
- wait(script.Parent.EnemySettings.RespawnTime.Value)
- if script.Parent.Enemy.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- script.Parent:Destroy()
- end
- end
- end))
- Script173.Name = "StatsGiven"
- Script173.Parent = Model4
- table.insert(cors,sandbox(Script173,function()
- local Humanoid = script.Parent.Enemy
- local max1 = script.Parent.EnemySettings.MaxGOLD.Value
- local max2 = script.Parent.EnemySettings.MaxXP.Value
- local min1 = script.Parent.EnemySettings.MinGOLD.Value
- local min2 = script.Parent.EnemySettings.MinXP.Value
- function PwntX_X()
- local tag = Humanoid:findFirstChild("creator")
- if tag ~= nil then
- if tag.Value ~= nil then
- local Leaderstats = tag.Value:findFirstChild("leaderstats")
- if Leaderstats ~= nil then
- Leaderstats.GOLD.Value = Leaderstats.GOLD.Value + math.random(min1,max1)
- Leaderstats.XP.Value = Leaderstats.XP.Value + math.random(min2,max2)
- script:Destroy()
- end
- end
- end
- end
- Humanoid.Died:connect(PwntX_X)
- end))
- Script174.Name = "SwordCarrier"
- Script174.Parent = Model4
- table.insert(cors,sandbox(Script174,function()
- possibleAnims = { "Lunge", "Slash", "Slash" }
- miked=script.Parent
- itlh=miked.Torso:findFirstChild("Left Hip")
- itlh.Part0=miked.Torso
- itlh.Part1=miked:findFirstChild("Left Leg")
- itlh.C0=CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itrh=miked.Torso:findFirstChild("Right Hip")
- itrh.Part0=miked.Torso
- itrh.Part1=miked:findFirstChild("Right Leg")
- itrh.C0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itls=miked.Torso:findFirstChild("Left Shoulder")
- itls.Part1=miked.Torso
- itls.C0=CFrame.new(2, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- itls.Part0=miked:findFirstChild("Left Arm")
- itrs=miked.Torso:findFirstChild("Right Shoulder")
- itrs.Part1=miked.Torso
- itrs.C0=CFrame.new(-2, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- itrs.Part0=miked:findFirstChild("Right Arm")
- miked.Head:makeJoints()
- while true do
- local p = game.Players:GetChildren()
- for i = 1,#p do
- if p[i].Character~=nil then
- if p[i].Character:findFirstChild("Torso")~=nil then
- if (p[i].Character.Torso.Position - script.Parent.Torso.Position).magnitude < 5 then
- local anim = Instance.new("StringValue")
- anim.Value = possibleAnims[math.random(1, #possibleAnims)]
- anim.Name = "toolanim"
- anim.Parent = script.Parent.LinkedSword
- end
- end
- end
- end
- wait(0.5)
- 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