Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Made By Bartus2009_Bro/GabeTheDog
- --Discord: Gabe#2408
- --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")
- Model1 = Instance.new("Model")
- Part2 = Instance.new("Part")
- Part3 = Instance.new("Part")
- Part4 = Instance.new("Part")
- Part5 = Instance.new("Part")
- Part6 = Instance.new("Part")
- Part7 = Instance.new("Part")
- Part8 = Instance.new("Part")
- Part9 = Instance.new("Part")
- Part10 = Instance.new("Part")
- Part11 = Instance.new("Part")
- Part12 = Instance.new("Part")
- Part13 = Instance.new("Part")
- Part14 = Instance.new("Part")
- Part15 = Instance.new("Part")
- Part16 = Instance.new("Part")
- Part17 = Instance.new("Part")
- Attachment18 = Instance.new("Attachment")
- Attachment19 = Instance.new("Attachment")
- Attachment20 = Instance.new("Attachment")
- Attachment21 = Instance.new("Attachment")
- Attachment22 = Instance.new("Attachment")
- Part23 = Instance.new("Part")
- Part24 = Instance.new("Part")
- Part25 = Instance.new("Part")
- Part26 = Instance.new("Part")
- Part27 = Instance.new("Part")
- Part28 = Instance.new("Part")
- Model29 = Instance.new("Model")
- Part30 = Instance.new("Part")
- SpecialMesh31 = Instance.new("SpecialMesh")
- Attachment32 = Instance.new("Attachment")
- Attachment33 = Instance.new("Attachment")
- Attachment34 = Instance.new("Attachment")
- Attachment35 = Instance.new("Attachment")
- Sound36 = Instance.new("Sound")
- RemoteEvent37 = Instance.new("RemoteEvent")
- Sound38 = Instance.new("Sound")
- RemoteEvent39 = Instance.new("RemoteEvent")
- Sound40 = Instance.new("Sound")
- RemoteEvent41 = Instance.new("RemoteEvent")
- Sound42 = Instance.new("Sound")
- RemoteEvent43 = Instance.new("RemoteEvent")
- Sound44 = Instance.new("Sound")
- RemoteEvent45 = Instance.new("RemoteEvent")
- Sound46 = Instance.new("Sound")
- RemoteEvent47 = Instance.new("RemoteEvent")
- Sound48 = Instance.new("Sound")
- RemoteEvent49 = Instance.new("RemoteEvent")
- Sound50 = Instance.new("Sound")
- RemoteEvent51 = Instance.new("RemoteEvent")
- Sound52 = Instance.new("Sound")
- RemoteEvent53 = Instance.new("RemoteEvent")
- Decal54 = Instance.new("Decal")
- Part55 = Instance.new("Part")
- Decal56 = Instance.new("Decal")
- Attachment57 = Instance.new("Attachment")
- Attachment58 = Instance.new("Attachment")
- Attachment59 = Instance.new("Attachment")
- Attachment60 = Instance.new("Attachment")
- Attachment61 = Instance.new("Attachment")
- Attachment62 = Instance.new("Attachment")
- Attachment63 = Instance.new("Attachment")
- Attachment64 = Instance.new("Attachment")
- Motor6D65 = Instance.new("Motor6D")
- Motor6D66 = Instance.new("Motor6D")
- Motor6D67 = Instance.new("Motor6D")
- Motor6D68 = Instance.new("Motor6D")
- Motor6D69 = Instance.new("Motor6D")
- Part70 = Instance.new("Part")
- Attachment71 = Instance.new("Attachment")
- Attachment72 = Instance.new("Attachment")
- Attachment73 = Instance.new("Attachment")
- RopeConstraint74 = Instance.new("RopeConstraint")
- Part75 = Instance.new("Part")
- Attachment76 = Instance.new("Attachment")
- Attachment77 = Instance.new("Attachment")
- Attachment78 = Instance.new("Attachment")
- Attachment79 = Instance.new("Attachment")
- RopeConstraint80 = Instance.new("RopeConstraint")
- Part81 = Instance.new("Part")
- Attachment82 = Instance.new("Attachment")
- Attachment83 = Instance.new("Attachment")
- RopeConstraint84 = Instance.new("RopeConstraint")
- Part85 = Instance.new("Part")
- Attachment86 = Instance.new("Attachment")
- Attachment87 = Instance.new("Attachment")
- RopeConstraint88 = Instance.new("RopeConstraint")
- Humanoid89 = Instance.new("Humanoid")
- Part90 = Instance.new("Part")
- Attachment91 = Instance.new("Attachment")
- Motor6D92 = Instance.new("Motor6D")
- Script93 = Instance.new("Script")
- LocalScript94 = Instance.new("LocalScript")
- Script95 = Instance.new("Script")
- LocalScript96 = Instance.new("LocalScript")
- StringValue97 = Instance.new("StringValue")
- Animation98 = Instance.new("Animation")
- NumberValue99 = Instance.new("NumberValue")
- Animation100 = Instance.new("Animation")
- NumberValue101 = Instance.new("NumberValue")
- StringValue102 = Instance.new("StringValue")
- Animation103 = Instance.new("Animation")
- StringValue104 = Instance.new("StringValue")
- Animation105 = Instance.new("Animation")
- StringValue106 = Instance.new("StringValue")
- Animation107 = Instance.new("Animation")
- StringValue108 = Instance.new("StringValue")
- Animation109 = Instance.new("Animation")
- StringValue110 = Instance.new("StringValue")
- Animation111 = Instance.new("Animation")
- StringValue112 = Instance.new("StringValue")
- Animation113 = Instance.new("Animation")
- StringValue114 = Instance.new("StringValue")
- Animation115 = Instance.new("Animation")
- BodyColors116 = Instance.new("BodyColors")
- ShirtGraphic117 = Instance.new("ShirtGraphic")
- Pants118 = Instance.new("Pants")
- Accessory119 = Instance.new("Accessory")
- Part120 = Instance.new("Part")
- SpecialMesh121 = Instance.new("SpecialMesh")
- Attachment122 = Instance.new("Attachment")
- Vector3Value123 = Instance.new("Vector3Value")
- Weld124 = Instance.new("Weld")
- Accessory125 = Instance.new("Accessory")
- Part126 = Instance.new("Part")
- SpecialMesh127 = Instance.new("SpecialMesh")
- Attachment128 = Instance.new("Attachment")
- Vector3Value129 = Instance.new("Vector3Value")
- Weld130 = Instance.new("Weld")
- Shirt131 = Instance.new("Shirt")
- Accessory132 = Instance.new("Accessory")
- Part133 = Instance.new("Part")
- SpecialMesh134 = Instance.new("SpecialMesh")
- Attachment135 = Instance.new("Attachment")
- Vector3Value136 = Instance.new("Vector3Value")
- Weld137 = Instance.new("Weld")
- Part138 = Instance.new("Part")
- Decal139 = Instance.new("Decal")
- Model0.Name = "Basement"
- Model0.Parent = mas
- Model1.Name = "Basement"
- Model1.Parent = Model0
- Part2.Parent = Model1
- Part2.Anchored = true
- Part2.Size = Vector3.new(17, 1.20000005, 2)
- Part2.CFrame = CFrame.new(-43.5, 18.6000347, -39, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part2.TopSurface = Enum.SurfaceType.Weld
- Part2.Position = Vector3.new(-43.5, 18.6000347, -39)
- Part3.Parent = Model1
- Part3.Anchored = true
- Part3.Size = Vector3.new(67, 16.8000011, 2)
- Part3.CFrame = CFrame.new(-18.5, 9.60002613, -39, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part3.TopSurface = Enum.SurfaceType.Weld
- Part3.Position = Vector3.new(-18.5, 9.60002613, -39)
- Part4.Parent = Model1
- Part4.Anchored = true
- Part4.Size = Vector3.new(15, 14.4000006, 2)
- Part4.CFrame = CFrame.new(-42.5, 8.40002632, -35, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part4.TopSurface = Enum.SurfaceType.Weld
- Part4.Position = Vector3.new(-42.5, 8.40002632, -35)
- Part5.Parent = Model1
- Part5.Anchored = true
- Part5.Size = Vector3.new(15, 15.6000004, 2)
- Part5.CFrame = CFrame.new(-42.5, 9.00002384, -37, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part5.TopSurface = Enum.SurfaceType.Weld
- Part5.Position = Vector3.new(-42.5, 9.00002384, -37)
- Part6.Parent = Model1
- Part6.Anchored = true
- Part6.Size = Vector3.new(15, 13.2000008, 2)
- Part6.CFrame = CFrame.new(-42.5, 7.80002785, -33, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part6.TopSurface = Enum.SurfaceType.Weld
- Part6.Position = Vector3.new(-42.5, 7.80002785, -33)
- Part7.Parent = Model1
- Part7.Anchored = true
- Part7.Size = Vector3.new(15, 12, 2)
- Part7.CFrame = CFrame.new(-42.5, 7.20002556, -31, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part7.TopSurface = Enum.SurfaceType.Weld
- Part7.Position = Vector3.new(-42.5, 7.20002556, -31)
- Part8.Parent = Model1
- Part8.Anchored = true
- Part8.Size = Vector3.new(50, 1.20000005, 20)
- Part8.CFrame = CFrame.new(-10, 18.6000347, -30, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part8.TopSurface = Enum.SurfaceType.Weld
- Part8.Position = Vector3.new(-10, 18.6000347, -30)
- Part9.Parent = Model1
- Part9.Rotation = Vector3.new(0, 90, 0)
- Part9.Anchored = true
- Part9.Size = Vector3.new(18, 1.20000005, 2)
- Part9.CFrame = CFrame.new(-51, 18.6000347, -29, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part9.TopSurface = Enum.SurfaceType.Weld
- Part9.Position = Vector3.new(-51, 18.6000347, -29)
- Part9.Orientation = Vector3.new(0, 90, 0)
- Part10.Parent = Model1
- Part10.Anchored = true
- Part10.Size = Vector3.new(15, 10.8000002, 2)
- Part10.CFrame = CFrame.new(-42.5, 6.60002899, -29, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part10.TopSurface = Enum.SurfaceType.Weld
- Part10.Position = Vector3.new(-42.5, 6.60002899, -29)
- Part11.Parent = Model1
- Part11.Anchored = true
- Part11.Size = Vector3.new(15, 9.60000038, 2)
- Part11.CFrame = CFrame.new(-42.5, 6.00002861, -27, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part11.TopSurface = Enum.SurfaceType.Weld
- Part11.Position = Vector3.new(-42.5, 6.00002861, -27)
- Part12.Parent = Model1
- Part12.Anchored = true
- Part12.Size = Vector3.new(15, 7.20000029, 2)
- Part12.CFrame = CFrame.new(-42.5, 4.80002785, -23, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part12.TopSurface = Enum.SurfaceType.Weld
- Part12.Position = Vector3.new(-42.5, 4.80002785, -23)
- Part13.Parent = Model1
- Part13.Anchored = true
- Part13.Size = Vector3.new(15, 8.40000057, 2)
- Part13.CFrame = CFrame.new(-42.5, 5.40002632, -25, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part13.TopSurface = Enum.SurfaceType.Weld
- Part13.Position = Vector3.new(-42.5, 5.40002632, -25)
- Part14.Parent = Model1
- Part14.Anchored = true
- Part14.Size = Vector3.new(15, 6, 2)
- Part14.CFrame = CFrame.new(-42.5, 4.20002556, -21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part14.TopSurface = Enum.SurfaceType.Weld
- Part14.Position = Vector3.new(-42.5, 4.20002556, -21)
- Part15.Parent = Model1
- Part15.Anchored = true
- Part15.Size = Vector3.new(15, 4.80000019, 2)
- Part15.CFrame = CFrame.new(-42.5, 3.60002804, -19, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part15.TopSurface = Enum.SurfaceType.Weld
- Part15.Position = Vector3.new(-42.5, 3.60002804, -19)
- Part16.Parent = Model1
- Part16.Anchored = true
- Part16.Size = Vector3.new(15, 2.4000001, 2)
- Part16.CFrame = CFrame.new(-42.5, 2.40003014, -15, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part16.TopSurface = Enum.SurfaceType.Weld
- Part16.Position = Vector3.new(-42.5, 2.40003014, -15)
- Part17.Parent = Model1
- Part17.Rotation = Vector3.new(0, 90, 0)
- Part17.Anchored = true
- Part17.Size = Vector3.new(57, 16.8000011, 2)
- Part17.CFrame = CFrame.new(14, 9.60002613, -9.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part17.TopSurface = Enum.SurfaceType.Weld
- Part17.Position = Vector3.new(14, 9.60002613, -9.5)
- Part17.Orientation = Vector3.new(0, 90, 0)
- Attachment18.Name = "Attachment1"
- Attachment18.Parent = Part17
- Attachment18.Rotation = Vector3.new(-0, -15.3948269, 90)
- Attachment18.CFrame = CFrame.new(-7.5, 4.5, -1, 0, -0.964119375, -0.265469074, 1, 0, 0, 0, -0.265469074, 0.964119375)
- Attachment18.Position = Vector3.new(-7.5, 4.5, -1)
- Attachment18.Axis = Vector3.new(0, 1, 0)
- Attachment18.Orientation = Vector3.new(-0, -15.3948269, 90)
- Attachment19.Name = "Attachment1"
- Attachment19.Parent = Part17
- Attachment19.Rotation = Vector3.new(-0, -15.3948269, 90)
- Attachment19.CFrame = CFrame.new(1.5, 4.5, -1, 0, -0.964119375, -0.265469074, 1, 0, 0, 0, -0.265469074, 0.964119375)
- Attachment19.Position = Vector3.new(1.5, 4.5, -1)
- Attachment19.Axis = Vector3.new(0, 1, 0)
- Attachment19.Orientation = Vector3.new(-0, -15.3948269, 90)
- Attachment20.Name = "Attachment1"
- Attachment20.Parent = Part17
- Attachment20.Rotation = Vector3.new(-0, -15.3948269, 90)
- Attachment20.CFrame = CFrame.new(3, 4.5, -1, 0, -0.964119375, -0.265469074, 1, 0, 0, 0, -0.265469074, 0.964119375)
- Attachment20.Position = Vector3.new(3, 4.5, -1)
- Attachment20.Axis = Vector3.new(0, 1, 0)
- Attachment20.Orientation = Vector3.new(-0, -15.3948269, 90)
- Attachment21.Name = "Attachment1"
- Attachment21.Parent = Part17
- Attachment21.Rotation = Vector3.new(-0, -15.3948269, -0)
- Attachment21.CFrame = CFrame.new(3, -4.5, -1, 0.964119375, 0, -0.265469074, 0, 1, 0, 0.265469074, 0, 0.964119375)
- Attachment21.Position = Vector3.new(3, -4.5, -1)
- Attachment21.Axis = Vector3.new(0.964119375, 0, 0.265469074)
- Attachment21.Orientation = Vector3.new(-0, -15.3948269, 0)
- Attachment22.Name = "Attachment1"
- Attachment22.Parent = Part17
- Attachment22.Rotation = Vector3.new(-180, 15.3948269, -180)
- Attachment22.CFrame = CFrame.new(-9, -4.5, -1, -0.964119375, 0, 0.265469074, 0, 1, 0, -0.265469074, 0, -0.964119375)
- Attachment22.Position = Vector3.new(-9, -4.5, -1)
- Attachment22.Axis = Vector3.new(-0.964119375, 0, -0.265469074)
- Attachment22.Orientation = Vector3.new(-0, 164.605164, 0)
- Part23.Parent = Model1
- Part23.Anchored = true
- Part23.Size = Vector3.new(15, 3.60000014, 2)
- Part23.CFrame = CFrame.new(-42.5, 3.00003052, -17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part23.TopSurface = Enum.SurfaceType.Weld
- Part23.Position = Vector3.new(-42.5, 3.00003052, -17)
- Part24.Parent = Model1
- Part24.BrickColor = BrickColor.new("Dark stone grey")
- Part24.Anchored = true
- Part24.Size = Vector3.new(67, 1.20000005, 61)
- Part24.CFrame = CFrame.new(-18.5, 0.600028992, -9.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part24.TopSurface = Enum.SurfaceType.Weld
- Part24.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part24.Position = Vector3.new(-18.5, 0.600028992, -9.5)
- Part24.Color = Color3.new(0.388235, 0.372549, 0.384314)
- Part25.Parent = Model1
- Part25.Anchored = true
- Part25.Size = Vector3.new(15, 1.20000005, 2)
- Part25.CFrame = CFrame.new(-42.5, 1.80002975, -13, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part25.TopSurface = Enum.SurfaceType.Weld
- Part25.Position = Vector3.new(-42.5, 1.80002975, -13)
- Part26.Parent = Model1
- Part26.Rotation = Vector3.new(0, 90, 0)
- Part26.Anchored = true
- Part26.Size = Vector3.new(57, 16.8000011, 2)
- Part26.CFrame = CFrame.new(-51, 9.60002613, -9.49999237, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- Part26.TopSurface = Enum.SurfaceType.Weld
- Part26.Position = Vector3.new(-51, 9.60002613, -9.49999237)
- Part26.Orientation = Vector3.new(0, 90, 0)
- Part27.Parent = Model1
- Part27.Anchored = true
- Part27.Size = Vector3.new(67, 1.20000005, 41)
- Part27.CFrame = CFrame.new(-18.5, 18.6000347, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part27.TopSurface = Enum.SurfaceType.Weld
- Part27.Position = Vector3.new(-18.5, 18.6000347, 0.5)
- Part28.Parent = Model1
- Part28.Anchored = true
- Part28.Size = Vector3.new(67, 16.8000011, 2)
- Part28.CFrame = CFrame.new(-18.5, 9.60002613, 20, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part28.TopSurface = Enum.SurfaceType.Weld
- Part28.Position = Vector3.new(-18.5, 9.60002613, 20)
- Model29.Name = "vinze234"
- Model29.Parent = Model0
- Model29.PrimaryPart = Part30
- Part30.Name = "Head"
- Part30.Parent = Model29
- Part30.BrickColor = BrickColor.new("Light orange")
- Part30.Rotation = Vector3.new(0, 74.6100006, 0)
- Part30.FormFactor = Enum.FormFactor.Symmetric
- Part30.Size = Vector3.new(2, 1, 1)
- Part30.CFrame = CFrame.new(11.7176952, 12.0000095, -7.5226326, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part30.TopSurface = Enum.SurfaceType.Smooth
- Part30.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Part30.Position = Vector3.new(11.7176952, 12.0000095, -7.5226326)
- Part30.Orientation = Vector3.new(0, 74.6100006, 0)
- Part30.Color = Color3.new(0.917647, 0.721569, 0.572549)
- SpecialMesh31.Parent = Part30
- SpecialMesh31.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh31.Scale = Vector3.new(1.25, 1.25, 1.25)
- Attachment32.Name = "HairAttachment"
- Attachment32.Parent = Part30
- Attachment32.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment32.Position = Vector3.new(0, 0.600000024, 0)
- Attachment33.Name = "HatAttachment"
- Attachment33.Parent = Part30
- Attachment33.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment33.Position = Vector3.new(0, 0.600000024, 0)
- Attachment34.Name = "FaceFrontAttachment"
- Attachment34.Parent = Part30
- Attachment34.CFrame = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment34.Position = Vector3.new(0, 0, -0.600000024)
- Attachment35.Name = "FaceCenterAttachment"
- Attachment35.Parent = Part30
- Sound36.Name = "GettingUp"
- Sound36.Parent = Part30
- Sound36.SoundId = "rbxasset://sounds/action_get_up.mp3"
- Sound36.Volume = 0.64999997615814
- RemoteEvent37.Name = "CharacterSoundEvent"
- RemoteEvent37.Parent = Sound36
- Sound38.Name = "Died"
- Sound38.Parent = Part30
- Sound38.SoundId = "rbxasset://sounds/uuhhh.mp3"
- Sound38.Volume = 0.64999997615814
- RemoteEvent39.Name = "CharacterSoundEvent"
- RemoteEvent39.Parent = Sound38
- Sound40.Name = "FreeFalling"
- Sound40.Parent = Part30
- Sound40.SoundId = "rbxasset://sounds/action_falling.mp3"
- Sound40.TimePosition = 0.032987786311992
- Sound40.Volume = 0
- Sound40.Looped = true
- RemoteEvent41.Name = "CharacterSoundEvent"
- RemoteEvent41.Parent = Sound40
- Sound42.Name = "Jumping"
- Sound42.Parent = Part30
- Sound42.SoundId = "rbxasset://sounds/action_jump.mp3"
- Sound42.Volume = 0.64999997615814
- RemoteEvent43.Name = "CharacterSoundEvent"
- RemoteEvent43.Parent = Sound42
- Sound44.Name = "Landing"
- Sound44.Parent = Part30
- Sound44.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- Sound44.Volume = 1
- RemoteEvent45.Name = "CharacterSoundEvent"
- RemoteEvent45.Parent = Sound44
- Sound46.Name = "Splash"
- Sound46.Parent = Part30
- Sound46.SoundId = "rbxasset://sounds/impact_water.mp3"
- Sound46.Volume = 0.64999997615814
- RemoteEvent47.Name = "CharacterSoundEvent"
- RemoteEvent47.Parent = Sound46
- Sound48.Name = "Running"
- Sound48.Parent = Part30
- Sound48.Pitch = 1.8500000238419
- Sound48.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound48.TimePosition = 1.5940207611235
- Sound48.Volume = 0.64999997615814
- Sound48.Looped = true
- RemoteEvent49.Name = "CharacterSoundEvent"
- RemoteEvent49.Parent = Sound48
- Sound50.Name = "Swimming"
- Sound50.Parent = Part30
- Sound50.Pitch = 1.6000000238419
- Sound50.SoundId = "rbxasset://sounds/action_swim.mp3"
- Sound50.Volume = 0.64999997615814
- Sound50.Looped = true
- RemoteEvent51.Name = "CharacterSoundEvent"
- RemoteEvent51.Parent = Sound50
- Sound52.Name = "Climbing"
- Sound52.Parent = Part30
- Sound52.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound52.Volume = 0.64999997615814
- Sound52.Looped = true
- RemoteEvent53.Name = "CharacterSoundEvent"
- RemoteEvent53.Parent = Sound52
- Decal54.Name = "face"
- Decal54.Parent = Part30
- Decal54.Texture = "http://www.roblox.com/asset/?id=12145059"
- Part55.Name = "Torso"
- Part55.Parent = Model29
- Part55.BrickColor = BrickColor.new("Light orange")
- Part55.Rotation = Vector3.new(0, 74.6100006, 0)
- Part55.FormFactor = Enum.FormFactor.Symmetric
- Part55.Size = Vector3.new(2, 2, 1)
- Part55.CFrame = CFrame.new(11.7176952, 10.5000095, -7.5226326, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part55.LeftSurface = Enum.SurfaceType.Weld
- Part55.RightSurface = Enum.SurfaceType.Weld
- Part55.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Part55.Position = Vector3.new(11.7176952, 10.5000095, -7.5226326)
- Part55.Orientation = Vector3.new(0, 74.6100006, 0)
- Part55.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Decal56.Name = "roblox"
- Decal56.Parent = Part55
- Decal56.Texture = "http://www.roblox.com/asset/?id=1158870851"
- Attachment57.Name = "NeckAttachment"
- Attachment57.Parent = Part55
- Attachment57.CFrame = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment57.Position = Vector3.new(0, 1, 0)
- Attachment58.Name = "BodyFrontAttachment"
- Attachment58.Parent = Part55
- Attachment58.CFrame = CFrame.new(0, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment58.Position = Vector3.new(0, 0, -0.5)
- Attachment59.Name = "BodyBackAttachment"
- Attachment59.Parent = Part55
- Attachment59.CFrame = CFrame.new(0, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment59.Position = Vector3.new(0, 0, 0.5)
- Attachment60.Name = "LeftCollarAttachment"
- Attachment60.Parent = Part55
- Attachment60.CFrame = CFrame.new(-1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment60.Position = Vector3.new(-1, 1, 0)
- Attachment61.Name = "RightCollarAttachment"
- Attachment61.Parent = Part55
- Attachment61.CFrame = CFrame.new(1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment61.Position = Vector3.new(1, 1, 0)
- Attachment62.Name = "WaistFrontAttachment"
- Attachment62.Parent = Part55
- Attachment62.CFrame = CFrame.new(0, -1, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment62.Position = Vector3.new(0, -1, -0.5)
- Attachment63.Name = "WaistCenterAttachment"
- Attachment63.Parent = Part55
- Attachment63.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment63.Position = Vector3.new(0, -1, 0)
- Attachment64.Name = "WaistBackAttachment"
- Attachment64.Parent = Part55
- Attachment64.CFrame = CFrame.new(0, -1, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment64.Position = Vector3.new(0, -1, 0.5)
- Motor6D65.Name = "Right Shoulder"
- Motor6D65.Parent = Part55
- Motor6D65.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D65.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D65.Part0 = Part55
- Motor6D65.Part1 = Part75
- Motor6D65.MaxVelocity = 0.10000000149012
- Motor6D66.Name = "Left Shoulder"
- Motor6D66.Parent = Part55
- Motor6D66.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D66.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D66.Part0 = Part55
- Motor6D66.Part1 = Part70
- Motor6D66.MaxVelocity = 0.10000000149012
- Motor6D67.Name = "Right Hip"
- Motor6D67.Parent = Part55
- Motor6D67.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D67.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D67.Part0 = Part55
- Motor6D67.Part1 = Part85
- Motor6D67.MaxVelocity = 0.10000000149012
- Motor6D68.Name = "Left Hip"
- Motor6D68.Parent = Part55
- Motor6D68.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D68.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D68.Part0 = Part55
- Motor6D68.Part1 = Part81
- Motor6D68.MaxVelocity = 0.10000000149012
- Motor6D69.Name = "Neck"
- Motor6D69.Parent = Part55
- Motor6D69.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D69.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D69.Part0 = Part55
- Motor6D69.Part1 = Part30
- Motor6D69.MaxVelocity = 0.10000000149012
- Part70.Name = "Left Arm"
- Part70.Parent = Model29
- Part70.BrickColor = BrickColor.new("Light orange")
- Part70.Rotation = Vector3.new(0, 74.6100006, 0)
- Part70.CanCollide = false
- Part70.FormFactor = Enum.FormFactor.Symmetric
- Part70.Size = Vector3.new(1, 2, 1)
- Part70.CFrame = CFrame.new(11.3194914, 10.5000095, -6.07645369, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part70.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Part70.Position = Vector3.new(11.3194914, 10.5000095, -6.07645369)
- Part70.Orientation = Vector3.new(0, 74.6100006, 0)
- Part70.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Attachment71.Name = "LeftShoulderAttachment"
- Attachment71.Parent = Part70
- Attachment71.CFrame = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment71.Position = Vector3.new(0, 1, 0)
- Attachment72.Name = "LeftGripAttachment"
- Attachment72.Parent = Part70
- Attachment72.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment72.Position = Vector3.new(0, -1, 0)
- Attachment73.Name = "Attachment0"
- Attachment73.Parent = Part70
- Attachment73.Rotation = Vector3.new(0, 0, 90)
- Attachment73.CFrame = CFrame.new(0, 1, 0, 0, -1, 0, 1, 0, -0, 0, 0, 1)
- Attachment73.Position = Vector3.new(0, 1, 0)
- Attachment73.Axis = Vector3.new(0, 1, 0)
- Attachment73.Orientation = Vector3.new(0, 0, 90)
- RopeConstraint74.Parent = Part70
- RopeConstraint74.Visible = true
- RopeConstraint74.Attachment0 = Attachment73
- RopeConstraint74.Attachment1 = Attachment18
- RopeConstraint74.Length = 5.1187558174133
- Part75.Name = "Right Arm"
- Part75.Parent = Model29
- Part75.BrickColor = BrickColor.new("Light orange")
- Part75.Rotation = Vector3.new(0, 74.6100006, 0)
- Part75.CanCollide = false
- Part75.FormFactor = Enum.FormFactor.Symmetric
- Part75.Size = Vector3.new(1, 2, 1)
- Part75.CFrame = CFrame.new(12.1158991, 10.5000095, -8.96881199, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part75.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Part75.Position = Vector3.new(12.1158991, 10.5000095, -8.96881199)
- Part75.Orientation = Vector3.new(0, 74.6100006, 0)
- Part75.Color = Color3.new(0.917647, 0.721569, 0.572549)
- Attachment76.Name = "RightShoulderAttachment"
- Attachment76.Parent = Part75
- Attachment76.CFrame = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment76.Position = Vector3.new(0, 1, 0)
- Attachment77.Name = "RightGripAttachment"
- Attachment77.Parent = Part75
- Attachment77.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment77.Position = Vector3.new(0, -1, 0)
- Attachment78.Name = "Attachment0"
- Attachment78.Parent = Part75
- Attachment78.Rotation = Vector3.new(0, 0, 90)
- Attachment78.CFrame = CFrame.new(0, 1, 0, 0, -1, 0, 1, 0, -0, 0, 0, 1)
- Attachment78.Position = Vector3.new(0, 1, 0)
- Attachment78.Axis = Vector3.new(0, 1, 0)
- Attachment78.Orientation = Vector3.new(0, 0, 90)
- Attachment79.Name = "Attachment0"
- Attachment79.Parent = Part75
- Attachment79.Rotation = Vector3.new(0, 0, 90)
- Attachment79.CFrame = CFrame.new(0, 1, 0, 0, -1, 0, 1, 0, -0, 0, 0, 1)
- Attachment79.Position = Vector3.new(0, 1, 0)
- Attachment79.Axis = Vector3.new(0, 1, 0)
- Attachment79.Orientation = Vector3.new(0, 0, 90)
- RopeConstraint80.Parent = Part75
- RopeConstraint80.Visible = true
- RopeConstraint80.Attachment0 = Attachment79
- RopeConstraint80.Attachment1 = Attachment20
- RopeConstraint80.Length = 4.47336769104
- Part81.Name = "Left Leg"
- Part81.Parent = Model29
- Part81.BrickColor = BrickColor.new("Really black")
- Part81.Rotation = Vector3.new(0, 74.6100006, 0)
- Part81.CanCollide = false
- Part81.FormFactor = Enum.FormFactor.Symmetric
- Part81.Size = Vector3.new(1, 2, 1)
- Part81.CFrame = CFrame.new(11.5849609, 8.50000954, -7.04057312, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part81.BottomSurface = Enum.SurfaceType.Smooth
- Part81.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part81.Position = Vector3.new(11.5849609, 8.50000954, -7.04057312)
- Part81.Orientation = Vector3.new(0, 74.6100006, 0)
- Part81.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Attachment82.Name = "LeftFootAttachment"
- Attachment82.Parent = Part81
- Attachment82.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment82.Position = Vector3.new(0, -1, 0)
- Attachment83.Name = "Attachment0"
- Attachment83.Parent = Part81
- Attachment83.Rotation = Vector3.new(-180, 0, -180)
- Attachment83.CFrame = CFrame.new(-0.5, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Attachment83.Position = Vector3.new(-0.5, 0, 0)
- Attachment83.Axis = Vector3.new(-1, 0, 0)
- Attachment83.Orientation = Vector3.new(-0, 180, 0)
- RopeConstraint84.Parent = Part81
- RopeConstraint84.Visible = true
- RopeConstraint84.Attachment0 = Attachment83
- RopeConstraint84.Attachment1 = Attachment22
- RopeConstraint84.Length = 7.1176595687866
- Part85.Name = "Right Leg"
- Part85.Parent = Model29
- Part85.BrickColor = BrickColor.new("Really black")
- Part85.Rotation = Vector3.new(0, 74.6100006, 0)
- Part85.CanCollide = false
- Part85.FormFactor = Enum.FormFactor.Symmetric
- Part85.Size = Vector3.new(1, 2, 1)
- Part85.CFrame = CFrame.new(11.8504295, 8.50000954, -8.00469208, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part85.BottomSurface = Enum.SurfaceType.Smooth
- Part85.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Part85.Position = Vector3.new(11.8504295, 8.50000954, -8.00469208)
- Part85.Orientation = Vector3.new(0, 74.6100006, 0)
- Part85.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- Attachment86.Name = "RightFootAttachment"
- Attachment86.Parent = Part85
- Attachment86.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment86.Position = Vector3.new(0, -1, 0)
- Attachment87.Name = "Attachment0"
- Attachment87.Parent = Part85
- Attachment87.CFrame = CFrame.new(0.5, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment87.Position = Vector3.new(0.5, 0, 0)
- RopeConstraint88.Parent = Part85
- RopeConstraint88.Visible = true
- RopeConstraint88.Attachment0 = Attachment87
- RopeConstraint88.Attachment1 = Attachment21
- RopeConstraint88.Length = 5.3572382926941
- Humanoid89.Parent = Model29
- Humanoid89.RightLeg = Part85
- Humanoid89.LeftLeg = Part81
- Humanoid89.Torso = Part90
- Part90.Name = "HumanoidRootPart"
- Part90.Parent = Model29
- Part90.Transparency = 1
- Part90.Rotation = Vector3.new(0, 74.6100006, 0)
- Part90.CanCollide = false
- Part90.FormFactor = Enum.FormFactor.Symmetric
- Part90.Size = Vector3.new(2, 2, 1)
- Part90.CFrame = CFrame.new(11.7176952, 10.5000095, -7.5226326, 0.265469074, 0, 0.964119375, 0, 1, 0, -0.964119375, 0, 0.265469044)
- Part90.BottomSurface = Enum.SurfaceType.Smooth
- Part90.TopSurface = Enum.SurfaceType.Smooth
- Part90.Position = Vector3.new(11.7176952, 10.5000095, -7.5226326)
- Part90.Orientation = Vector3.new(0, 74.6100006, 0)
- Attachment91.Name = "RootAttachment"
- Attachment91.Parent = Part90
- Motor6D92.Name = "RootJoint"
- Motor6D92.Parent = Part90
- Motor6D92.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D92.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D92.Part0 = Part90
- Motor6D92.Part1 = Part55
- Motor6D92.MaxVelocity = 0.10000000149012
- Script93.Name = "Sound"
- Script93.Parent = Model29
- table.insert(cors,sandbox(Script93,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.
- ]]--
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Players = game:GetService("Players")
- local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
- local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
- local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
- local DefaultServerSoundEvent = nil
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not SoundEventFolder then
- SoundEventFolder = Instance.new("Folder")
- SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
- SoundEventFolder.Archivable = false
- SoundEventFolder.Parent = ReplicatedStorage
- end
- DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- else
- DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
- end
- if not DefaultServerSoundEvent then
- if useSoundDispatcher then
- DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
- else
- DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
- end
- DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
- DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
- end
- local function CreateNewSound(name, id, looped, pitch, parent)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Pitch = pitch
- sound.Looped = looped
- sound.MinDistance = 5
- sound.MaxDistance = 150
- sound.Volume = 0.65
- sound.Parent = parent
- if DefaultServerSoundEvent then
- local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
- CharacterSoundEvent.Name = "CharacterSoundEvent"
- CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
- if type(playing) ~= "boolean" then
- return
- end
- if type(resetPosition) ~= "boolean" then
- return
- end
- if player.Character ~= script.Parent then
- return
- end
- for _, p in pairs(Players:GetPlayers()) do
- if p ~= player then
- -- Connect to the dispatcher to check if the player has loaded.
- if useSoundDispatcher then
- SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
- else
- DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
- end
- end
- end
- end)
- end
- return sound
- end
- local head = script.Parent:FindFirstChild("Head")
- if not head 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))
- LocalScript94.Name = "LocalSound"
- LocalScript94.Parent = Script93
- table.insert(cors,sandbox(LocalScript94,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 useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- local SoundService = game:GetService("SoundService")
- local soundEventFolderName = "DefaultSoundEvents"
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local AddCharacterLoadedEvent = nil
- local RemoveCharacterEvent = nil
- local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not soundEventFolder then
- soundEventFolder = Instance.new("Folder", ReplicatedStorage)
- soundEventFolder.Name = soundEventFolderName
- soundEventFolder.Archivable = false
- end
- -- Load the RemoveCharacterEvent
- RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
- if RemoveCharacterEvent == nil then
- RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
- RemoveCharacterEvent.Name = "RemoveCharacterEvent"
- end
- AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
- if AddCharacterLoadedEvent == nil then
- AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
- AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
- end
- -- Notify the server a new character has been loaded
- AddCharacterLoadedEvent:FireServer()
- -- Notify the sound dispatcher this character has left.
- game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
- RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
- end)
- end
- 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
- if Humanoid then break 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")
- local DefaultServerSoundEvent = nil
- if useSoundDispatcher then
- DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
- else
- DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
- end
- if DefaultServerSoundEvent then
- DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") then
- if resetPosition and sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if sound.IsPlaying ~= playing then
- sound.Playing = playing
- end
- else
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end
- end)
- end
- end
- local IsSoundFilteringEnabled = function()
- return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
- 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 IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, true)
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, false)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, false)
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, true)
- end
- 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
- local fallSpeed = 0
- -- 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(speed)
- stateUpdated(Enum.HumanoidStateType.Running, speed)
- end;
- [Enum.HumanoidStateType.Running] = function(speed)
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
- -- Play a landing sound if the character dropped from a large distance
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- local freeFallSound = Sounds[SFX.FreeFalling]
- freeFallSound.Volume = vol
- Util.Play(freeFallSound)
- fallSpeed = 0
- end
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and speed > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- elseif speed ~= nil then
- stopPlayingLoopedSoundsExcept()
- end
- else
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function(speed)
- local threshold
- if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
- if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 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(speed)
- local sound = Sounds[SFX.Climbing]
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and math.abs(speed) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- Util.Pause(sound)
- stopPlayingLoopedSoundsExcept(sound)
- end
- else
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- 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()
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
- 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;
- [Enum.HumanoidStateType.Seated] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state, speed)
- if stateUpdateHandler[state] ~= nil then
- if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
- or state == Enum.HumanoidStateType.Climbing
- or state == Enum.HumanoidStateType.Swimming
- or state == Enum.HumanoidStateType.RunningNoPhysics) then
- stateUpdateHandler[state](speed)
- else
- stateUpdateHandler[state]()
- end
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
- Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
- Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) 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))
- Script95.Name = "Health"
- Script95.Parent = Model29
- table.insert(cors,sandbox(Script95,function()
- -- Gradually regenerates the Humanoid's Health over time.
- local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
- local REGEN_STEP = 1 -- Wait this long between each regeneration step.
- --------------------------------------------------------------------------------
- local Character = script.Parent
- local Humanoid = Character:WaitForChild'Humanoid'
- --------------------------------------------------------------------------------
- while true do
- while Humanoid.Health < Humanoid.MaxHealth do
- local dt = wait(REGEN_STEP)
- local dh = dt*REGEN_RATE*Humanoid.MaxHealth
- Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
- end
- Humanoid.HealthChanged:Wait()
- end
- end))
- LocalScript96.Name = "Animate"
- LocalScript96.Parent = Model29
- table.insert(cors,sandbox(LocalScript96,function()
- local Figure = script.Parent
- local Torso = Figure:WaitForChild("Torso")
- local RightShoulder = Torso:WaitForChild("Right Shoulder")
- local LeftShoulder = Torso:WaitForChild("Left Shoulder")
- local RightHip = Torso:WaitForChild("Right Hip")
- local LeftHip = Torso:WaitForChild("Left Hip")
- local Neck = Torso:WaitForChild("Neck")
- local Humanoid = Figure:WaitForChild("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=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "run.xml", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- 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, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- 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.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- local jumpMaxLimbVelocity = 0.75
- -- 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
- 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.0, 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)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- 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, priority)
- 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)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- 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
- playAnimation("walk", 0.1, Humanoid)
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- 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)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- 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 > 0 then
- pose = "Running"
- else
- 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, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- 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
- -- print("Wha " .. pose)
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and tool:FindFirstChild("Handle") then
- local 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:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if msg == "/e dance" then
- emote = dances[math.random(1, #dances)]
- elseif (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
- end)
- -- main program
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent ~= nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- StringValue97.Name = "idle"
- StringValue97.Parent = LocalScript96
- Animation98.Name = "Animation1"
- Animation98.Parent = StringValue97
- Animation98.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- NumberValue99.Name = "Weight"
- NumberValue99.Parent = Animation98
- NumberValue99.Value = 9
- Animation100.Name = "Animation2"
- Animation100.Parent = StringValue97
- Animation100.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- NumberValue101.Name = "Weight"
- NumberValue101.Parent = Animation100
- NumberValue101.Value = 1
- StringValue102.Name = "walk"
- StringValue102.Parent = LocalScript96
- Animation103.Name = "WalkAnim"
- Animation103.Parent = StringValue102
- Animation103.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- StringValue104.Name = "run"
- StringValue104.Parent = LocalScript96
- Animation105.Name = "RunAnim"
- Animation105.Parent = StringValue104
- Animation105.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- StringValue106.Name = "jump"
- StringValue106.Parent = LocalScript96
- Animation107.Name = "JumpAnim"
- Animation107.Parent = StringValue106
- Animation107.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- StringValue108.Name = "climb"
- StringValue108.Parent = LocalScript96
- Animation109.Name = "ClimbAnim"
- Animation109.Parent = StringValue108
- Animation109.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- StringValue110.Name = "toolnone"
- StringValue110.Parent = LocalScript96
- Animation111.Name = "ToolNoneAnim"
- Animation111.Parent = StringValue110
- Animation111.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- StringValue112.Name = "fall"
- StringValue112.Parent = LocalScript96
- Animation113.Name = "FallAnim"
- Animation113.Parent = StringValue112
- Animation113.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- StringValue114.Name = "sit"
- StringValue114.Parent = LocalScript96
- Animation115.Name = "SitAnim"
- Animation115.Parent = StringValue114
- Animation115.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- BodyColors116.Parent = Model29
- BodyColors116.HeadColor = BrickColor.new("Light orange")
- BodyColors116.LeftArmColor = BrickColor.new("Light orange")
- BodyColors116.LeftLegColor = BrickColor.new("Really black")
- BodyColors116.RightArmColor = BrickColor.new("Light orange")
- BodyColors116.RightLegColor = BrickColor.new("Really black")
- BodyColors116.TorsoColor = BrickColor.new("Light orange")
- ShirtGraphic117.Parent = Model29
- ShirtGraphic117.Graphic = "http://www.roblox.com/asset/?id=1158870851"
- Pants118.Name = "Pants"
- Pants118.Parent = Model29
- Pants118.PantsTemplate = "http://www.roblox.com/asset/?id=1137160924"
- Accessory119.Name = "Ultra-Fabulous Hair"
- Accessory119.Parent = Model29
- Part120.Name = "Handle"
- Part120.Parent = Accessory119
- Part120.Rotation = Vector3.new(0, 74.6100006, 0)
- Part120.CanCollide = false
- Part120.FormFactor = Enum.FormFactor.Symmetric
- Part120.Size = Vector3.new(2, 2, 2)
- Part120.CFrame = CFrame.new(11.7179575, 12.5000095, -7.52256012, 0.265469074, -2.08960715e-09, 0.964119375, 7.87137555e-09, 1, 4.1444221e-16, -0.964119375, 7.58894547e-09, 0.265469044)
- Part120.BottomSurface = Enum.SurfaceType.Smooth
- Part120.TopSurface = Enum.SurfaceType.Smooth
- Part120.Position = Vector3.new(11.7179575, 12.5000095, -7.52256012)
- Part120.Orientation = Vector3.new(0, 74.6100006, 0)
- SpecialMesh121.Parent = Part120
- SpecialMesh121.MeshId = "http://www.roblox.com/asset/?id=16627529"
- SpecialMesh121.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
- SpecialMesh121.TextureId = "http://www.roblox.com/asset/?id=16627494"
- SpecialMesh121.MeshType = Enum.MeshType.FileMesh
- SpecialMesh121.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
- Attachment122.Name = "HairAttachment"
- Attachment122.Parent = Part120
- Attachment122.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment122.CFrame = CFrame.new(8.65838956e-09, 0.0999999046, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment122.Position = Vector3.new(8.65838956e-09, 0.0999999046, -0.000272244215)
- Attachment122.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment122.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value123.Name = "OriginalSize"
- Vector3Value123.Parent = Part120
- Vector3Value123.Value = Vector3.new(2, 2, 2)
- Weld124.Name = "AccessoryWeld"
- Weld124.Parent = Part120
- Weld124.C0 = CFrame.new(8.65838956e-09, 0.0999999046, -0.000272244215, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld124.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld124.Part0 = Part120
- Weld124.Part1 = Part30
- Accessory125.Name = "Nerd Glasses"
- Accessory125.Parent = Model29
- Accessory125.AttachmentPos = Vector3.new(0, 0.300000012, 0.25)
- Part126.Name = "Handle"
- Part126.Parent = Accessory125
- Part126.Rotation = Vector3.new(0, 74.6100006, 0)
- Part126.CanCollide = false
- Part126.FormFactor = Enum.FormFactor.Plate
- Part126.Size = Vector3.new(1, 0.400000006, 1)
- Part126.CFrame = CFrame.new(11.4769278, 12.2000093, -7.58892775, 0.265469074, -2.08960715e-09, 0.964119375, 7.87137555e-09, 1, 4.1444221e-16, -0.964119375, 7.58894547e-09, 0.265469044)
- Part126.BottomSurface = Enum.SurfaceType.Smooth
- Part126.TopSurface = Enum.SurfaceType.Smooth
- Part126.Position = Vector3.new(11.4769278, 12.2000093, -7.58892775)
- Part126.Orientation = Vector3.new(0, 74.6100006, 0)
- SpecialMesh127.Parent = Part126
- SpecialMesh127.MeshId = "http://www.roblox.com/asset/?id=11419729"
- SpecialMesh127.TextureId = "http://www.roblox.com/asset/?id=112346956"
- SpecialMesh127.MeshType = Enum.MeshType.FileMesh
- Attachment128.Name = "FaceFrontAttachment"
- Attachment128.Parent = Part126
- Attachment128.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment128.CFrame = CFrame.new(3.93538357e-09, -0.199999809, -0.350272298, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment128.Position = Vector3.new(3.93538357e-09, -0.199999809, -0.350272298)
- Attachment128.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment128.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value129.Name = "OriginalSize"
- Vector3Value129.Parent = Part126
- Vector3Value129.Value = Vector3.new(1, 0.400000006, 1)
- Weld130.Name = "AccessoryWeld"
- Weld130.Parent = Part126
- Weld130.C0 = CFrame.new(3.93538357e-09, -0.199999809, -0.350272298, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld130.C1 = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld130.Part0 = Part126
- Weld130.Part1 = Part30
- Shirt131.Name = "Shirt"
- Shirt131.Parent = Model29
- Shirt131.ShirtTemplate = "http://www.roblox.com/asset/?id=759534964"
- Accessory132.Name = "MoanaHat"
- Accessory132.Parent = Model29
- Accessory132.AttachmentPos = Vector3.new(0, -0.100000001, 0.209999993)
- Part133.Name = "Handle"
- Part133.Parent = Accessory132
- Part133.Rotation = Vector3.new(0, 74.6100006, 0)
- Part133.CanCollide = false
- Part133.FormFactor = Enum.FormFactor.Symmetric
- Part133.Size = Vector3.new(1.24999964, 1.1500001, 1.24000001)
- Part133.CFrame = CFrame.new(11.5154924, 12.6000099, -7.57830858, 0.265469074, -2.08960715e-09, 0.964119375, 7.87137555e-09, 1, 4.1444221e-16, -0.964119375, 7.58894547e-09, 0.265469044)
- Part133.BottomSurface = Enum.SurfaceType.Smooth
- Part133.TopSurface = Enum.SurfaceType.Smooth
- Part133.Position = Vector3.new(11.5154924, 12.6000099, -7.57830858)
- Part133.Orientation = Vector3.new(0, 74.6100006, 0)
- SpecialMesh134.Parent = Part133
- SpecialMesh134.MeshId = "rbxassetid://1047580703"
- SpecialMesh134.Scale = Vector3.new(0.680000007, 0.680000007, 0.680000007)
- SpecialMesh134.TextureId = "rbxassetid://1047581552"
- SpecialMesh134.MeshType = Enum.MeshType.FileMesh
- SpecialMesh134.Scale = Vector3.new(0.680000007, 0.680000007, 0.680000007)
- Attachment135.Name = "HatAttachment"
- Attachment135.Parent = Part133
- Attachment135.Rotation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Attachment135.CFrame = CFrame.new(8.65838956e-09, 0, 0.209727749, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment135.Position = Vector3.new(8.65838956e-09, 0, 0.209727749)
- Attachment135.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment135.Orientation = Vector3.new(2.37457894e-14, -1.86912034e-22, -4.50996595e-07)
- Vector3Value136.Name = "OriginalSize"
- Vector3Value136.Parent = Part133
- Vector3Value136.Value = Vector3.new(1.24999964, 1.1500001, 1.24000001)
- Weld137.Name = "AccessoryWeld"
- Weld137.Parent = Part133
- Weld137.C0 = CFrame.new(8.65838956e-09, 0, 0.209727749, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld137.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld137.Part0 = Part133
- Weld137.Part1 = Part30
- Part138.Parent = Model0
- Part138.BrickColor = BrickColor.new("Dark orange")
- Part138.Size = Vector3.new(5.5, 4, 15.5)
- Part138.CFrame = CFrame.new(-47.25, 3.2000289, 4.25, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part138.BottomSurface = Enum.SurfaceType.Smooth
- Part138.TopSurface = Enum.SurfaceType.Smooth
- Part138.Color = Color3.new(0.627451, 0.372549, 0.207843)
- Part138.Position = Vector3.new(-47.25, 3.2000289, 4.25)
- Part138.Color = Color3.new(0.627451, 0.372549, 0.207843)
- Decal139.Parent = mas
- Decal139.Texture = "http://www.roblox.com/asset/?id=67630773"
- Decal139.Face = Enum.NormalId.Right
- 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