Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with PenguinAnonymous's compiler
- --PenguinAnonymous is not responsible for damages caused to your game
- --This plugin does not remove things
- --PenguinAnonymous cannot be held resonsible for manual deletion for the purpose of testing
- --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
- --Thank you for using my plugin and enjoy :)
- --It is free to use
- --If you use this plugin to create your own, please give me credit
- --Z_V edited my plugin to look like his own and published it without giving me credit, and that makes me very angry
- --Errors: Attachment,Animator,Status,MeshPart
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Model")
- o2 = Instance.new("Part")
- o3 = Instance.new("Vector3Value")
- o4 = Instance.new("Part")
- o5 = Instance.new("Vector3Value")
- o6 = Instance.new("Part")
- o7 = Instance.new("Vector3Value")
- o8 = Instance.new("Script")
- o9 = Instance.new("Part")
- o10 = Instance.new("Script")
- o11 = Instance.new("Vector3Value")
- o12 = Instance.new("Backpack")
- o13 = Instance.new("Script")
- o14 = Instance.new("ObjectValue")
- o15 = Instance.new("BindableEvent")
- o16 = Instance.new("Script")
- o17 = Instance.new("Script")
- o18 = Instance.new("Script")
- o19 = Instance.new("Model")
- o20 = Instance.new("Script")
- o21 = Instance.new("StringValue")
- o22 = Instance.new("Animation")
- o23 = Instance.new("StringValue")
- o24 = Instance.new("Animation")
- o25 = Instance.new("StringValue")
- o26 = Instance.new("Animation")
- o27 = Instance.new("StringValue")
- o28 = Instance.new("Animation")
- o29 = Instance.new("StringValue")
- o30 = Instance.new("Animation")
- o31 = Instance.new("StringValue")
- o32 = Instance.new("Animation")
- o33 = Instance.new("StringValue")
- o34 = Instance.new("Animation")
- o35 = Instance.new("StringValue")
- o36 = Instance.new("Animation")
- o37 = Instance.new("StringValue")
- o38 = Instance.new("Animation")
- o39 = Instance.new("StringValue")
- o40 = Instance.new("Animation")
- o41 = Instance.new("StringValue")
- o42 = Instance.new("Animation")
- o43 = Instance.new("StringValue")
- o44 = Instance.new("Animation")
- o45 = Instance.new("StringValue")
- o46 = Instance.new("Animation")
- o47 = Instance.new("NumberValue")
- o48 = Instance.new("Animation")
- o49 = Instance.new("NumberValue")
- o50 = Instance.new("Animation")
- o51 = Instance.new("NumberValue")
- o52 = Instance.new("Animation")
- o53 = Instance.new("NumberValue")
- o54 = Instance.new("Animation")
- o55 = Instance.new("NumberValue")
- o56 = Instance.new("StringValue")
- o57 = Instance.new("Animation")
- o58 = Instance.new("StringValue")
- o59 = Instance.new("Animation")
- o60 = Instance.new("NumberValue")
- o61 = Instance.new("Animation")
- o62 = Instance.new("NumberValue")
- o63 = Instance.new("Animation")
- o64 = Instance.new("NumberValue")
- o65 = Instance.new("StringValue")
- o66 = Instance.new("Animation")
- o67 = Instance.new("NumberValue")
- o68 = Instance.new("Animation")
- o69 = Instance.new("NumberValue")
- o70 = Instance.new("Animation")
- o71 = Instance.new("NumberValue")
- o72 = Instance.new("StringValue")
- o73 = Instance.new("Animation")
- o74 = Instance.new("NumberValue")
- o75 = Instance.new("Animation")
- o76 = Instance.new("NumberValue")
- o77 = Instance.new("Animation")
- o78 = Instance.new("NumberValue")
- o79 = Instance.new("StringValue")
- o80 = Instance.new("Animation")
- o81 = Instance.new("StringValue")
- o82 = Instance.new("Animation")
- o83 = Instance.new("Part")
- o84 = Instance.new("BlockMesh")
- o85 = Instance.new("Decal")
- o86 = Instance.new("Decal")
- o87 = Instance.new("Decal")
- o88 = Instance.new("Decal")
- o89 = Instance.new("Decal")
- o90 = Instance.new("Decal")
- o91 = Instance.new("Vector3Value")
- o92 = Instance.new("Script")
- o93 = Instance.new("StringValue")
- o94 = Instance.new("Animation")
- o95 = Instance.new("StringValue")
- o96 = Instance.new("Animation")
- o97 = Instance.new("StringValue")
- o98 = Instance.new("Animation")
- o99 = Instance.new("StringValue")
- o100 = Instance.new("Animation")
- o101 = Instance.new("StringValue")
- o102 = Instance.new("Animation")
- o103 = Instance.new("StringValue")
- o104 = Instance.new("Animation")
- o105 = Instance.new("StringValue")
- o106 = Instance.new("Animation")
- o107 = Instance.new("StringValue")
- o108 = Instance.new("Animation")
- o109 = Instance.new("NumberValue")
- o110 = Instance.new("Animation")
- o111 = Instance.new("NumberValue")
- o112 = Instance.new("StringValue")
- o113 = Instance.new("Animation")
- o114 = Instance.new("StringValue")
- o115 = Instance.new("Animation")
- o116 = Instance.new("Part")
- o117 = Instance.new("Motor6D")
- o118 = Instance.new("Vector3Value")
- o120 = Instance.new("Vector3Value")
- o122 = Instance.new("Vector3Value")
- o124 = Instance.new("Vector3Value")
- o126 = Instance.new("Vector3Value")
- o128 = Instance.new("Vector3Value")
- o129 = Instance.new("Humanoid")
- o130 = Instance.new("NumberValue")
- o131 = Instance.new("Script")
- o132 = Instance.new("NumberValue")
- o133 = Instance.new("NumberValue")
- o134 = Instance.new("NumberValue")
- o138 = Instance.new("Motor6D")
- o139 = Instance.new("Vector3Value")
- o141 = Instance.new("Vector3Value")
- o143 = Instance.new("Vector3Value")
- o145 = Instance.new("Vector3Value")
- o147 = Instance.new("Vector3Value")
- o149 = Instance.new("Vector3Value")
- o151 = Instance.new("Vector3Value")
- o153 = Instance.new("Vector3Value")
- o155 = Instance.new("Motor6D")
- o156 = Instance.new("Vector3Value")
- o158 = Instance.new("Vector3Value")
- o160 = Instance.new("Vector3Value")
- o162 = Instance.new("Motor6D")
- o163 = Instance.new("Vector3Value")
- o165 = Instance.new("Vector3Value")
- o167 = Instance.new("Vector3Value")
- o169 = Instance.new("Motor6D")
- o170 = Instance.new("Vector3Value")
- o172 = Instance.new("Vector3Value")
- o174 = Instance.new("Motor6D")
- o175 = Instance.new("Vector3Value")
- o177 = Instance.new("Vector3Value")
- o179 = Instance.new("Vector3Value")
- o181 = Instance.new("Motor6D")
- o182 = Instance.new("Vector3Value")
- o184 = Instance.new("Vector3Value")
- o186 = Instance.new("Vector3Value")
- o188 = Instance.new("Motor6D")
- o189 = Instance.new("Vector3Value")
- o191 = Instance.new("Vector3Value")
- o193 = Instance.new("Motor6D")
- o194 = Instance.new("Vector3Value")
- o196 = Instance.new("Vector3Value")
- o198 = Instance.new("Vector3Value")
- o200 = Instance.new("Vector3Value")
- o202 = Instance.new("Vector3Value")
- o204 = Instance.new("Vector3Value")
- o206 = Instance.new("Vector3Value")
- o208 = Instance.new("Vector3Value")
- o210 = Instance.new("Vector3Value")
- o212 = Instance.new("Vector3Value")
- o214 = Instance.new("Motor6D")
- o215 = Instance.new("Vector3Value")
- o217 = Instance.new("Vector3Value")
- o219 = Instance.new("Vector3Value")
- o221 = Instance.new("Vector3Value")
- o223 = Instance.new("Motor6D")
- o224 = Instance.new("Vector3Value")
- o226 = Instance.new("Vector3Value")
- o228 = Instance.new("Vector3Value")
- o230 = Instance.new("Motor6D")
- o231 = Instance.new("Vector3Value")
- o233 = Instance.new("Vector3Value")
- o235 = Instance.new("Vector3Value")
- o237 = Instance.new("Motor6D")
- o238 = Instance.new("Vector3Value")
- o240 = Instance.new("Vector3Value")
- o242 = Instance.new("Vector3Value")
- o244 = Instance.new("Vector3Value")
- o246 = Instance.new("Motor6D")
- o247 = Instance.new("Vector3Value")
- o249 = Instance.new("Vector3Value")
- o251 = Instance.new("Vector3Value")
- o253 = Instance.new("Motor6D")
- o254 = Instance.new("Vector3Value")
- o256 = Instance.new("Vector3Value")
- o258 = Instance.new("Vector3Value")
- o259 = Instance.new("Part")
- o260 = Instance.new("Vector3Value")
- o262 = Instance.new("Vector3Value")
- o263 = Instance.new("Shirt")
- o264 = Instance.new("Pants")
- o265 = Instance.new("Part")
- o266 = Instance.new("SpecialMesh")
- o267 = Instance.new("Script")
- o268 = Instance.new("Vector3Value")
- o269 = Instance.new("Decal")
- o1.Name = "Zombie Pigman [R15] Simon3676"
- o1.Parent = mas
- o1.PrimaryPart = o259
- o2.Name = "Fake Arm"
- o2.Parent = o1
- o2.BrickColor = BrickColor.new("Medium red")
- o2.Position = Vector3.new(-143.200302, 3.5000124, -94.6897202)
- o2.Rotation = Vector3.new(0, -90, 0)
- o2.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o2.CanCollide = false
- o2.Size = Vector3.new(1, 1, 1)
- o2.CFrame = CFrame.new(-143.200302, 3.5000124, -94.6897202, -1.17795313e-13, 7.92996531e-08, -1, -3.67371271e-08, 1, -7.92996531e-08, 1, -3.67371271e-08, 1.17697003e-13)
- o2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.RightSurface = Enum.SurfaceType.Weld
- o2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o2.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o2.Position = Vector3.new(-143.200302, 3.5000124, -94.6897202)
- o2.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o3.Name = "OriginalSize"
- o3.Parent = o2
- o3.Value = Vector3.new(1, 1, 1)
- o4.Name = "Fake Arm"
- o4.Parent = o1
- o4.BrickColor = BrickColor.new("Medium red")
- o4.Position = Vector3.new(-140.199936, 3.50000381, -94.6897202)
- o4.Rotation = Vector3.new(0, -90, 0)
- o4.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o4.CanCollide = false
- o4.Size = Vector3.new(1, 1, 1)
- o4.CFrame = CFrame.new(-140.199936, 3.50000381, -94.6897202, -6.85475982e-14, 4.68588901e-08, -1, -2.17082992e-08, 1, -4.68588901e-08, 1, -2.17082992e-08, 6.85475982e-14)
- o4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o4.RightSurface = Enum.SurfaceType.Weld
- o4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o4.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o4.Position = Vector3.new(-140.199936, 3.50000381, -94.6897202)
- o4.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o5.Name = "OriginalSize"
- o5.Parent = o4
- o5.Value = Vector3.new(1, 1, 1)
- o6.Name = "Fake Arm"
- o6.Parent = o1
- o6.BrickColor = BrickColor.new("Medium red")
- o6.Position = Vector3.new(-140.199875, 3.50000381, -93.6896591)
- o6.Rotation = Vector3.new(0, 90, 0)
- o6.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o6.CanCollide = false
- o6.Size = Vector3.new(1, 1, 1)
- o6.CFrame = CFrame.new(-140.199875, 3.50000381, -93.6896591, 2.62440792e-14, 1.802265e-08, 1, 8.3493461e-09, 1, 1.802265e-08, -1, -8.3493461e-09, -2.62440792e-14)
- o6.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o6.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o6.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o6.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o6.RightSurface = Enum.SurfaceType.Weld
- o6.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o6.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o6.Position = Vector3.new(-140.199875, 3.50000381, -93.6896591)
- o6.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o7.Name = "OriginalSize"
- o7.Parent = o6
- o7.Value = Vector3.new(1, 1, 1)
- o8.Parent = o6
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onTouched(part)
- local h = part.Parent:findFirstChild("Humanoid")
- if h~=nil then
- h.Health = h.Health - 1
- end
- end
- script.Parent.Touched:connect(onTouched)
- end,o8)
- end))
- o9.Name = "Fake Arm"
- o9.Parent = o1
- o9.BrickColor = BrickColor.new("Medium red")
- o9.Position = Vector3.new(-143.199875, 3.50000858, -93.6896591)
- o9.Rotation = Vector3.new(0, 90, 0)
- o9.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o9.CanCollide = false
- o9.Size = Vector3.new(1, 1, 1)
- o9.CFrame = CFrame.new(-143.199875, 3.50000858, -93.6896591, 4.24941285e-14, 2.88362401e-08, 1, 1.33589548e-08, 1, 2.88362365e-08, -1, -1.33589548e-08, -4.2395815e-14)
- o9.BackSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.RightSurface = Enum.SurfaceType.Weld
- o9.TopSurface = Enum.SurfaceType.SmoothNoOutlines
- o9.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o9.Position = Vector3.new(-143.199875, 3.50000858, -93.6896591)
- o9.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o10.Parent = o9
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onTouched(part)
- local h = part.Parent:findFirstChild("Humanoid")
- if h~=nil then
- h.Health = h.Health - 1
- end
- end
- script.Parent.Touched:connect(onTouched)
- end,o10)
- end))
- o11.Name = "OriginalSize"
- o11.Parent = o9
- o11.Value = Vector3.new(1, 1, 1)
- o12.Name = "AI"
- o12.Parent = o1
- o13.Name = "WeaponFiring"
- o13.Parent = o12
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local target = script.Parent:WaitForChild("Target")
- local torso = script.Parent.Parent:WaitForChild("Torso")
- local down = script.Parent:WaitForChild("MouseDown")
- function handler(new)
- if target.Value then
- while target.Value == new do
- if target.Value and target.Value.Parent == nil then
- target.Value = nil
- return
- end
- local look = (new.Torso.Position-torso.Position).unit * 300
- local hit = workspace:FindPartOnRayWithIgnoreList(Ray.new(torso.Position,look),{script.Parent.Parent,new.Parent})
- if not hit or (new.Torso.Position-torso.Position).magnitude < 10 then
- down:Fire(new.Torso.Position)
- end
- wait(0.2)
- end
- end
- end
- target.Changed:connect(handler)
- if target.Value then
- handler(target.Value)
- end
- end,o13)
- end))
- o14.Name = "Target"
- o14.Parent = o12
- o15.Name = "MouseDown"
- o15.Parent = o12
- o16.Name = "Pathfinding"
- o16.Parent = o12
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- debugMode = false
- targetNPCs = false
- --
- h = script.Parent.Parent:WaitForChild("Humanoid")
- pathService = game:GetService("PathfindingService")
- targetV = script.Parent:WaitForChild("Target")
- function closestTargetAndPath()
- local humanoids = {}
- if targetNPCs then
- local function recurse(o)
- for _,obj in pairs(o:GetChildren()) do
- if obj:IsA("Model") then
- if obj:findFirstChild("Humanoid") and obj:findFirstChild("Torso") and obj.Humanoid ~= h and obj.Humanoid.Health > 0 and not obj:findFirstChild("ForceField") then
- table.insert(humanoids,obj.Humanoid)
- end
- end
- recurse(obj)
- end
- end
- recurse(workspace)
- else
- for _,v in pairs(game.Players:GetPlayers()) do
- if v.Character and v.Character:findFirstChild("HumanoidRootPart") and v.Character:findFirstChild("Humanoid") and v.Character.Humanoid.Health > 0 and not v:findFirstChild("ForceField") then
- table.insert(humanoids,v.Character.Humanoid)
- end
- end
- end
- local closest,path,dist
- for _,humanoid in pairs(humanoids) do
- local myPath = pathService:ComputeRawPathAsync(h.Torso.Position,humanoid.Torso.Position,500)
- if myPath.Status ~= Enum.PathStatus.FailFinishNotEmpty then
- -- Now that we have a successful path, we need to figure out how far we need to actually travel to reach this point.
- local myDist = 0
- local previous = h.Torso.Position
- for _,point in pairs(myPath:GetPointCoordinates()) do
- myDist = myDist + (point-previous).magnitude
- previous = point
- end
- if not dist or myDist < dist then -- if true, this is the closest path so far.
- closest = humanoid
- path = myPath
- dist = myDist
- end
- end
- end
- return closest,path
- end
- function goToPos(loc)
- h:MoveTo(loc)
- local distance = (loc-h.Torso.Position).magnitude
- local start = tick()
- while distance > 4 do
- if tick()-start > distance/h.WalkSpeed then -- Something may have gone wrong. Just break.
- break
- end
- distance = (loc-h.Torso.Position).magnitude
- wait()
- end
- end
- while wait() do
- local target,path = closestTargetAndPath()
- local didBreak = false
- local targetStart
- if target and h.Torso then
- targetV.Value = target
- targetStart = target.Torso.Position
- roaming = false
- local previous = h.Torso.Position
- local points = path:GetPointCoordinates()
- local s = #points > 1 and 2 or 1
- for i = s,#points do
- local point = points[i]
- if didBreak then
- break
- end
- if target and target.Torso and target.Health > 0 then
- if (target.Torso.Position-targetStart).magnitude < 1.5 then
- local pos = previous:lerp(point,.5)
- local moveDir = ((pos - h.Torso.Position).unit * 2)
- goToPos(previous:lerp(point,.5))
- previous = point
- end
- else
- didBreak = true
- break
- end
- end
- else
- targetV.Value = nil
- end
- if not didBreak and targetStart then
- goToPos(targetStart)
- end
- end
- end,o16)
- end))
- o17.Name = "R15 Ragdoller"
- o17.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(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,o17)
- end))
- o18.Name = "Respawn"
- o18.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- name="Humanoid"
- robo=script.Parent:clone()
- while true do
- wait(5)
- if script.Parent.Humanoid.Health<1 then
- robot=robo:clone()
- robot.Parent=script.Parent.Parent
- robot:makeJoints()
- script.Parent:remove()
- end
- end
- end,o18)
- end))
- o19.Name = "DebugPathDraw"
- o19.Parent = o1
- o20.Name = "Animate"
- o20.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(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,o20)
- end))
- o21.Name = "wave"
- o21.Parent = o20
- o22.Name = "WaveAnim"
- o22.Parent = o21
- o22.AnimationId = "http://www.roblox.com/asset/?id=507770239"
- o23.Name = "walk"
- o23.Parent = o20
- o24.Name = "WalkAnim"
- o24.Parent = o23
- o24.AnimationId = "http://www.roblox.com/asset/?id=845403856"
- o25.Name = "toolslash"
- o25.Parent = o20
- o26.Name = "ToolSlashAnim"
- o26.Parent = o25
- o26.AnimationId = "http://www.roblox.com/asset/?id=522635514"
- o27.Name = "toolnone"
- o27.Parent = o20
- o28.Name = "ToolNoneAnim"
- o28.Parent = o27
- o28.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- o29.Name = "toollunge"
- o29.Parent = o20
- o30.Name = "ToolLungeAnim"
- o30.Parent = o29
- o30.AnimationId = "http://www.roblox.com/asset/?id=522638767"
- o31.Name = "swimidle"
- o31.Parent = o20
- o32.Name = "SwimIdle"
- o32.Parent = o31
- o32.AnimationId = "http://www.roblox.com/asset/?id=845403127"
- o33.Name = "swim"
- o33.Parent = o20
- o34.Name = "Swim"
- o34.Parent = o33
- o34.AnimationId = "http://www.roblox.com/asset/?id=845401742"
- o35.Name = "sit"
- o35.Parent = o20
- o36.Name = "SitAnim"
- o36.Parent = o35
- o36.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- o37.Name = "run"
- o37.Parent = o20
- o38.Name = "RunAnim"
- o38.Parent = o37
- o38.AnimationId = "http://www.roblox.com/asset/?id=845386501"
- o39.Name = "point"
- o39.Parent = o20
- o40.Name = "PointAnim"
- o40.Parent = o39
- o40.AnimationId = "http://www.roblox.com/asset/?id=507770453"
- o41.Name = "laugh"
- o41.Parent = o20
- o42.Name = "LaughAnim"
- o42.Parent = o41
- o42.AnimationId = "http://www.roblox.com/asset/?id=507770818"
- o43.Name = "jump"
- o43.Parent = o20
- o44.Name = "!ID!"
- o44.Parent = o43
- o44.AnimationId = "http://www.roblox.com/asset/?id=845398858"
- o45.Name = "idle"
- o45.Parent = o20
- o46.Name = "WaveAnim"
- o46.Parent = o45
- o46.AnimationId = "http://www.roblox.com/asset/?id=507770239"
- o47.Name = "Weight"
- o47.Parent = o46
- o47.Value = 1
- o48.Name = "PointAnim"
- o48.Parent = o45
- o48.AnimationId = "http://www.roblox.com/asset/?id=507770453"
- o49.Name = "Weight"
- o49.Parent = o48
- o49.Value = 1
- o50.Name = "CheerAnim"
- o50.Parent = o45
- o50.AnimationId = "http://www.roblox.com/asset/?id=507770677"
- o51.Name = "Weight"
- o51.Parent = o50
- o51.Value = 1
- o52.Name = "Animation2"
- o52.Parent = o45
- o52.AnimationId = "http://www.roblox.com/asset/?id=845400520"
- o53.Name = "Weight"
- o53.Parent = o52
- o53.Value = 1
- o54.Name = "Animation1"
- o54.Parent = o45
- o54.AnimationId = "http://www.roblox.com/asset/?id=845397899"
- o55.Name = "Weight"
- o55.Parent = o54
- o55.Value = 9
- o56.Name = "fall"
- o56.Parent = o20
- o57.Name = "FallAnim"
- o57.Parent = o56
- o57.AnimationId = "http://www.roblox.com/asset/?id=845396048"
- o58.Name = "dance3"
- o58.Parent = o20
- o59.Name = "Animation3"
- o59.Parent = o58
- o59.AnimationId = "http://www.roblox.com/asset/?id=507777623"
- o60.Name = "Weight"
- o60.Parent = o59
- o60.Value = 10
- o61.Name = "Animation2"
- o61.Parent = o58
- o61.AnimationId = "http://www.roblox.com/asset/?id=507777451"
- o62.Name = "Weight"
- o62.Parent = o61
- o62.Value = 10
- o63.Name = "Animation1"
- o63.Parent = o58
- o63.AnimationId = "http://www.roblox.com/asset/?id=507777268"
- o64.Name = "Weight"
- o64.Parent = o63
- o64.Value = 10
- o65.Name = "dance2"
- o65.Parent = o20
- o66.Name = "Animation3"
- o66.Parent = o65
- o66.AnimationId = "http://www.roblox.com/asset/?id=507776879"
- o67.Name = "Weight"
- o67.Parent = o66
- o67.Value = 10
- o68.Name = "Animation2"
- o68.Parent = o65
- o68.AnimationId = "http://www.roblox.com/asset/?id=507776720"
- o69.Name = "Weight"
- o69.Parent = o68
- o69.Value = 10
- o70.Name = "Animation1"
- o70.Parent = o65
- o70.AnimationId = "http://www.roblox.com/asset/?id=507776043"
- o71.Name = "Weight"
- o71.Parent = o70
- o71.Value = 10
- o72.Name = "dance"
- o72.Parent = o20
- o73.Name = "Animation3"
- o73.Parent = o72
- o73.AnimationId = "http://www.roblox.com/asset/?id=507772104"
- o74.Name = "Weight"
- o74.Parent = o73
- o74.Value = 10
- o75.Name = "Animation2"
- o75.Parent = o72
- o75.AnimationId = "http://www.roblox.com/asset/?id=507771955"
- o76.Name = "Weight"
- o76.Parent = o75
- o76.Value = 10
- o77.Name = "Animation1"
- o77.Parent = o72
- o77.AnimationId = "http://www.roblox.com/asset/?id=507771019"
- o78.Name = "Weight"
- o78.Parent = o77
- o78.Value = 10
- o79.Name = "climb"
- o79.Parent = o20
- o80.Name = "ClimbAnim"
- o80.Parent = o79
- o80.AnimationId = "http://www.roblox.com/asset/?id=845392038"
- o81.Name = "cheer"
- o81.Parent = o20
- o82.Name = "CheerAnim"
- o82.Parent = o81
- o82.AnimationId = "http://www.roblox.com/asset/?id=507770677"
- o83.Parent = o1
- o83.BrickColor = BrickColor.new("Medium red")
- o83.Position = Vector3.new(-141.699875, 5.50001335, -94.6899338)
- o83.Rotation = Vector3.new(-180, 0, -180)
- o83.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o83.Size = Vector3.new(1.99999988, 1, 1)
- o83.CFrame = CFrame.new(-141.699875, 5.50001335, -94.6899338, -1, 1.802265e-08, 2.62440792e-14, -1.802265e-08, 1, 8.3493461e-09, 2.62440792e-14, -8.3493461e-09, -1)
- o83.BottomSurface = Enum.SurfaceType.Weld
- o83.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o83.Position = Vector3.new(-141.699875, 5.50001335, -94.6899338)
- o83.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o84.Parent = o83
- o84.Offset = Vector3.new(0, -0.800000012, 0)
- o84.Scale = Vector3.new(0.800000012, 1.60000002, 1.60000002)
- o85.Parent = o83
- o85.Texture = "http://www.roblox.com/asset/?id=46658894"
- o85.Face = Enum.NormalId.Right
- o86.Parent = o83
- o86.Texture = "http://www.roblox.com/asset/?id=46658894"
- o86.Face = Enum.NormalId.Top
- o87.Parent = o83
- o87.Texture = "http://www.roblox.com/asset/?id=46658862"
- o87.Face = Enum.NormalId.Left
- o88.Parent = o83
- o88.Texture = "http://www.roblox.com/asset/?id=46659296"
- o88.Face = Enum.NormalId.Bottom
- o89.Parent = o83
- o89.Texture = "http://www.roblox.com/asset/?id=46658950"
- o89.Face = Enum.NormalId.Back
- o90.Parent = o83
- o90.Texture = "http://www.roblox.com/asset/?id=46658714"
- o91.Name = "OriginalSize"
- o91.Parent = o83
- o91.Value = Vector3.new(1.99999988, 1, 1)
- o92.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(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
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- 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 and (tool.RequiresHandle or tool:FindFirstChild("Handle")) 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
- --Game.Players.LocalPlayer.Chatted:connect(function(msg)
- -- 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,o92)
- end))
- o93.Name = "walk"
- o93.Parent = o92
- o94.Name = "RunAnim"
- o94.Parent = o93
- o94.AnimationId = "http://www.roblox.com/asset/?id=507777826"
- o95.Name = "toolnone"
- o95.Parent = o92
- o96.Name = "ToolNoneAnim"
- o96.Parent = o95
- o96.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- o97.Name = "swimidle"
- o97.Parent = o92
- o98.Name = "SwimIdle"
- o98.Parent = o97
- o98.AnimationId = "http://www.roblox.com/asset/?id=481825862"
- o99.Name = "swim"
- o99.Parent = o92
- o100.Name = "Swim"
- o100.Parent = o99
- o100.AnimationId = "http://www.roblox.com/asset/?id=507784897"
- o101.Name = "sit"
- o101.Parent = o92
- o102.Name = "SitAnim"
- o102.Parent = o101
- o102.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- o103.Name = "run"
- o103.Parent = o92
- o104.Name = "RunAnim"
- o104.Parent = o103
- o104.AnimationId = "http://www.roblox.com/asset/?id=5077677142"
- o105.Name = "jump"
- o105.Parent = o92
- o106.Name = "JumpAnim"
- o106.Parent = o105
- o106.AnimationId = "http://www.roblox.com/asset/?id=507765000"
- o107.Name = "idle"
- o107.Parent = o92
- o108.Name = "Animation2"
- o108.Parent = o107
- o108.AnimationId = "http://www.roblox.com/asset/?id=507766666"
- o109.Name = "Weight"
- o109.Parent = o108
- o109.Value = 1
- o110.Name = "Animation1"
- o110.Parent = o107
- o110.AnimationId = "http://www.roblox.com/asset/?id=507766388"
- o111.Name = "Weight"
- o111.Parent = o110
- o111.Value = 9
- o112.Name = "fall"
- o112.Parent = o92
- o113.Name = "FallAnim"
- o113.Parent = o112
- o113.AnimationId = "http://www.roblox.com/asset/?id=507767968"
- o114.Name = "climb"
- o114.Parent = o92
- o115.Name = "ClimbAnim"
- o115.Parent = o114
- o115.AnimationId = "http://www.roblox.com/asset/?id=507765644"
- o116.Name = "Head"
- o116.Parent = o1
- o116.BrickColor = BrickColor.new("Medium red")
- o116.Transparency = 1
- o116.Position = Vector3.new(-141.699875, 4.50001431, -94.6899338)
- o116.Rotation = Vector3.new(-180, 0, -180)
- o116.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o116.Size = Vector3.new(2, 1, 1)
- o116.CFrame = CFrame.new(-141.699875, 4.50001431, -94.6899338, -1, 3.60453001e-09, 5.23677781e-15, -3.60453001e-09, 1, 1.66986913e-09, 5.23677781e-15, -1.66986913e-09, -1)
- o116.BottomSurface = Enum.SurfaceType.Smooth
- o116.TopSurface = Enum.SurfaceType.Smooth
- o116.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o116.Position = Vector3.new(-141.699875, 4.50001431, -94.6899338)
- o116.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o117.Name = "Neck"
- o117.Parent = o116
- o117.C0 = CFrame.new(-5.96046448e-08, 0.800001502, 1.19209304e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o117.C1 = CFrame.new(-0, -0.500000119, -0.000272244215, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o117.Part0 = mas
- o117.Part1 = o116
- o118.Name = "OriginalSize"
- o118.Parent = o116
- o118.Value = Vector3.new(2, 1, 1)
- o120.Name = "OriginalPosition"
- o120.Parent = mas
- o120.Value = Vector3.new(-0, -0.500000119, -0.000272244215)
- o122.Name = "OriginalPosition"
- o122.Parent = mas
- o122.Value = Vector3.new(8.65851391e-09, 0.599999905, -0.000272244215)
- o124.Name = "OriginalPosition"
- o124.Parent = mas
- o124.Value = Vector3.new(8.65851391e-09, 0.599999905, -0.000272244215)
- o126.Name = "OriginalPosition"
- o126.Parent = mas
- o126.Value = Vector3.new(3.93568822e-09, 0, -0.600272298)
- o128.Name = "OriginalPosition"
- o128.Parent = mas
- o128.Value = Vector3.new(3.93568822e-09, 0, -0.000272244215)
- o129.Parent = o1
- o129.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- o129.Torso = o259
- o129.Health = 200
- o129.MaxHealth = 200
- o129.WalkSpeed = 10
- o130.Name = "HeadScale"
- o130.Parent = o129
- o130.Value = 1
- o131.Name = "Despawn"
- o131.Parent = o129
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local tn = script.Parent.Parent;
- script.Parent.Died:connect(function()
- wait(10)
- tn:remove()
- end)
- end,o131)
- end))
- o132.Name = "BodyWidthScale"
- o132.Parent = o129
- o132.Value = 1
- o133.Name = "BodyHeightScale"
- o133.Parent = o129
- o133.Value = 1
- o134.Name = "BodyDepthScale"
- o134.Parent = o129
- o134.Value = 1
- o138.Name = "Root"
- o138.Parent = mas
- o138.C1 = CFrame.new(-1.1920946e-07, 0.150000036, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o138.Part0 = o259
- o138.Part1 = mas
- o139.Name = "OriginalSize"
- o139.Parent = mas
- o139.Value = Vector3.new(1.99999976, 0.399999976, 1.00000012)
- o141.Name = "OriginalPosition"
- o141.Parent = mas
- o141.Value = Vector3.new(0, -0.200000018, 0.50000006)
- o143.Name = "OriginalPosition"
- o143.Parent = mas
- o143.Value = Vector3.new(0, -0.200000018, -0.50000006)
- o145.Name = "OriginalPosition"
- o145.Parent = mas
- o145.Value = Vector3.new(0, -0.200000018, 0)
- o147.Name = "OriginalPosition"
- o147.Parent = mas
- o147.Value = Vector3.new(0.500000477, -0.199999973, -0)
- o149.Name = "OriginalPosition"
- o149.Parent = mas
- o149.Value = Vector3.new(-0.500000775, -0.199999973, -0)
- o151.Name = "OriginalPosition"
- o151.Parent = mas
- o151.Value = Vector3.new(-1.1920946e-07, 0.550000072, 7.64462615e-20)
- o153.Name = "OriginalPosition"
- o153.Parent = mas
- o153.Value = Vector3.new(-1.1920946e-07, 0.150000036, -0)
- o155.Name = "RightHip"
- o155.Parent = mas
- o155.C0 = CFrame.new(0.500000477, -0.199999973, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o155.C1 = CFrame.new(-0, 0.500001431, -1.04308256e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o155.Part0 = mas
- o155.Part1 = mas
- o156.Name = "OriginalSize"
- o156.Parent = mas
- o156.Value = Vector3.new(1.00000048, 1.49999976, 0.999999881)
- o158.Name = "OriginalPosition"
- o158.Parent = mas
- o158.Value = Vector3.new(-0, -0.300000697, 4.36005757e-05)
- o160.Name = "OriginalPosition"
- o160.Parent = mas
- o160.Value = Vector3.new(-0, 0.500001431, -1.04308256e-07)
- o162.Name = "RightKnee"
- o162.Parent = mas
- o162.C0 = CFrame.new(-0, -0.300000697, 4.36005757e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o162.C1 = CFrame.new(-0, 0.249999642, 4.35260117e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o162.Part0 = mas
- o162.Part1 = mas
- o163.Name = "OriginalSize"
- o163.Parent = mas
- o163.Value = Vector3.new(0.99999994, 1.50000036, 1.00000012)
- o165.Name = "OriginalPosition"
- o165.Parent = mas
- o165.Value = Vector3.new(-0, -0.750000477, 9.82746424e-05)
- o167.Name = "OriginalPosition"
- o167.Parent = mas
- o167.Value = Vector3.new(-0, 0.249999642, 4.35260117e-05)
- o169.Name = "RightAnkle"
- o169.Parent = mas
- o169.C0 = CFrame.new(-0, -0.750000477, 9.82746424e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o169.C1 = CFrame.new(-0, 0.0499997139, 9.8453449e-05, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o169.Part0 = mas
- o169.Part1 = mas
- o170.Name = "OriginalSize"
- o170.Parent = mas
- o170.Value = Vector3.new(0.99999994, 0.300000191, 1)
- o172.Name = "OriginalPosition"
- o172.Parent = mas
- o172.Value = Vector3.new(-0, 0.0499997139, 9.8453449e-05)
- o174.Name = "LeftHip"
- o174.Parent = mas
- o174.C0 = CFrame.new(-0.500000775, -0.199999973, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o174.C1 = CFrame.new(5.96046448e-08, 0.500001431, -1.63913029e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o174.Part0 = mas
- o174.Part1 = mas
- o175.Name = "OriginalSize"
- o175.Parent = mas
- o175.Value = Vector3.new(1.00000036, 1.49999976, 0.999999881)
- o177.Name = "OriginalPosition"
- o177.Parent = mas
- o177.Value = Vector3.new(5.96046448e-08, -0.300000697, -1.63913029e-07)
- o179.Name = "OriginalPosition"
- o179.Parent = mas
- o179.Value = Vector3.new(5.96046448e-08, 0.500001431, -1.63913029e-07)
- o181.Name = "LeftKnee"
- o181.Parent = mas
- o181.C0 = CFrame.new(5.96046448e-08, -0.300000697, -1.63913029e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o181.C1 = CFrame.new(-0, 0.249999642, -1.78813934e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o181.Part0 = mas
- o181.Part1 = mas
- o182.Name = "OriginalSize"
- o182.Parent = mas
- o182.Value = Vector3.new(0.99999994, 1.50000036, 1.00000012)
- o184.Name = "OriginalPosition"
- o184.Parent = mas
- o184.Value = Vector3.new(-1.78813934e-07, -0.749997616, 6.29340548e-07)
- o186.Name = "OriginalPosition"
- o186.Parent = mas
- o186.Value = Vector3.new(-0, 0.249999642, -1.78813934e-07)
- o188.Name = "LeftAnkle"
- o188.Parent = mas
- o188.C0 = CFrame.new(-1.78813934e-07, -0.749997616, 6.29340548e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o188.C1 = CFrame.new(-2.38418579e-07, 0.0500025749, 8.08154539e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o188.Part0 = mas
- o188.Part1 = mas
- o189.Name = "OriginalSize"
- o189.Parent = mas
- o189.Value = Vector3.new(1, 0.300000191, 1)
- o191.Name = "OriginalPosition"
- o191.Parent = mas
- o191.Value = Vector3.new(-2.38418579e-07, 0.0500025749, 8.08154539e-07)
- o193.Name = "Waist"
- o193.Parent = mas
- o193.C0 = CFrame.new(-1.1920946e-07, 0.550000072, 7.64462615e-20, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o193.C1 = CFrame.new(-5.96046448e-08, -0.450000763, 1.19209304e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o193.Part0 = mas
- o193.Part1 = mas
- o194.Name = "OriginalSize"
- o194.Parent = mas
- o194.Value = Vector3.new(2, 1.60000014, 1.00000036)
- o196.Name = "OriginalPosition"
- o196.Parent = mas
- o196.Value = Vector3.new(0, 0.800001562, 0)
- o198.Name = "OriginalPosition"
- o198.Parent = mas
- o198.Value = Vector3.new(0.999999881, 0.800001502, 4.61296032e-08)
- o200.Name = "OriginalPosition"
- o200.Parent = mas
- o200.Value = Vector3.new(-0.999999762, 0.80000174, -7.27397449e-08)
- o202.Name = "OriginalPosition"
- o202.Parent = mas
- o202.Value = Vector3.new(-5.96046448e-08, -0.200000435, 0.50000006)
- o204.Name = "OriginalPosition"
- o204.Parent = mas
- o204.Value = Vector3.new(-5.96046448e-08, -0.200000435, -0.499999881)
- o206.Name = "OriginalPosition"
- o206.Parent = mas
- o206.Value = Vector3.new(1.24998033, 0.550001383, 1.19209304e-07)
- o208.Name = "OriginalPosition"
- o208.Parent = mas
- o208.Value = Vector3.new(-1.24989128, 0.550001383, 1.19209304e-07)
- o210.Name = "OriginalPosition"
- o210.Parent = mas
- o210.Value = Vector3.new(-5.96046448e-08, 0.800001502, 1.19209304e-07)
- o212.Name = "OriginalPosition"
- o212.Parent = mas
- o212.Value = Vector3.new(-5.96046448e-08, -0.450000763, 1.19209304e-07)
- o214.Name = "RightShoulder"
- o214.Parent = mas
- o214.C0 = CFrame.new(1.24998033, 0.550001383, 1.19209304e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o214.C1 = CFrame.new(-0.250020057, 0.450000584, 8.94069672e-08, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o214.Part0 = mas
- o214.Part1 = mas
- o215.Name = "OriginalSize"
- o215.Parent = mas
- o215.Value = Vector3.new(0.999999642, 1.40000033, 0.99999994)
- o217.Name = "OriginalPosition"
- o217.Parent = mas
- o217.Value = Vector3.new(-9.53673634e-07, 0.700001776, -2.70968332e-08)
- o219.Name = "OriginalPosition"
- o219.Parent = mas
- o219.Value = Vector3.new(-5.96046107e-07, -0.200000554, 8.94069672e-08)
- o221.Name = "OriginalPosition"
- o221.Parent = mas
- o221.Value = Vector3.new(-0.250020057, 0.450000584, 8.94069672e-08)
- o223.Name = "RightElbow"
- o223.Parent = mas
- o223.C0 = CFrame.new(-5.96046107e-07, -0.200000554, 8.94069672e-08, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o223.C1 = CFrame.new(1.1920929e-07, 0.25000006, 7.64462615e-20, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o223.Part0 = mas
- o223.Part1 = mas
- o224.Name = "OriginalSize"
- o224.Parent = mas
- o224.Value = Vector3.new(0.999999762, 1.20000029, 1)
- o226.Name = "OriginalPosition"
- o226.Parent = mas
- o226.Value = Vector3.new(1.1920929e-07, -0.549999952, -6.86244794e-18)
- o228.Name = "OriginalPosition"
- o228.Parent = mas
- o228.Value = Vector3.new(1.1920929e-07, 0.25000006, 7.64462615e-20)
- o230.Name = "RightWrist"
- o230.Parent = mas
- o230.C0 = CFrame.new(1.1920929e-07, -0.549999952, -6.86244794e-18, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o230.C1 = CFrame.new(3.57628267e-07, 0.150000006, 5.96047656e-08, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o230.Part0 = mas
- o230.Part1 = mas
- o231.Name = "OriginalSize"
- o231.Parent = mas
- o231.Value = Vector3.new(0.999999881, 0.299999982, 0.999999881)
- o233.Name = "OriginalPosition"
- o233.Parent = mas
- o233.Value = Vector3.new(0, -0.149999648, -1.46306377e-07)
- o235.Name = "OriginalPosition"
- o235.Parent = mas
- o235.Value = Vector3.new(3.57628267e-07, 0.150000006, 5.96047656e-08)
- o237.Name = "LeftShoulder"
- o237.Parent = mas
- o237.C0 = CFrame.new(-1.24989128, 0.550001383, 1.19209304e-07, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o237.C1 = CFrame.new(0.250109166, 0.450000584, 8.94069672e-08, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o237.Part0 = mas
- o237.Part1 = mas
- o238.Name = "OriginalSize"
- o238.Parent = mas
- o238.Value = Vector3.new(0.999999762, 1.40000033, 0.99999994)
- o240.Name = "OriginalPosition"
- o240.Parent = mas
- o240.Value = Vector3.new(2.38418579e-07, 0.700001776, -2.70968332e-08)
- o242.Name = "OriginalPosition"
- o242.Parent = mas
- o242.Value = Vector3.new(0.000479102135, -0.200000554, 8.94069672e-08)
- o244.Name = "OriginalPosition"
- o244.Parent = mas
- o244.Value = Vector3.new(0.250109166, 0.450000584, 8.94069672e-08)
- o246.Name = "LeftElbow"
- o246.Parent = mas
- o246.C0 = CFrame.new(0.000479102135, -0.200000554, 8.94069672e-08, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o246.C1 = CFrame.new(0.00047850603, 0.25000006, 7.64462615e-20, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o246.Part0 = mas
- o246.Part1 = mas
- o247.Name = "OriginalSize"
- o247.Parent = mas
- o247.Value = Vector3.new(0.999999762, 1.20000029, 1)
- o249.Name = "OriginalPosition"
- o249.Parent = mas
- o249.Value = Vector3.new(0.00047850603, -0.549999952, 7.64462615e-20)
- o251.Name = "OriginalPosition"
- o251.Parent = mas
- o251.Value = Vector3.new(0.00047850603, 0.25000006, 7.64462615e-20)
- o253.Name = "LeftWrist"
- o253.Parent = mas
- o253.C0 = CFrame.new(0.00047850603, -0.549999952, 7.64462615e-20, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o253.C1 = CFrame.new(0.000478863687, 0.150000006, 5.96047656e-08, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o253.Part0 = mas
- o253.Part1 = mas
- o254.Name = "OriginalSize"
- o254.Parent = mas
- o254.Value = Vector3.new(0.999999762, 0.299999982, 0.999999881)
- o256.Name = "OriginalPosition"
- o256.Parent = mas
- o256.Value = Vector3.new(-1.1920929e-07, -0.149999648, -1.46306377e-07)
- o258.Name = "OriginalPosition"
- o258.Parent = mas
- o258.Value = Vector3.new(0.000478863687, 0.150000006, 5.96047656e-08)
- o259.Name = "HumanoidRootPart"
- o259.Parent = o1
- o259.Material = Enum.Material.Marble
- o259.BrickColor = BrickColor.new("Medium red")
- o259.Transparency = 1
- o259.Position = Vector3.new(-141.699875, 2.35001206, -94.6896591)
- o259.Rotation = Vector3.new(-180, 0, -180)
- o259.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o259.Size = Vector3.new(2, 2, 1)
- o259.CFrame = CFrame.new(-141.699875, 2.35001206, -94.6896591, -1, 3.60453001e-09, 5.23677781e-15, -3.60453001e-09, 1, 1.66986913e-09, 5.23677781e-15, -1.66986913e-09, -1)
- o259.Color = Color3.new(0.854902, 0.52549, 0.478431)
- o259.Position = Vector3.new(-141.699875, 2.35001206, -94.6896591)
- o259.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o260.Name = "OriginalSize"
- o260.Parent = o259
- o260.Value = Vector3.new(2, 2, 1)
- o262.Name = "OriginalPosition"
- o262.Parent = mas
- o263.Parent = o1
- o263.ShirtTemplate = "http://www.roblox.com/asset/?ID=46657872"
- o264.Parent = o1
- o264.PantsTemplate = "http://www.roblox.com/asset/?ID=46657911"
- o265.Name = "Golden Sword"
- o265.Parent = o1
- o265.BrickColor = BrickColor.new("Institutional white")
- o265.Position = Vector3.new(-143.224899, 5.00000858, -93.1146469)
- o265.Rotation = Vector3.new(90, 0, 0)
- o265.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o265.CanCollide = false
- o265.FormFactor = Enum.FormFactor.Custom
- o265.Size = Vector3.new(0.25, 0.149999991, 5)
- o265.CFrame = CFrame.new(-143.224899, 5.00000858, -93.1146469, 1, -2.646272e-08, -1.41778443e-07, 3.48435094e-08, -4.34165912e-08, -1, 2.64624589e-08, 1, 3.8407002e-08)
- o265.BottomSurface = Enum.SurfaceType.Weld
- o265.TopSurface = Enum.SurfaceType.Smooth
- o265.Color = Color3.new(0.972549, 0.972549, 0.972549)
- o265.Position = Vector3.new(-143.224899, 5.00000858, -93.1146469)
- o265.Velocity = Vector3.new(-1.40129846e-45, 0, 1.40129846e-45)
- o266.Parent = o265
- o266.MeshId = "http://www.roblox.com/asset/?id=361629844"
- o266.Scale = Vector3.new(4.5, 4.5, 4.5)
- o266.TextureId = "rbxgameasset://Images/Golden Sword (1)"
- o266.MeshType = Enum.MeshType.FileMesh
- o267.Parent = o265
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- function onTouched(part)
- local h = part.Parent:findFirstChild("Humanoid")
- if h~=nil then
- h.Health = h.Health - 3
- end
- end
- script.Parent.Touched:connect(onTouched)
- end,o267)
- end))
- o268.Name = "OriginalSize"
- o268.Parent = o265
- o268.Value = Vector3.new(0.25, 0.149999991, 5)
- o269.Parent = o265
- o269.Texture = "http://www.roblox.com/asset/?id=925962048"
- o269.Face = Enum.NormalId.Top
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- game:GetService("Lighting").Ambient = Color3.new(0.498039, 0.498039, 0.498039)
- game:GetService("Lighting").Brightness = 5
- game:GetService("Lighting").ColorShift_Bottom = Color3.new(1, 1, 1)
- game:GetService("Lighting").ColorShift_Top = Color3.new(1, 1, 1)
- game:GetService("Lighting").GlobalShadows = true
- game:GetService("Lighting").OutdoorAmbient = Color3.new(0.631373, 0.631373, 0.631373)
- game:GetService("Lighting").Outlines = false
- game:GetService("Lighting").GeographicLatitude = 41.733299255371
- game:GetService("Lighting").TimeOfDay = "16:00:00"
- game:GetService("Lighting").FogColor = Color3.new(0, -7.50588, 0)
- game:GetService("Lighting").FogEnd = 1.0000000037683e+14
- game:GetService("Lighting").FogStart = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement