Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Humanoid2 = Instance.new("Humanoid")
- MeshPart3 = Instance.new("MeshPart")
- Vector3Value4 = Instance.new("Vector3Value")
- Vector3Value5 = Instance.new("Vector3Value")
- Vector3Value6 = Instance.new("Vector3Value")
- Vector3Value7 = Instance.new("Vector3Value")
- Vector3Value8 = Instance.new("Vector3Value")
- Vector3Value9 = Instance.new("Vector3Value")
- Motor6D10 = Instance.new("Motor6D")
- Script11 = Instance.new("Script")
- ObjectValue12 = Instance.new("ObjectValue")
- Sound13 = Instance.new("Sound")
- Weld14 = Instance.new("Weld")
- MeshPart15 = Instance.new("MeshPart")
- Vector3Value16 = Instance.new("Vector3Value")
- Vector3Value17 = Instance.new("Vector3Value")
- Vector3Value18 = Instance.new("Vector3Value")
- Motor6D19 = Instance.new("Motor6D")
- Script20 = Instance.new("Script")
- ObjectValue21 = Instance.new("ObjectValue")
- Sound22 = Instance.new("Sound")
- Weld23 = Instance.new("Weld")
- MeshPart24 = Instance.new("MeshPart")
- Vector3Value25 = Instance.new("Vector3Value")
- Vector3Value26 = Instance.new("Vector3Value")
- Vector3Value27 = Instance.new("Vector3Value")
- Motor6D28 = Instance.new("Motor6D")
- Script29 = Instance.new("Script")
- ObjectValue30 = Instance.new("ObjectValue")
- Sound31 = Instance.new("Sound")
- Weld32 = Instance.new("Weld")
- MeshPart33 = Instance.new("MeshPart")
- Vector3Value34 = Instance.new("Vector3Value")
- Vector3Value35 = Instance.new("Vector3Value")
- Vector3Value36 = Instance.new("Vector3Value")
- Vector3Value37 = Instance.new("Vector3Value")
- Motor6D38 = Instance.new("Motor6D")
- Script39 = Instance.new("Script")
- ObjectValue40 = Instance.new("ObjectValue")
- Sound41 = Instance.new("Sound")
- Weld42 = Instance.new("Weld")
- MeshPart43 = Instance.new("MeshPart")
- Vector3Value44 = Instance.new("Vector3Value")
- Vector3Value45 = Instance.new("Vector3Value")
- Vector3Value46 = Instance.new("Vector3Value")
- Motor6D47 = Instance.new("Motor6D")
- Script48 = Instance.new("Script")
- ObjectValue49 = Instance.new("ObjectValue")
- Sound50 = Instance.new("Sound")
- Weld51 = Instance.new("Weld")
- MeshPart52 = Instance.new("MeshPart")
- Vector3Value53 = Instance.new("Vector3Value")
- Vector3Value54 = Instance.new("Vector3Value")
- Vector3Value55 = Instance.new("Vector3Value")
- Motor6D56 = Instance.new("Motor6D")
- Script57 = Instance.new("Script")
- ObjectValue58 = Instance.new("ObjectValue")
- Sound59 = Instance.new("Sound")
- Weld60 = Instance.new("Weld")
- MeshPart61 = Instance.new("MeshPart")
- Vector3Value62 = Instance.new("Vector3Value")
- Vector3Value63 = Instance.new("Vector3Value")
- Vector3Value64 = Instance.new("Vector3Value")
- Vector3Value65 = Instance.new("Vector3Value")
- Motor6D66 = Instance.new("Motor6D")
- Script67 = Instance.new("Script")
- ObjectValue68 = Instance.new("ObjectValue")
- Sound69 = Instance.new("Sound")
- Weld70 = Instance.new("Weld")
- MeshPart71 = Instance.new("MeshPart")
- Vector3Value72 = Instance.new("Vector3Value")
- Vector3Value73 = Instance.new("Vector3Value")
- Vector3Value74 = Instance.new("Vector3Value")
- Vector3Value75 = Instance.new("Vector3Value")
- Vector3Value76 = Instance.new("Vector3Value")
- Vector3Value77 = Instance.new("Vector3Value")
- Vector3Value78 = Instance.new("Vector3Value")
- Vector3Value79 = Instance.new("Vector3Value")
- Vector3Value80 = Instance.new("Vector3Value")
- Vector3Value81 = Instance.new("Vector3Value")
- Motor6D82 = Instance.new("Motor6D")
- Script83 = Instance.new("Script")
- ObjectValue84 = Instance.new("ObjectValue")
- Sound85 = Instance.new("Sound")
- Weld86 = Instance.new("Weld")
- MeshPart87 = Instance.new("MeshPart")
- Vector3Value88 = Instance.new("Vector3Value")
- Vector3Value89 = Instance.new("Vector3Value")
- Motor6D90 = Instance.new("Motor6D")
- Script91 = Instance.new("Script")
- ObjectValue92 = Instance.new("ObjectValue")
- Sound93 = Instance.new("Sound")
- Weld94 = Instance.new("Weld")
- MeshPart95 = Instance.new("MeshPart")
- Vector3Value96 = Instance.new("Vector3Value")
- Vector3Value97 = Instance.new("Vector3Value")
- Vector3Value98 = Instance.new("Vector3Value")
- Motor6D99 = Instance.new("Motor6D")
- Script100 = Instance.new("Script")
- ObjectValue101 = Instance.new("ObjectValue")
- Sound102 = Instance.new("Sound")
- Weld103 = Instance.new("Weld")
- MeshPart104 = Instance.new("MeshPart")
- Vector3Value105 = Instance.new("Vector3Value")
- Vector3Value106 = Instance.new("Vector3Value")
- Vector3Value107 = Instance.new("Vector3Value")
- Motor6D108 = Instance.new("Motor6D")
- Script109 = Instance.new("Script")
- ObjectValue110 = Instance.new("ObjectValue")
- Sound111 = Instance.new("Sound")
- Weld112 = Instance.new("Weld")
- MeshPart113 = Instance.new("MeshPart")
- Vector3Value114 = Instance.new("Vector3Value")
- Vector3Value115 = Instance.new("Vector3Value")
- Motor6D116 = Instance.new("Motor6D")
- Script117 = Instance.new("Script")
- ObjectValue118 = Instance.new("ObjectValue")
- Sound119 = Instance.new("Sound")
- Weld120 = Instance.new("Weld")
- MeshPart121 = Instance.new("MeshPart")
- Vector3Value122 = Instance.new("Vector3Value")
- Vector3Value123 = Instance.new("Vector3Value")
- Vector3Value124 = Instance.new("Vector3Value")
- Motor6D125 = Instance.new("Motor6D")
- Script126 = Instance.new("Script")
- ObjectValue127 = Instance.new("ObjectValue")
- Sound128 = Instance.new("Sound")
- Weld129 = Instance.new("Weld")
- MeshPart130 = Instance.new("MeshPart")
- Vector3Value131 = Instance.new("Vector3Value")
- Vector3Value132 = Instance.new("Vector3Value")
- Vector3Value133 = Instance.new("Vector3Value")
- Motor6D134 = Instance.new("Motor6D")
- Script135 = Instance.new("Script")
- ObjectValue136 = Instance.new("ObjectValue")
- Sound137 = Instance.new("Sound")
- Weld138 = Instance.new("Weld")
- MeshPart139 = Instance.new("MeshPart")
- Vector3Value140 = Instance.new("Vector3Value")
- Vector3Value141 = Instance.new("Vector3Value")
- Vector3Value142 = Instance.new("Vector3Value")
- Vector3Value143 = Instance.new("Vector3Value")
- Vector3Value144 = Instance.new("Vector3Value")
- Vector3Value145 = Instance.new("Vector3Value")
- Vector3Value146 = Instance.new("Vector3Value")
- Vector3Value147 = Instance.new("Vector3Value")
- Motor6D148 = Instance.new("Motor6D")
- Script149 = Instance.new("Script")
- ObjectValue150 = Instance.new("ObjectValue")
- Sound151 = Instance.new("Sound")
- Weld152 = Instance.new("Weld")
- BodyColors153 = Instance.new("BodyColors")
- Animation154 = Instance.new("Animation")
- Script155 = Instance.new("Script")
- Script156 = Instance.new("Script")
- StringValue157 = Instance.new("StringValue")
- StringValue158 = Instance.new("StringValue")
- Animation159 = Instance.new("Animation")
- StringValue160 = Instance.new("StringValue")
- Animation161 = Instance.new("Animation")
- StringValue162 = Instance.new("StringValue")
- Animation163 = Instance.new("Animation")
- StringValue164 = Instance.new("StringValue")
- Animation165 = Instance.new("Animation")
- StringValue166 = Instance.new("StringValue")
- Animation167 = Instance.new("Animation")
- StringValue168 = Instance.new("StringValue")
- Animation169 = Instance.new("Animation")
- StringValue170 = Instance.new("StringValue")
- Animation171 = Instance.new("Animation")
- StringValue172 = Instance.new("StringValue")
- Animation173 = Instance.new("Animation")
- StringValue174 = Instance.new("StringValue")
- Animation175 = Instance.new("Animation")
- StringValue176 = Instance.new("StringValue")
- Animation177 = Instance.new("Animation")
- NumberValue178 = Instance.new("NumberValue")
- Animation179 = Instance.new("Animation")
- NumberValue180 = Instance.new("NumberValue")
- LocalScript181 = Instance.new("LocalScript")
- Script182 = Instance.new("Script")
- Script183 = Instance.new("Script")
- Model0.Name = "Moving Anthro [NPC]"
- Model0.Parent = mas
- Part1.Name = "HumanoidRootPart"
- Part1.Parent = Model0
- Part1.CFrame = CFrame.new(31.1215858, 3.44281507, -4.01275587, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- Part1.Orientation = Vector3.new(0, -166, 0)
- Part1.Position = Vector3.new(31.1215858, 3.44281507, -4.01275587)
- Part1.Rotation = Vector3.new(-180, -14, -180)
- Part1.Transparency = 1
- Part1.Size = Vector3.new(2, 2, 1)
- Humanoid2.Parent = Model0
- Humanoid2.HipHeight = 2.5
- Humanoid2.RigType = Enum.HumanoidRigType.R15
- Humanoid2.Torso = Part1
- MeshPart3.Name = "Head"
- MeshPart3.Parent = Model0
- MeshPart3.CFrame = CFrame.new(31.1299171, 6.04462719, -3.97958207, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart3.Orientation = Vector3.new(0, -166, 0)
- MeshPart3.Position = Vector3.new(31.1299171, 6.04462719, -3.97958207)
- MeshPart3.Rotation = Vector3.new(-180, -14, -180)
- MeshPart3.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart3.Size = Vector3.new(0.692578018, 1.00110412, 0.93025893)
- MeshPart3.BrickColor = BrickColor.new("Cool yellow")
- MeshPart3.brickColor = BrickColor.new("Cool yellow")
- MeshPart3.TextureID = "rbxassetid://853067666"
- Vector3Value4.Name = "OriginalPivot"
- Vector3Value4.Parent = mas
- Vector3Value4.Value = Vector3.new(-0, -0.307155728, -0.0454159304)
- Vector3Value5.Name = "OriginalPivot"
- Vector3Value5.Parent = mas
- Vector3Value5.Value = Vector3.new(4.8650584e-08, 0.199901581, 0.0273513794)
- Vector3Value6.Name = "OriginalPivot"
- Vector3Value6.Parent = mas
- Vector3Value6.Value = Vector3.new(4.8650584e-08, 0.199901581, 0.0273513794)
- Vector3Value7.Name = "OriginalPivot"
- Vector3Value7.Parent = mas
- Vector3Value7.Value = Vector3.new(4.86505876e-08, -0.190885663, -0.287648618)
- Vector3Value8.Name = "OriginalPivot"
- Vector3Value8.Parent = mas
- Vector3Value8.Value = Vector3.new(4.8650584e-08, -0.0821859837, 0.0273513775)
- Vector3Value9.Name = "OriginalSize"
- Vector3Value9.Parent = MeshPart3
- Vector3Value9.Value = Vector3.new(0.554062426, 0.800883293, 0.744207144)
- Motor6D10.Name = "Neck"
- Motor6D10.Parent = MeshPart3
- Motor6D10.C0 = CFrame.new(-0, 0.981102705, -0.0461568236, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D10.C1 = CFrame.new(-0, -0.38394466, -0.0567699149, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D10.Part0 = MeshPart71
- Motor6D10.Part1 = MeshPart3
- Motor6D10.part1 = MeshPart3
- Script11.Name = "RepelScript"
- Script11.Parent = MeshPart3
- table.insert(cors,sandbox(Script11,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue12.Name = "CharacterToIgnore"
- ObjectValue12.Parent = Script11
- Sound13.Name = "PunchSound"
- Sound13.Parent = Script11
- Sound13.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound13.Volume = 0.20000000298023
- Weld14.Name = "RightGrip"
- Weld14.Parent = MeshPart3
- Weld14.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld14.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart15.Name = "LeftHand"
- MeshPart15.Parent = Model0
- MeshPart15.CFrame = CFrame.new(31.9613819, 2.81080198, -3.93414092, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart15.Orientation = Vector3.new(0, -166, 0)
- MeshPart15.Position = Vector3.new(31.9613819, 2.81080198, -3.93414092)
- MeshPart15.Rotation = Vector3.new(-180, -14, -180)
- MeshPart15.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart15.Size = Vector3.new(0.369217873, 0.77686739, 0.423293173)
- MeshPart15.BrickColor = BrickColor.new("Cool yellow")
- MeshPart15.brickColor = BrickColor.new("Cool yellow")
- MeshPart15.TextureID = "rbxassetid://853067666"
- Vector3Value16.Name = "OriginalPivot"
- Vector3Value16.Parent = mas
- Vector3Value16.Value = Vector3.new(-0.0833167434, 0.217594564, 0.0342649072)
- Vector3Value17.Name = "OriginalPivot"
- Vector3Value17.Parent = mas
- Vector3Value17.Value = Vector3.new(0.0266832709, 0.00519376993, 0.223540157)
- Vector3Value18.Name = "OriginalSize"
- Vector3Value18.Parent = MeshPart15
- Vector3Value18.Value = Vector3.new(0.295374304, 0.621493936, 0.338634551)
- Motor6D19.Name = "LeftWrist"
- Motor6D19.Parent = MeshPart15
- Motor6D19.C0 = CFrame.new(-0.0185980648, -0.507891953, -0.166260213, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D19.C1 = CFrame.new(-0.104145929, 0.27199322, 0.0428311341, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D19.Part0 = MeshPart24
- Motor6D19.Part1 = MeshPart15
- Motor6D19.part1 = MeshPart15
- Script20.Name = "RepelScript"
- Script20.Parent = MeshPart15
- table.insert(cors,sandbox(Script20,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue21.Name = "CharacterToIgnore"
- ObjectValue21.Parent = Script20
- Sound22.Name = "PunchSound"
- Sound22.Parent = Script20
- Sound22.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound22.Volume = 0.20000000298023
- Weld23.Name = "RightGrip"
- Weld23.Parent = MeshPart15
- Weld23.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld23.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart24.Name = "LeftLowerArm"
- MeshPart24.Parent = Model0
- MeshPart24.CFrame = CFrame.new(31.9938297, 3.59068632, -4.15771627, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart24.Orientation = Vector3.new(0, -166, 0)
- MeshPart24.Position = Vector3.new(31.9938297, 3.59068632, -4.15771627)
- MeshPart24.Rotation = Vector3.new(-180, -14, -180)
- MeshPart24.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart24.Size = Vector3.new(0.352709144, 1.14867127, 0.586645305)
- MeshPart24.BrickColor = BrickColor.new("Cool yellow")
- MeshPart24.brickColor = BrickColor.new("Cool yellow")
- MeshPart24.TextureID = "rbxassetid://853067666"
- Vector3Value25.Name = "OriginalPivot"
- Vector3Value25.Parent = mas
- Vector3Value25.Value = Vector3.new(-0.0148784518, 0.398414522, 0.135081902)
- Vector3Value26.Name = "OriginalPivot"
- Vector3Value26.Parent = mas
- Vector3Value26.Value = Vector3.new(-0.0148784518, -0.406313568, -0.133008167)
- Vector3Value27.Name = "OriginalSize"
- Vector3Value27.Parent = MeshPart24
- Vector3Value27.Value = Vector3.new(0.282167315, 0.918937027, 0.469316244)
- Motor6D28.Name = "LeftElbow"
- Motor6D28.Parent = MeshPart24
- Motor6D28.C0 = CFrame.new(-0.115770847, -0.543107688, 0.0500396714, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D28.C1 = CFrame.new(-0.0185980648, 0.498018146, 0.168852374, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D28.Part0 = MeshPart33
- Motor6D28.Part1 = MeshPart24
- Motor6D28.part1 = MeshPart24
- Script29.Name = "RepelScript"
- Script29.Parent = MeshPart24
- table.insert(cors,sandbox(Script29,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue30.Name = "CharacterToIgnore"
- ObjectValue30.Parent = Script29
- Sound31.Name = "PunchSound"
- Sound31.Parent = Script29
- Sound31.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound31.Volume = 0.20000000298023
- Weld32.Name = "RightGrip"
- Weld32.Parent = MeshPart24
- Weld32.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld32.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart33.Name = "LeftUpperArm"
- MeshPart33.Parent = Model0
- MeshPart33.CFrame = CFrame.new(31.8708267, 4.63181496, -4.24949503, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart33.Orientation = Vector3.new(0, -166, 0)
- MeshPart33.Position = Vector3.new(31.8708267, 4.63181496, -4.24949503)
- MeshPart33.Rotation = Vector3.new(-180, -14, -180)
- MeshPart33.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart33.Size = Vector3.new(0.494093299, 1.34736133, 0.643033743)
- MeshPart33.BrickColor = BrickColor.new("Cool yellow")
- MeshPart33.brickColor = BrickColor.new("Cool yellow")
- MeshPart33.TextureID = "rbxassetid://853067666"
- Vector3Value34.Name = "OriginalPivot"
- Vector3Value34.Parent = mas
- Vector3Value34.Value = Vector3.new(0.132383347, 0.29369086, 0.0288424864)
- Vector3Value35.Name = "OriginalPivot"
- Vector3Value35.Parent = mas
- Vector3Value35.Value = Vector3.new(-0.0926166773, -0.434486151, 0.0400317386)
- Vector3Value36.Name = "OriginalPivot"
- Vector3Value36.Parent = mas
- Vector3Value36.Value = Vector3.new(0.0873833299, 0.558677971, -0.0387829915)
- Vector3Value37.Name = "OriginalSize"
- Vector3Value37.Parent = MeshPart33
- Vector3Value37.Value = Vector3.new(0.395274639, 1.07788908, 0.514427006)
- Motor6D38.Name = "LeftShoulder"
- Motor6D38.Parent = MeshPart33
- Motor6D38.C0 = CFrame.new(-0.618749976, 0.319366306, 0.129334018, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D38.C1 = CFrame.new(0.165479183, 0.36711359, 0.0360531062, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D38.Part0 = MeshPart71
- Motor6D38.Part1 = MeshPart33
- Motor6D38.part1 = MeshPart33
- Script39.Name = "RepelScript"
- Script39.Parent = MeshPart33
- table.insert(cors,sandbox(Script39,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue40.Name = "CharacterToIgnore"
- ObjectValue40.Parent = Script39
- Sound41.Name = "PunchSound"
- Sound41.Parent = Script39
- Sound41.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound41.Volume = 0.20000000298023
- Weld42.Name = "RightGrip"
- Weld42.Parent = MeshPart33
- Weld42.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld42.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart43.Name = "RightHand"
- MeshPart43.Parent = Model0
- MeshPart43.CFrame = CFrame.new(30.4169445, 2.81083822, -3.54911661, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart43.Orientation = Vector3.new(0, -166, 0)
- MeshPart43.Position = Vector3.new(30.4169445, 2.81083822, -3.54911661)
- MeshPart43.Rotation = Vector3.new(-180, -14, -180)
- MeshPart43.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart43.Size = Vector3.new(0.369218022, 0.776867568, 0.423293173)
- MeshPart43.BrickColor = BrickColor.new("Cool yellow")
- MeshPart43.brickColor = BrickColor.new("Cool yellow")
- MeshPart43.TextureID = "rbxassetid://853067666"
- Vector3Value44.Name = "OriginalPivot"
- Vector3Value44.Parent = mas
- Vector3Value44.Value = Vector3.new(0.0833166838, 0.217594504, 0.0342649072)
- Vector3Value45.Name = "OriginalPivot"
- Vector3Value45.Parent = mas
- Vector3Value45.Value = Vector3.new(-0.0266832709, 0.00519371033, 0.223540157)
- Vector3Value46.Name = "OriginalSize"
- Vector3Value46.Parent = MeshPart43
- Vector3Value46.Value = Vector3.new(0.295374423, 0.621494055, 0.338634551)
- Motor6D47.Name = "RightWrist"
- Motor6D47.Parent = MeshPart43
- Motor6D47.C0 = CFrame.new(0.0185979903, -0.507891893, -0.166260213, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D47.C1 = CFrame.new(0.104145855, 0.27199313, 0.0428311341, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D47.Part0 = MeshPart52
- Motor6D47.Part1 = MeshPart43
- Motor6D47.part1 = MeshPart43
- Script48.Name = "RepelScript"
- Script48.Parent = MeshPart43
- table.insert(cors,sandbox(Script48,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue49.Name = "CharacterToIgnore"
- ObjectValue49.Parent = Script48
- Sound50.Name = "PunchSound"
- Sound50.Parent = Script48
- Sound50.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound50.Volume = 0.20000000298023
- Weld51.Name = "RightGrip"
- Weld51.Parent = MeshPart43
- Weld51.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld51.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart52.Name = "RightLowerArm"
- MeshPart52.Parent = Model0
- MeshPart52.CFrame = CFrame.new(30.2833767, 3.59072638, -3.73130512, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart52.Orientation = Vector3.new(0, -166, 0)
- MeshPart52.Position = Vector3.new(30.2833767, 3.59072638, -3.73130512)
- MeshPart52.Rotation = Vector3.new(-180, -14, -180)
- MeshPart52.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart52.Size = Vector3.new(0.352708548, 1.14867139, 0.586645305)
- MeshPart52.BrickColor = BrickColor.new("Cool yellow")
- MeshPart52.brickColor = BrickColor.new("Cool yellow")
- MeshPart52.TextureID = "rbxassetid://853067666"
- Vector3Value53.Name = "OriginalPivot"
- Vector3Value53.Parent = mas
- Vector3Value53.Value = Vector3.new(0.0148784518, 0.398414552, 0.135081902)
- Vector3Value54.Name = "OriginalPivot"
- Vector3Value54.Parent = mas
- Vector3Value54.Value = Vector3.new(0.0148783922, -0.406313539, -0.133008167)
- Vector3Value55.Name = "OriginalSize"
- Vector3Value55.Parent = MeshPart52
- Vector3Value55.Value = Vector3.new(0.282166839, 0.918937087, 0.469316244)
- Motor6D56.Name = "RightElbow"
- Motor6D56.Parent = MeshPart52
- Motor6D56.C0 = CFrame.new(0.115770772, -0.543107688, 0.0500396714, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D56.C1 = CFrame.new(0.0185980648, 0.498018205, 0.168852374, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D56.Part0 = MeshPart61
- Motor6D56.Part1 = MeshPart52
- Motor6D56.part1 = MeshPart52
- Script57.Name = "RepelScript"
- Script57.Parent = MeshPart52
- table.insert(cors,sandbox(Script57,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue58.Name = "CharacterToIgnore"
- ObjectValue58.Parent = Script57
- Sound59.Name = "PunchSound"
- Sound59.Parent = Script57
- Sound59.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound59.Volume = 0.20000000298023
- Weld60.Name = "RightGrip"
- Weld60.Parent = MeshPart52
- Weld60.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld60.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart61.Name = "RightUpperArm"
- MeshPart61.Parent = Model0
- MeshPart61.CFrame = CFrame.new(30.3489475, 4.63185072, -3.87009478, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart61.Orientation = Vector3.new(0, -166, 0)
- MeshPart61.Position = Vector3.new(30.3489475, 4.63185072, -3.87009478)
- MeshPart61.Rotation = Vector3.new(-180, -14, -180)
- MeshPart61.Color = Color3.new(0.992157, 0.917647, 0.552941)
- MeshPart61.Size = Vector3.new(0.49409315, 1.34736133, 0.643033743)
- MeshPart61.BrickColor = BrickColor.new("Cool yellow")
- MeshPart61.brickColor = BrickColor.new("Cool yellow")
- MeshPart61.TextureID = "rbxassetid://853067666"
- Vector3Value62.Name = "OriginalPivot"
- Vector3Value62.Parent = mas
- Vector3Value62.Value = Vector3.new(-0.132383406, 0.29369086, 0.0288424864)
- Vector3Value63.Name = "OriginalPivot"
- Vector3Value63.Parent = mas
- Vector3Value63.Value = Vector3.new(0.0926166177, -0.434486151, 0.0400317386)
- Vector3Value64.Name = "OriginalPivot"
- Vector3Value64.Parent = mas
- Vector3Value64.Value = Vector3.new(-0.0873833895, 0.535106838, -0.0387829915)
- Vector3Value65.Name = "OriginalSize"
- Vector3Value65.Parent = MeshPart61
- Vector3Value65.Value = Vector3.new(0.39527452, 1.07788908, 0.514427006)
- Motor6D66.Name = "RightShoulder"
- Motor6D66.Parent = MeshPart61
- Motor6D66.C0 = CFrame.new(0.618749976, 0.319366306, 0.129334018, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D66.C1 = CFrame.new(-0.165479258, 0.36711359, 0.0360531062, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D66.Part0 = MeshPart71
- Motor6D66.Part1 = MeshPart61
- Motor6D66.part1 = MeshPart61
- Script67.Name = "RepelScript"
- Script67.Parent = MeshPart61
- table.insert(cors,sandbox(Script67,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue68.Name = "CharacterToIgnore"
- ObjectValue68.Parent = Script67
- Sound69.Name = "PunchSound"
- Sound69.Parent = Script67
- Sound69.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound69.Volume = 0.20000000298023
- Weld70.Name = "RightGrip"
- Weld70.Parent = MeshPart61
- Weld70.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld70.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart71.Name = "UpperTorso"
- MeshPart71.Parent = Model0
- MeshPart71.CFrame = CFrame.new(31.132452, 4.67957973, -3.96928406, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart71.Orientation = Vector3.new(0, -166, 0)
- MeshPart71.Position = Vector3.new(31.132452, 4.67957973, -3.96928406)
- MeshPart71.Rotation = Vector3.new(-180, -14, -180)
- MeshPart71.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart71.Size = Vector3.new(1.48787153, 2.23114824, 1.00564289)
- MeshPart71.BrickColor = BrickColor.new("Dark green")
- MeshPart71.brickColor = BrickColor.new("Dark green")
- MeshPart71.TextureID = "rbxassetid://853067666"
- Vector3Value72.Name = "OriginalPivot"
- Vector3Value72.Parent = mas
- Vector3Value72.Value = Vector3.new(-0, -0.674412072, 0.0358418524)
- Vector3Value73.Name = "OriginalPivot"
- Vector3Value73.Parent = mas
- Vector3Value73.Value = Vector3.new(-0, 0.784882188, -0.0369254574)
- Vector3Value74.Name = "OriginalPivot"
- Vector3Value74.Parent = mas
- Vector3Value74.Value = Vector3.new(-0.495000005, 0.255493045, 0.103467211)
- Vector3Value75.Name = "OriginalPivot"
- Vector3Value75.Parent = mas
- Vector3Value75.Value = Vector3.new(0.495000005, 0.255493045, 0.103467211)
- Vector3Value76.Name = "OriginalPivot"
- Vector3Value76.Parent = mas
- Vector3Value76.Value = Vector3.new(0, -0.339812875, -0.384158134)
- Vector3Value77.Name = "OriginalPivot"
- Vector3Value77.Parent = mas
- Vector3Value77.Value = Vector3.new(0, -0.339812875, 0.255841851)
- Vector3Value78.Name = "OriginalPivot"
- Vector3Value78.Parent = mas
- Vector3Value78.Value = Vector3.new(9.01869512e-09, 0.660187125, 0.035841804)
- Vector3Value79.Name = "OriginalPivot"
- Vector3Value79.Parent = mas
- Vector3Value79.Value = Vector3.new(0.349999994, 0.55018723, 0.0358417779)
- Vector3Value80.Name = "OriginalPivot"
- Vector3Value80.Parent = mas
- Vector3Value80.Value = Vector3.new(-0.349545687, 0.55018723, 0.0358416587)
- Vector3Value81.Name = "OriginalSize"
- Vector3Value81.Parent = MeshPart71
- Vector3Value81.Value = Vector3.new(1.19029725, 1.78491855, 0.804514349)
- Motor6D82.Name = "Waist"
- Motor6D82.Parent = MeshPart71
- Motor6D82.C0 = CFrame.new(-0, 0.449568778, 0.0911856443, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D82.C1 = CFrame.new(-0, -0.843015075, 0.0448023155, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D82.Part0 = MeshPart139
- Motor6D82.Part1 = MeshPart71
- Motor6D82.part1 = MeshPart71
- Script83.Name = "RepelScript"
- Script83.Parent = MeshPart71
- table.insert(cors,sandbox(Script83,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue84.Name = "CharacterToIgnore"
- ObjectValue84.Parent = Script83
- Sound85.Name = "PunchSound"
- Sound85.Parent = Script83
- Sound85.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound85.Volume = 0.20000000298023
- Weld86.Name = "RightGrip"
- Weld86.Parent = MeshPart71
- Weld86.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld86.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart87.Name = "LeftFoot"
- MeshPart87.Parent = Model0
- MeshPart87.CFrame = CFrame.new(31.4490128, 0.251838148, -3.88203955, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart87.Orientation = Vector3.new(0, -166, 0)
- MeshPart87.Position = Vector3.new(31.4490128, 0.251838148, -3.88203955)
- MeshPart87.Rotation = Vector3.new(-180, -14, -180)
- MeshPart87.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart87.Size = Vector3.new(0.433085203, 0.503646135, 1.06404793)
- MeshPart87.BrickColor = BrickColor.new("Bright blue")
- MeshPart87.brickColor = BrickColor.new("Bright blue")
- MeshPart87.TextureID = "rbxassetid://853067666"
- Vector3Value88.Name = "OriginalPivot"
- Vector3Value88.Parent = mas
- Vector3Value88.Value = Vector3.new(-0.0265804231, 0.00242400169, 0.179639131)
- Vector3Value89.Name = "OriginalSize"
- Vector3Value89.Parent = MeshPart87
- Vector3Value89.Value = Vector3.new(0.346468151, 0.402916908, 0.85123831)
- Motor6D90.Name = "LeftAnkle"
- Motor6D90.Parent = MeshPart87
- Motor6D90.C0 = CFrame.new(-0.0208500773, -0.907178521, -0.0181139186, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D90.C1 = CFrame.new(-0.0332255289, 0.00303000212, 0.224548906, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D90.Part0 = MeshPart95
- Motor6D90.Part1 = MeshPart87
- Motor6D90.part1 = MeshPart87
- Script91.Name = "RepelScript"
- Script91.Parent = MeshPart87
- table.insert(cors,sandbox(Script91,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue92.Name = "CharacterToIgnore"
- ObjectValue92.Parent = Script91
- Sound93.Name = "PunchSound"
- Sound93.Parent = Script91
- Sound93.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound93.Volume = 0.20000000298023
- Weld94.Name = "RightGrip"
- Weld94.Parent = MeshPart87
- Weld94.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld94.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart95.Name = "LeftLowerLeg"
- MeshPart95.Parent = Model0
- MeshPart95.CFrame = CFrame.new(31.4023438, 1.16204774, -4.1204896, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart95.Orientation = Vector3.new(0, -166, 0)
- MeshPart95.Position = Vector3.new(31.4023438, 1.16204774, -4.1204896)
- MeshPart95.Rotation = Vector3.new(-180, -14, -180)
- MeshPart95.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart95.Size = Vector3.new(0.567250729, 1.82340312, 0.722959042)
- MeshPart95.BrickColor = BrickColor.new("Bright blue")
- MeshPart95.brickColor = BrickColor.new("Bright blue")
- MeshPart95.TextureID = "rbxassetid://853067666"
- Vector3Value96.Name = "OriginalPivot"
- Vector3Value96.Parent = mas
- Vector3Value96.Value = Vector3.new(-0.0166786611, 0.659965277, -0.0292149782)
- Vector3Value97.Name = "OriginalPivot"
- Vector3Value97.Parent = mas
- Vector3Value97.Value = Vector3.new(-0.0166800618, -0.725742817, -0.0144911343)
- Vector3Value98.Name = "OriginalSize"
- Vector3Value98.Parent = MeshPart95
- Vector3Value98.Value = Vector3.new(0.453800559, 1.45872247, 0.578367233)
- Motor6D99.Name = "LeftKnee"
- Motor6D99.Parent = MeshPart95
- Motor6D99.C0 = CFrame.new(0.00771716237, -0.594468415, 0.0933873057, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D99.C1 = CFrame.new(-0.0208483264, 0.824956596, -0.0365187228, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D99.Part0 = MeshPart104
- Motor6D99.Part1 = MeshPart95
- Motor6D99.part1 = MeshPart95
- Script100.Name = "RepelScript"
- Script100.Parent = MeshPart95
- table.insert(cors,sandbox(Script100,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue101.Name = "CharacterToIgnore"
- ObjectValue101.Parent = Script100
- Sound102.Name = "PunchSound"
- Sound102.Parent = Script100
- Sound102.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound102.Volume = 0.20000000298023
- Weld103.Name = "RightGrip"
- Weld103.Parent = MeshPart95
- Weld103.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld103.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart104.Name = "LeftUpperLeg"
- MeshPart104.Parent = Model0
- MeshPart104.CFrame = CFrame.new(31.4615173, 2.58147144, -4.00135136, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart104.Orientation = Vector3.new(0, -166, 0)
- MeshPart104.Position = Vector3.new(31.4615173, 2.58147144, -4.00135136)
- MeshPart104.Rotation = Vector3.new(-180, -14, -180)
- MeshPart104.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart104.Size = Vector3.new(0.61734277, 1.89089322, 0.802329183)
- MeshPart104.BrickColor = BrickColor.new("Bright blue")
- MeshPart104.brickColor = BrickColor.new("Bright blue")
- MeshPart104.TextureID = "rbxassetid://853067666"
- Vector3Value105.Name = "OriginalPivot"
- Vector3Value105.Parent = mas
- Vector3Value105.Value = Vector3.new(0.00617405772, 0.677015483, -0.0151920542)
- Vector3Value106.Name = "OriginalPivot"
- Vector3Value106.Parent = mas
- Vector3Value106.Value = Vector3.new(0.0061737299, -0.475574732, 0.0747098476)
- Vector3Value107.Name = "OriginalSize"
- Vector3Value107.Parent = MeshPart104
- Vector3Value107.Value = Vector3.new(0.493874222, 1.51271462, 0.641863346)
- Motor6D108.Name = "LeftHip"
- Motor6D108.Parent = MeshPart104
- Motor6D108.C0 = CFrame.new(-0.319378495, 0.0407524444, -0.021102028, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D108.C1 = CFrame.new(0.00771757215, 0.846269369, -0.0189900678, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D108.Part0 = MeshPart139
- Motor6D108.Part1 = MeshPart104
- Motor6D108.part1 = MeshPart104
- Script109.Name = "RepelScript"
- Script109.Parent = MeshPart104
- table.insert(cors,sandbox(Script109,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue110.Name = "CharacterToIgnore"
- ObjectValue110.Parent = Script109
- Sound111.Name = "PunchSound"
- Sound111.Parent = Script109
- Sound111.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound111.Volume = 0.20000000298023
- Weld112.Name = "RightGrip"
- Weld112.Parent = MeshPart104
- Weld112.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld112.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart113.Name = "RightFoot"
- MeshPart113.Parent = Model0
- MeshPart113.CFrame = CFrame.new(30.8937073, 0.251859844, -3.7435708, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart113.Orientation = Vector3.new(0, -166, 0)
- MeshPart113.Position = Vector3.new(30.8937073, 0.251859844, -3.7435708)
- MeshPart113.Rotation = Vector3.new(-180, -14, -180)
- MeshPart113.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart113.Size = Vector3.new(0.433085561, 0.503645539, 1.06404793)
- MeshPart113.BrickColor = BrickColor.new("Bright blue")
- MeshPart113.brickColor = BrickColor.new("Bright blue")
- MeshPart113.TextureID = "rbxassetid://853067666"
- Vector3Value114.Name = "OriginalPivot"
- Vector3Value114.Parent = mas
- Vector3Value114.Value = Vector3.new(0.0270769298, 0.0017683506, 0.179639086)
- Vector3Value115.Name = "OriginalSize"
- Vector3Value115.Parent = MeshPart113
- Vector3Value115.Value = Vector3.new(0.346468449, 0.402916431, 0.85123831)
- Motor6D116.Name = "RightAnkle"
- Motor6D116.Parent = MeshPart113
- Motor6D116.C0 = CFrame.new(0.0214695558, -0.907988548, -0.0181149151, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D116.C1 = CFrame.new(0.0338461623, 0.00221043825, 0.224548861, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D116.Part0 = MeshPart121
- Motor6D116.Part1 = MeshPart113
- Motor6D116.part1 = MeshPart113
- Script117.Name = "RepelScript"
- Script117.Parent = MeshPart113
- table.insert(cors,sandbox(Script117,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue118.Name = "CharacterToIgnore"
- ObjectValue118.Parent = Script117
- Sound119.Name = "PunchSound"
- Sound119.Parent = Script117
- Sound119.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound119.Volume = 0.20000000298023
- Weld120.Name = "RightGrip"
- Weld120.Parent = MeshPart113
- Weld120.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld120.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart121.Name = "RightLowerLeg"
- MeshPart121.Parent = Model0
- MeshPart121.CFrame = CFrame.new(30.8230209, 1.1620605, -3.9760344, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart121.Orientation = Vector3.new(0, -166, 0)
- MeshPart121.Position = Vector3.new(30.8230209, 1.1620605, -3.9760344)
- MeshPart121.Rotation = Vector3.new(-180, -14, -180)
- MeshPart121.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart121.Size = Vector3.new(0.567250729, 1.82340324, 0.72296077)
- MeshPart121.BrickColor = BrickColor.new("Bright blue")
- MeshPart121.brickColor = BrickColor.new("Bright blue")
- MeshPart121.TextureID = "rbxassetid://853067666"
- Vector3Value122.Name = "OriginalPivot"
- Vector3Value122.Parent = mas
- Vector3Value122.Value = Vector3.new(0.0171756446, 0.659609318, -0.0291916057)
- Vector3Value123.Name = "OriginalPivot"
- Vector3Value123.Parent = mas
- Vector3Value123.Value = Vector3.new(0.0171756446, -0.726390839, -0.0144919315)
- Vector3Value124.Name = "OriginalSize"
- Vector3Value124.Parent = MeshPart121
- Vector3Value124.Value = Vector3.new(0.453800559, 1.45872259, 0.578368604)
- Motor6D125.Name = "RightKnee"
- Motor6D125.Parent = MeshPart121
- Motor6D125.C0 = CFrame.new(-0.00709604472, -0.594914436, 0.0933924392, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D125.C1 = CFrame.new(0.0214695558, 0.824511647, -0.036489509, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D125.Part0 = MeshPart130
- Motor6D125.Part1 = MeshPart121
- Motor6D125.part1 = MeshPart121
- Script126.Name = "RepelScript"
- Script126.Parent = MeshPart121
- table.insert(cors,sandbox(Script126,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue127.Name = "CharacterToIgnore"
- ObjectValue127.Parent = Script126
- Sound128.Name = "PunchSound"
- Sound128.Parent = Script126
- Sound128.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound128.Volume = 0.20000000298023
- Weld129.Name = "RightGrip"
- Weld129.Parent = MeshPart121
- Weld129.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld129.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart130.Name = "RightUpperLeg"
- MeshPart130.Parent = Model0
- MeshPart130.CFrame = CFrame.new(30.8267536, 2.58148646, -3.84309983, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart130.Orientation = Vector3.new(0, -166, 0)
- MeshPart130.Position = Vector3.new(30.8267536, 2.58148646, -3.84309983)
- MeshPart130.Rotation = Vector3.new(-180, -14, -180)
- MeshPart130.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- MeshPart130.Size = Vector3.new(0.61734277, 1.89089394, 0.802323341)
- MeshPart130.BrickColor = BrickColor.new("Bright blue")
- MeshPart130.brickColor = BrickColor.new("Bright blue")
- MeshPart130.TextureID = "rbxassetid://853067666"
- Vector3Value131.Name = "OriginalPivot"
- Vector3Value131.Parent = mas
- Vector3Value131.Value = Vector3.new(-0.00567683578, 0.677068412, -0.0151865557)
- Vector3Value132.Name = "OriginalPivot"
- Vector3Value132.Parent = mas
- Vector3Value132.Value = Vector3.new(-0.00567683578, -0.475931525, 0.0747139528)
- Vector3Value133.Name = "OriginalSize"
- Vector3Value133.Parent = MeshPart130
- Vector3Value133.Value = Vector3.new(0.493874222, 1.5127151, 0.641858697)
- Motor6D134.Name = "RightHip"
- Motor6D134.Parent = MeshPart130
- Motor6D134.C0 = CFrame.new(0.320000023, 0.0408187844, -0.021102028, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D134.C1 = CFrame.new(-0.00709604472, 0.84633553, -0.0189831946, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D134.Part0 = MeshPart139
- Motor6D134.Part1 = MeshPart130
- Motor6D134.part1 = MeshPart130
- Script135.Name = "RepelScript"
- Script135.Parent = MeshPart130
- table.insert(cors,sandbox(Script135,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue136.Name = "CharacterToIgnore"
- ObjectValue136.Parent = Script135
- Sound137.Name = "PunchSound"
- Sound137.Parent = Script135
- Sound137.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound137.Volume = 0.20000000298023
- Weld138.Name = "RightGrip"
- Weld138.Parent = MeshPart130
- Weld138.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld138.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- MeshPart139.Name = "LowerTorso"
- MeshPart139.Parent = Model0
- MeshPart139.CFrame = CFrame.new(31.1436424, 3.38699579, -3.92427826, -0.97030282, 2.34305717e-05, -0.241893664, 2.27350138e-05, 1, 5.66664266e-06, 0.241893664, -1.09535314e-09, -0.97030282)
- MeshPart139.Orientation = Vector3.new(0, -166, 0)
- MeshPart139.Position = Vector3.new(31.1436424, 3.38699579, -3.92427826)
- MeshPart139.Rotation = Vector3.new(-180, -14, -180)
- MeshPart139.Color = Color3.new(0.156863, 0.498039, 0.278431)
- MeshPart139.Size = Vector3.new(1.19766641, 0.867998302, 0.90235424)
- MeshPart139.BrickColor = BrickColor.new("Dark green")
- MeshPart139.brickColor = BrickColor.new("Dark green")
- MeshPart139.TextureID = "rbxassetid://853067666"
- Vector3Value140.Name = "OriginalPivot"
- Vector3Value140.Parent = mas
- Vector3Value140.Value = Vector3.new(-0, 0.044655025, 0.0729485154)
- Vector3Value141.Name = "OriginalPivot"
- Vector3Value141.Parent = mas
- Vector3Value141.Value = Vector3.new(-0, 0.359655023, 0.0729485154)
- Vector3Value142.Name = "OriginalPivot"
- Vector3Value142.Parent = mas
- Vector3Value142.Value = Vector3.new(-0.25550279, 0.0326019563, -0.0168816224)
- Vector3Value143.Name = "OriginalPivot"
- Vector3Value143.Parent = mas
- Vector3Value143.Value = Vector3.new(0.256000012, 0.0326550268, -0.0168816224)
- Vector3Value144.Name = "OriginalPivot"
- Vector3Value144.Parent = mas
- Vector3Value144.Value = Vector3.new(-3.02791591e-07, -0.0814045072, 0.0729485154)
- Vector3Value145.Name = "OriginalPivot"
- Vector3Value145.Parent = mas
- Vector3Value145.Value = Vector3.new(-1.30105766e-08, -0.0814045072, -0.177051485)
- Vector3Value146.Name = "OriginalPivot"
- Vector3Value146.Parent = mas
- Vector3Value146.Value = Vector3.new(-2.72039316e-08, -0.0814045072, 0.358314306)
- Vector3Value147.Name = "OriginalSize"
- Vector3Value147.Parent = MeshPart139
- Vector3Value147.Value = Vector3.new(0.958133101, 0.694398642, 0.721883416)
- Motor6D148.Name = "Root"
- Motor6D148.Parent = MeshPart139
- Motor6D148.C1 = CFrame.new(-0, 0.0558187813, 0.0911856443, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Motor6D148.Part0 = Part1
- Motor6D148.Part1 = MeshPart139
- Motor6D148.part1 = MeshPart139
- Script149.Name = "RepelScript"
- Script149.Parent = MeshPart139
- table.insert(cors,sandbox(Script149,function()
- -- Adds a repulsive force to anything this object touches
- local Part = script.Parent
- local Debris = game:GetService('Debris')
- local CharacterToIgnore = script:WaitForChild('CharacterToIgnore').Value
- local MAGNITUDE = 3E4
- local TIME_OF_FORCE = 0.2
- Part.Touched:connect(function(other)
- if other.Parent == CharacterToIgnore or (other.Parent and other.Parent.Parent == CharacterToIgnore) then return end
- if not other.Anchored then
- local punchSound = script:FindFirstChild('PunchSound')
- if punchSound then punchSound:Play() end
- local direction = (other.Position - Part.Position).unit
- local bodyForce = Instance.new('BodyForce')
- bodyForce.force = MAGNITUDE * direction
- bodyForce.Parent = other
- Debris:AddItem(bodyForce, TIME_OF_FORCE)
- end
- end)
- end))
- ObjectValue150.Name = "CharacterToIgnore"
- ObjectValue150.Parent = Script149
- Sound151.Name = "PunchSound"
- Sound151.Parent = Script149
- Sound151.SoundId = "http://www.roblox.com/asset?id=121603067"
- Sound151.Volume = 0.20000000298023
- Weld152.Name = "RightGrip"
- Weld152.Parent = MeshPart139
- Weld152.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- Weld152.C1 = CFrame.new(-0.200000003, 0, -0.150000006, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- BodyColors153.Parent = Model0
- Animation154.Parent = Model0
- Animation154.AnimationId = "rbxassetid://774242142"
- Script155.Name = "Move"
- Script155.Parent = Model0
- table.insert(cors,sandbox(Script155,function()
- local CurrentPart = nil
- local MaxInc = 60
- 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, "HumanoidRootPart")
- local Left = waitForChild(Figure, "LeftFoot")
- local Right = waitForChild(Figure, "RightFoot")
- 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(5, 7) == 1 then
- Humanoid.Jump = true
- end
- Humanoid:MoveTo(Torso.Position + Vector3.new(math.random(-MaxInc, MaxInc), 0, math.random(-MaxInc, MaxInc)), CurrentPart)
- end
- end
- end))
- Script156.Name = "Animate"
- Script156.Parent = Model0
- table.insert(cors,sandbox(Script156,function()
- 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
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 15.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- 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
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- 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
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- 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)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- script.msg.Changed:connect(function(msg)
- script.msg.Value = ""
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- print("bottom")
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue157.Name = "msg"
- StringValue157.Parent = Script156
- StringValue158.Name = "climb"
- StringValue158.Parent = Script156
- Animation159.Name = "ClimbAnim"
- Animation159.Parent = StringValue158
- Animation159.AnimationId = "http://www.roblox.com/asset/?id=507765644"
- StringValue160.Name = "fall"
- StringValue160.Parent = Script156
- Animation161.Name = "FallAnim"
- Animation161.Parent = StringValue160
- Animation161.AnimationId = "http://www.roblox.com/asset/?id=507767968"
- StringValue162.Name = "jump"
- StringValue162.Parent = Script156
- Animation163.Name = "JumpAnim"
- Animation163.Parent = StringValue162
- Animation163.AnimationId = "http://www.roblox.com/asset/?id=507765000"
- StringValue164.Name = "run"
- StringValue164.Parent = Script156
- Animation165.Name = "RunAnim"
- Animation165.Parent = StringValue164
- Animation165.AnimationId = "http://www.roblox.com/asset/?id=5077677142"
- StringValue166.Name = "sit"
- StringValue166.Parent = Script156
- Animation167.Name = "SitAnim"
- Animation167.Parent = StringValue166
- Animation167.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- StringValue168.Name = "swim"
- StringValue168.Parent = Script156
- Animation169.Name = "Swim"
- Animation169.Parent = StringValue168
- Animation169.AnimationId = "http://www.roblox.com/asset/?id=507784897"
- StringValue170.Name = "swimidle"
- StringValue170.Parent = Script156
- Animation171.Name = "SwimIdle"
- Animation171.Parent = StringValue170
- Animation171.AnimationId = "http://www.roblox.com/asset/?id=481825862"
- StringValue172.Name = "toolnone"
- StringValue172.Parent = Script156
- Animation173.Name = "ToolNoneAnim"
- Animation173.Parent = StringValue172
- Animation173.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- StringValue174.Name = "walk"
- StringValue174.Parent = Script156
- Animation175.Name = "RunAnim"
- Animation175.Parent = StringValue174
- Animation175.AnimationId = "http://www.roblox.com/asset/?id=507777826"
- StringValue176.Name = "idle"
- StringValue176.Parent = Script156
- Animation177.Name = "Animation1"
- Animation177.Parent = StringValue176
- Animation177.AnimationId = "http://www.roblox.com/asset/?id=507766388"
- NumberValue178.Name = "Weight"
- NumberValue178.Parent = Animation177
- NumberValue178.Value = 9
- Animation179.Name = "Animation2"
- Animation179.Parent = StringValue176
- Animation179.AnimationId = "http://www.roblox.com/asset/?id=507766666"
- NumberValue180.Name = "Weight"
- NumberValue180.Parent = Animation179
- NumberValue180.Value = 1
- LocalScript181.Name = "RagdollClient"
- LocalScript181.Parent = Model0
- table.insert(cors,sandbox(LocalScript181,function()
- local character = script.Parent
- function recurse(root,callback,i)
- i= i or 0
- for _,v in pairs(root:GetChildren()) do
- i = i + 1
- callback(i,v)
- if #v:GetChildren() > 0 then
- i = recurse(v,callback,i)
- end
- end
- return i
- end
- function ragdollJoint(part0, part1, attachmentName, className, properties)
- attachmentName = attachmentName.."RigAttachment"
- local constraint = Instance.new(className.."Constraint")
- constraint.Attachment0 = part0:FindFirstChild(attachmentName)
- constraint.Attachment1 = part1:FindFirstChild(attachmentName)
- constraint.Name = "RagdollConstraint"..part1.Name
- for _,propertyData in next,properties or {} do
- constraint[propertyData[1]] = propertyData[2]
- end
- constraint.Parent = character
- end
- function getAttachment0(attachmentName)
- for _,child in next,character:GetChildren() do
- local attachment = child:FindFirstChild(attachmentName)
- if attachment then
- return attachment
- end
- end
- end
- character:WaitForChild("Humanoid").Died:connect(function()
- local camera = workspace.CurrentCamera
- if camera.CameraSubject == character.Humanoid then--If developer isn't controlling camera
- camera.CameraSubject = character.UpperTorso
- end
- --Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process
- character.HumanoidRootPart.Anchored = true
- character.HumanoidRootPart.CanCollide = false
- --Helps to fix constraint spasms
- recurse(character, function(_,v)
- if v:IsA("Attachment") then
- v.Axis = Vector3.new(0, 1, 0)
- v.SecondaryAxis = Vector3.new(0, 0, 1)
- v.Rotation = Vector3.new(0, 0, 0)
- end
- end)
- --Re-attach hats
- for _,child in next,character:GetChildren() do
- if child:IsA("Accoutrement") then
- --Loop through all parts instead of only checking for one to be forwards-compatible in the event
- --ROBLOX implements multi-part accessories
- for _,part in next,child:GetChildren() do
- if part:IsA("BasePart") then
- local attachment1 = part:FindFirstChildOfClass("Attachment")
- local attachment0 = getAttachment0(attachment1.Name)
- if attachment0 and attachment1 then
- --Shouldn't use constraints for this, but have to because of a ROBLOX idiosyncrasy where
- --joints connecting a character are perpetually deleted while the character is dead
- local constraint = Instance.new("HingeConstraint")
- constraint.Attachment0 = attachment0
- constraint.Attachment1 = attachment1
- constraint.LimitsEnabled = true
- constraint.UpperAngle = 0 --Simulate weld by making it difficult for constraint to move
- constraint.LowerAngle = 0
- constraint.Parent = character
- end
- end
- end
- end
- end
- ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",5};
- })
- ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",15};
- })
- local handProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle",0};
- {"LowerAngle",0};
- }
- ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
- ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
- local shinProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 0};
- {"LowerAngle", -75};
- }
- ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
- ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
- local footProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 15};
- {"LowerAngle", -45};
- }
- ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
- ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
- --TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
- ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
- ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
- ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
- ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
- ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
- ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
- end)
- end))
- Script182.Name = "Sound"
- Script182.Parent = Model0
- table.insert(cors,sandbox(Script182,function()
- --[[
- Author: @spotco
- This script creates sounds which are placed under the character head.
- These sounds are used by the "LocalSound" script.
- To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
- The default Sound script loaded for every character will then be replaced with your copy of the script.
- ]]--
- function CreateNewSound(name, id, looped, pitch, parent)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Parent = parent
- sound.Pitch = pitch
- sound.Looped = looped
- sound.MinDistance = 5
- sound.MaxDistance = 150
- sound.Volume = 0.65
- return sound
- end
- local head = script.Parent:FindFirstChild("Head")
- if head == nil then
- error("Sound script parent has no child Head.")
- return
- end
- CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
- CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
- CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
- CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
- CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
- CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
- CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
- CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
- CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
- end))
- Script183.Name = "LocalSound"
- Script183.Parent = Script182
- table.insert(cors,sandbox(Script183,function()
- --[[
- Author: @spotco
- This script runs locally for the player of the given humanoid.
- This script triggers humanoid sound play/pause actions locally.
- The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
- immediately for the player and is replicated to all other players.
- This script is optimized to reduce network traffic through minimizing the amount of property replication.
- ]]--
- --All sounds are referenced by this ID
- local SFX = {
- Died = 0;
- Running = 1;
- Swimming = 2;
- Climbing = 3,
- Jumping = 4;
- GettingUp = 5;
- FreeFalling = 6;
- FallingDown = 7;
- Landing = 8;
- Splash = 9;
- }
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- do
- local Figure = script.Parent.Parent
- Head = Figure:WaitForChild("Head")
- while not Humanoid do
- for _,NewHumanoid in pairs(Figure:GetChildren()) do
- if NewHumanoid:IsA("Humanoid") then
- Humanoid = NewHumanoid
- break
- end
- end
- Figure.ChildAdded:wait()
- end
- Sounds[SFX.Died] = Head:WaitForChild("Died")
- Sounds[SFX.Running] = Head:WaitForChild("Running")
- Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
- Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
- Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
- Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
- Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
- Sounds[SFX.Landing] = Head:WaitForChild("Landing")
- Sounds[SFX.Splash] = Head:WaitForChild("Splash")
- end
- local Util
- Util = {
- --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
- YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
- --(y - y1)/(x - x1) = m
- local m = (pt1y - pt2y) / (pt1x - pt2x)
- --float b = pt1.y - m * pt1.x;
- local b = (pt1y - m * pt1x)
- return m * x + b
- end;
- --Clamps the value of "val" between the "min" and "max"
- Clamp = function(val,min,max)
- return math.min(max,math.max(min,val))
- end;
- --Gets the horizontal (x,z) velocity magnitude of the given part
- HorizontalSpeed = function(Head)
- local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
- return hVel.magnitude
- end;
- --Gets the vertical (y) velocity magnitude of the given part
- VerticalSpeed = function(Head)
- return math.abs(Head.Velocity.Y)
- end;
- --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
- --If these properties are enabled, use them.
- Play = function(sound)
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if sound.IsPlaying then
- sound.Playing = false
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- end;
- }
- do
- -- List of all active Looped sounds
- local playingLoopedSounds = {}
- -- Last seen Enum.HumanoidStateType
- local activeState = nil
- -- Verify and set that "sound" is in "playingLoopedSounds".
- function setSoundInPlayingLoopedSounds(sound)
- for i=1, #playingLoopedSounds do
- if playingLoopedSounds[i] == sound then
- return
- end
- end
- table.insert(playingLoopedSounds,sound)
- end
- -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
- function stopPlayingLoopedSoundsExcept(except)
- for i=#playingLoopedSounds,1,-1 do
- if playingLoopedSounds[i] ~= except then
- Util.Pause(playingLoopedSounds[i])
- table.remove(playingLoopedSounds,i)
- end
- end
- end
- -- Table of Enum.HumanoidStateType to handling function
- local stateUpdateHandler = {
- [Enum.HumanoidStateType.Dead] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Died]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.RunningNoPhysics] = function()
- stateUpdated(Enum.HumanoidStateType.Running)
- end;
- [Enum.HumanoidStateType.Running] = function()
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function()
- if activeState ~= Enum.HumanoidStateType.Swimming and Util.VerticalSpeed(Head) > 0.1 then
- local splashSound = Sounds[SFX.Splash]
- splashSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 100, 0.28,
- 350, 1),
- 0,1)
- Util.Play(splashSound)
- end
- do
- local sound = Sounds[SFX.Swimming]
- stopPlayingLoopedSoundsExcept(sound)
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- end
- end;
- [Enum.HumanoidStateType.Climbing] = function()
- local sound = Sounds[SFX.Climbing]
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- setSoundInPlayingLoopedSounds(sound)
- end;
- [Enum.HumanoidStateType.Jumping] = function()
- if activeState == Enum.HumanoidStateType.Jumping then
- return
- end
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Jumping]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.GettingUp] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.GettingUp]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.Freefall] = function()
- if activeState == Enum.HumanoidStateType.Freefall then
- return
- end
- local sound = Sounds[SFX.FreeFalling]
- sound.Volume = 0
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.FallingDown] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.Landed] = function()
- stopPlayingLoopedSoundsExcept()
- if Util.VerticalSpeed(Head) > 75 then
- local landingSound = Sounds[SFX.Landing]
- landingSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 50, 0,
- 100, 1),
- 0,1)
- Util.Play(landingSound)
- end
- end
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state)
- if stateUpdateHandler[state] ~= nil then
- stateUpdateHandler[state]()
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function() stateUpdated(Enum.HumanoidStateType.Running) end)
- Humanoid.Swimming:connect( function() stateUpdated(Enum.HumanoidStateType.Swimming) end)
- Humanoid.Climbing:connect( function() stateUpdated(Enum.HumanoidStateType.Climbing) end)
- Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
- Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
- Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
- Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
- -- required for proper handling of Landed event
- Humanoid.StateChanged:connect(function(old, new)
- stateUpdated(new)
- end)
- function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
- local stepScale = stepDeltaSeconds / tickSpeedSeconds
- do
- local sound = Sounds[SFX.FreeFalling]
- if activeState == Enum.HumanoidStateType.Freefall then
- if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
- Util.Resume(sound)
- --Volume takes 1.1 seconds to go from volume 0 to 1
- local ANIMATION_LENGTH_SECONDS = 1.1
- local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
- sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
- else
- sound.Volume = 0
- end
- else
- Util.Pause(sound)
- end
- end
- do
- local sound = Sounds[SFX.Running]
- if activeState == Enum.HumanoidStateType.Running then
- if Util.HorizontalSpeed(Head) < 0.5 then
- Util.Pause(sound)
- end
- end
- end
- end
- local lastTick = tick()
- local TICK_SPEED_SECONDS = 0.25
- while true do
- onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
- lastTick = tick()
- wait(TICK_SPEED_SECONDS)
- end
- 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