Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
- --What's Added To M2S with Dittoide's Edit?
- --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
- --/ Removed Gui In Bottom-Left for when you are making guis.
- --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
- --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
- --Errors: Camera,Terrain,Attachment,Status,Animator,Accessory
- local runDummyScript = function(f,scri)
- if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
- local Dummy_CoRoutine = coroutine.create(function()
- getfenv().script = scri
- ypcall(function() f() end)
- end)
- table.insert(cors,Dummy_CoRoutine);
- coroutine.resume(Dummy_CoRoutine);
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "M2S_Model"
- o2 = Instance.new("Part")
- o4 = Instance.new("Model")
- o5 = Instance.new("Part")
- o6 = Instance.new("SpecialMesh")
- o11 = Instance.new("Sound")
- o12 = Instance.new("RemoteEvent")
- o13 = Instance.new("Sound")
- o14 = Instance.new("RemoteEvent")
- o15 = Instance.new("Sound")
- o16 = Instance.new("RemoteEvent")
- o17 = Instance.new("Sound")
- o18 = Instance.new("RemoteEvent")
- o19 = Instance.new("Sound")
- o20 = Instance.new("RemoteEvent")
- o21 = Instance.new("Sound")
- o22 = Instance.new("RemoteEvent")
- o23 = Instance.new("Sound")
- o24 = Instance.new("RemoteEvent")
- o25 = Instance.new("Sound")
- o26 = Instance.new("RemoteEvent")
- o27 = Instance.new("Sound")
- o28 = Instance.new("RemoteEvent")
- o29 = Instance.new("Decal")
- o30 = Instance.new("Part")
- o31 = Instance.new("Decal")
- o40 = Instance.new("Motor6D")
- o41 = Instance.new("Motor6D")
- o42 = Instance.new("Motor6D")
- o43 = Instance.new("Motor6D")
- o44 = Instance.new("Motor6D")
- o45 = Instance.new("Weld")
- o46 = Instance.new("Part")
- o49 = Instance.new("Weld")
- o50 = Instance.new("Part")
- o53 = Instance.new("Weld")
- o54 = Instance.new("Part")
- o56 = Instance.new("Weld")
- o57 = Instance.new("Part")
- o59 = Instance.new("Weld")
- o60 = Instance.new("Humanoid")
- o63 = Instance.new("Part")
- o65 = Instance.new("Motor6D")
- o66 = Instance.new("Script")
- o67 = Instance.new("LocalScript")
- o68 = Instance.new("Script")
- o69 = Instance.new("LocalScript")
- o70 = Instance.new("StringValue")
- o71 = Instance.new("Animation")
- o72 = Instance.new("NumberValue")
- o73 = Instance.new("Animation")
- o74 = Instance.new("NumberValue")
- o75 = Instance.new("StringValue")
- o76 = Instance.new("Animation")
- o77 = Instance.new("StringValue")
- o78 = Instance.new("Animation")
- o79 = Instance.new("StringValue")
- o80 = Instance.new("Animation")
- o81 = Instance.new("StringValue")
- o82 = Instance.new("Animation")
- o83 = Instance.new("StringValue")
- o84 = Instance.new("Animation")
- o85 = Instance.new("StringValue")
- o86 = Instance.new("Animation")
- o87 = Instance.new("StringValue")
- o88 = Instance.new("Animation")
- o89 = Instance.new("NumberValue")
- o90 = Instance.new("BodyColors")
- o91 = Instance.new("Pants")
- o92 = Instance.new("Shirt")
- o94 = Instance.new("Part")
- o95 = Instance.new("SpecialMesh")
- o97 = Instance.new("Vector3Value")
- o98 = Instance.new("Weld")
- o99 = Instance.new("Model")
- o100 = Instance.new("Part")
- o101 = Instance.new("BlockMesh")
- o102 = Instance.new("Decal")
- o103 = Instance.new("Decal")
- o104 = Instance.new("Decal")
- o105 = Instance.new("Decal")
- o106 = Instance.new("Decal")
- o107 = Instance.new("Decal")
- o108 = Instance.new("Script")
- o109 = Instance.new("Part")
- o110 = Instance.new("Decal")
- o111 = Instance.new("BodyGyro")
- o112 = Instance.new("BlockMesh")
- o113 = Instance.new("Decal")
- o114 = Instance.new("Decal")
- o115 = Instance.new("Decal")
- o116 = Instance.new("Decal")
- o117 = Instance.new("Decal")
- o118 = Instance.new("Decal")
- o119 = Instance.new("Weld")
- o120 = Instance.new("Weld")
- o121 = Instance.new("Model")
- o122 = Instance.new("Part")
- o123 = Instance.new("Decal")
- o124 = Instance.new("Decal")
- o125 = Instance.new("Decal")
- o126 = Instance.new("Decal")
- o127 = Instance.new("Decal")
- o128 = Instance.new("Decal")
- o129 = Instance.new("BlockMesh")
- o130 = Instance.new("Weld")
- o131 = Instance.new("Model")
- o132 = Instance.new("Part")
- o133 = Instance.new("BlockMesh")
- o134 = Instance.new("Decal")
- o135 = Instance.new("Decal")
- o136 = Instance.new("Decal")
- o137 = Instance.new("Decal")
- o138 = Instance.new("Decal")
- o139 = Instance.new("Decal")
- o140 = Instance.new("Weld")
- o141 = Instance.new("Model")
- o142 = Instance.new("Part")
- o143 = Instance.new("BlockMesh")
- o144 = Instance.new("Decal")
- o145 = Instance.new("Decal")
- o146 = Instance.new("Decal")
- o147 = Instance.new("Decal")
- o148 = Instance.new("Decal")
- o149 = Instance.new("Decal")
- o150 = Instance.new("Weld")
- o151 = Instance.new("Model")
- o152 = Instance.new("Part")
- o153 = Instance.new("Decal")
- o154 = Instance.new("Decal")
- o155 = Instance.new("Decal")
- o156 = Instance.new("Decal")
- o157 = Instance.new("Decal")
- o158 = Instance.new("Decal")
- o159 = Instance.new("BlockMesh")
- o160 = Instance.new("Weld")
- o2.Name = "Baseplate"
- o2.Parent = mas
- o2.BrickColor = BrickColor.new("Dark stone grey")
- o2.Position = Vector3.new(0, -10, 0)
- o2.Anchored = true
- o2.Locked = true
- o2.FormFactor = Enum.FormFactor.Symmetric
- o2.Size = Vector3.new(512, 20, 512)
- o2.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o2.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o2.Position = Vector3.new(0, -10, 0)
- o4.Name = "timetodie23232223"
- o4.Parent = mas
- o4.Archivable = false
- o4.PrimaryPart = o5
- o5.Name = "Head"
- o5.Parent = o4
- o5.BrickColor = BrickColor.new("Pastel brown")
- o5.Transparency = 0.98000001907349
- o5.Position = Vector3.new(45.1851501, 4.4455905, 17.7143955)
- o5.Rotation = Vector3.new(-0.299999982, -35.2900009, -0.170000002)
- o5.RotVelocity = Vector3.new(7.99957888e-07, 8.49270554e-15, -2.13864519e-06)
- o5.Velocity = Vector3.new(3.82598728e-06, -0.227071941, 1.43110628e-06)
- o5.Locked = true
- o5.FormFactor = Enum.FormFactor.Symmetric
- o5.Size = Vector3.new(2, 1, 1)
- o5.CFrame = CFrame.new(45.1851501, 4.4455905, 17.7143955, 0.816232741, 0.00244292081, -0.57771796, -1.58424918e-05, 0.999991179, 0.00420614937, 0.577723145, -0.00342404423, 0.816225588)
- o5.TopSurface = Enum.SurfaceType.Smooth
- o5.Color = Color3.new(1, 0.8, 0.6)
- o5.Position = Vector3.new(45.1851501, 4.4455905, 17.7143955)
- o6.Parent = o5
- o6.Scale = Vector3.new(1.25, 1.25, 1.25)
- o11.Name = "GettingUp"
- o11.Parent = o5
- o11.Archivable = false
- o11.SoundId = "rbxasset://sounds/action_get_up.mp3"
- o11.Volume = 0.64999997615814
- o12.Name = "CharacterSoundEvent"
- o12.Parent = o11
- o13.Name = "Died"
- o13.Parent = o5
- o13.Archivable = false
- o13.SoundId = "rbxasset://sounds/uuhhh.mp3"
- o13.Volume = 0.64999997615814
- o14.Name = "CharacterSoundEvent"
- o14.Parent = o13
- o15.Name = "FreeFalling"
- o15.Parent = o5
- o15.Archivable = false
- o15.SoundId = "rbxasset://sounds/action_falling.mp3"
- o15.TimePosition = 0.26334824121614
- o15.Volume = 0.011887255124748
- o15.Looped = true
- o16.Name = "CharacterSoundEvent"
- o16.Parent = o15
- o17.Name = "Jumping"
- o17.Parent = o5
- o17.Archivable = false
- o17.SoundId = "rbxasset://sounds/action_jump.mp3"
- o17.Volume = 0.64999997615814
- o18.Name = "CharacterSoundEvent"
- o18.Parent = o17
- o19.Name = "Landing"
- o19.Parent = o5
- o19.Archivable = false
- o19.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- o19.Volume = 1
- o20.Name = "CharacterSoundEvent"
- o20.Parent = o19
- o21.Name = "Splash"
- o21.Parent = o5
- o21.Archivable = false
- o21.SoundId = "rbxasset://sounds/impact_water.mp3"
- o21.Volume = 0.64999997615814
- o22.Name = "CharacterSoundEvent"
- o22.Parent = o21
- o23.Name = "Running"
- o23.Parent = o5
- o23.Archivable = false
- o23.Pitch = 1.8500000238419
- o23.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o23.TimePosition = 2.1942696646406
- o23.Volume = 0.64999997615814
- o23.Looped = true
- o24.Name = "CharacterSoundEvent"
- o24.Parent = o23
- o25.Name = "Swimming"
- o25.Parent = o5
- o25.Archivable = false
- o25.Pitch = 1.6000000238419
- o25.SoundId = "rbxasset://sounds/action_swim.mp3"
- o25.Volume = 0.64999997615814
- o25.Looped = true
- o26.Name = "CharacterSoundEvent"
- o26.Parent = o25
- o27.Name = "Climbing"
- o27.Parent = o5
- o27.Archivable = false
- o27.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o27.Volume = 0.64999997615814
- o27.Looped = true
- o28.Name = "CharacterSoundEvent"
- o28.Parent = o27
- o29.Name = "face"
- o29.Parent = o5
- o29.Texture = "http://www.roblox.com/asset/?id=13038247"
- o30.Name = "Torso"
- o30.Parent = o4
- o30.BrickColor = BrickColor.new("Pastel brown")
- o30.Transparency = 1
- o30.Position = Vector3.new(45.1839294, 2.97144008, 17.7161083)
- o30.Rotation = Vector3.new(0, -35.5099983, 0)
- o30.RotVelocity = Vector3.new(7.74944965e-07, 4.90025839e-15, -2.07179141e-06)
- o30.Velocity = Vector3.new(6.47594106e-07, 0.181635305, 2.42229902e-07)
- o30.Locked = true
- o30.FormFactor = Enum.FormFactor.Symmetric
- o30.Size = Vector3.new(2, 2, 1)
- o30.CFrame = CFrame.new(45.1839294, 2.97144008, 17.7161083, 0.814045668, -8.19862507e-08, -0.580800891, 8.45517576e-08, 1, -2.26536496e-08, 0.580800891, -3.06666301e-08, 0.814045668)
- o30.LeftSurface = Enum.SurfaceType.Weld
- o30.RightSurface = Enum.SurfaceType.Weld
- o30.Color = Color3.new(1, 0.8, 0.6)
- o30.Position = Vector3.new(45.1839294, 2.97144008, 17.7161083)
- o30.velocity = Vector3.new(6.47594106e-07, 0.181635305, 2.42229902e-07)
- o31.Name = "roblox"
- o31.Parent = o30
- o40.Name = "Right Shoulder"
- o40.Parent = o30
- o40.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o40.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o40.Part0 = o30
- o40.Part1 = o50
- o40.CurrentAngle = -0.0050382339395583
- o40.MaxVelocity = 0.10000000149012
- o41.Name = "Left Shoulder"
- o41.Parent = o30
- o41.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o41.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o41.Part0 = o30
- o41.Part1 = o46
- o41.CurrentAngle = 0.0040962835773826
- o41.MaxVelocity = 0.10000000149012
- o42.Name = "Right Hip"
- o42.Parent = o30
- o42.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o42.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o42.Part0 = o30
- o42.Part1 = o57
- o42.MaxVelocity = 0.10000000149012
- o43.Name = "Left Hip"
- o43.Parent = o30
- o43.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o43.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o43.Part0 = o30
- o43.Part1 = o54
- o43.MaxVelocity = 0.10000000149012
- o44.Name = "Neck"
- o44.Parent = o30
- o44.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o44.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o44.Part0 = o30
- o44.Part1 = o5
- o44.CurrentAngle = -0.00014588759222534
- o44.MaxVelocity = 0.10000000149012
- o45.Parent = o30
- o45.Part0 = o30
- o45.Part1 = o109
- o46.Name = "Left Arm"
- o46.Parent = o4
- o46.BrickColor = BrickColor.new("Pastel brown")
- o46.Transparency = 1
- o46.Position = Vector3.new(43.9680328, 2.91677237, 16.8343182)
- o46.Rotation = Vector3.new(0.280000001, -36.6100006, -0.0700000003)
- o46.RotVelocity = Vector3.new(-6.87908141e-07, 6.73073979e-15, 1.83910811e-06)
- o46.Velocity = Vector3.new(-4.78143079e-07, 0.128622785, -1.78846747e-07)
- o46.CanCollide = false
- o46.Locked = true
- o46.FormFactor = Enum.FormFactor.Symmetric
- o46.Size = Vector3.new(1, 2, 1)
- o46.CFrame = CFrame.new(43.9680328, 2.91677237, 16.8343182, 0.802737832, 0.000962207559, -0.596331358, -0.00414953334, 0.99998349, -0.00397227053, 0.596317708, 0.00566319004, 0.802728593)
- o46.Color = Color3.new(1, 0.8, 0.6)
- o46.Position = Vector3.new(43.9680328, 2.91677237, 16.8343182)
- o46.velocity = Vector3.new(-4.78143079e-07, 0.128622785, -1.78846747e-07)
- o49.Parent = o46
- o49.Part0 = o46
- o49.Part1 = o152
- o50.Name = "Right Arm"
- o50.Parent = o4
- o50.BrickColor = BrickColor.new("Pastel brown")
- o50.Transparency = 1
- o50.Position = Vector3.new(46.4100304, 2.94120884, 18.5800209)
- o50.Rotation = Vector3.new(0.529999971, -34.9300003, 0.299999982)
- o50.RotVelocity = Vector3.new(8.50270339e-07, 1.00552865e-14, -2.27318219e-06)
- o50.Velocity = Vector3.new(6.49445496e-07, 0.0396099575, 2.42921232e-07)
- o50.CanCollide = false
- o50.Locked = true
- o50.FormFactor = Enum.FormFactor.Symmetric
- o50.Size = Vector3.new(1, 2, 1)
- o50.CFrame = CFrame.new(46.4100304, 2.94120884, 18.5800209, 0.819866359, -0.00424642442, -0.57253921, -0.000142743942, 0.999970973, -0.00762102846, 0.572554886, 0.0063299546, 0.819841981)
- o50.Color = Color3.new(1, 0.8, 0.6)
- o50.Position = Vector3.new(46.4100304, 2.94120884, 18.5800209)
- o50.velocity = Vector3.new(6.49445496e-07, 0.0396099575, 2.42921232e-07)
- o53.Parent = o50
- o53.Part0 = o50
- o53.Part1 = o122
- o54.Name = "Left Leg"
- o54.Parent = o4
- o54.BrickColor = BrickColor.new("Pastel brown")
- o54.Transparency = 1
- o54.Position = Vector3.new(44.7769051, 0.967441559, 17.4257088)
- o54.Rotation = Vector3.new(0, -35.5099983, 0)
- o54.RotVelocity = Vector3.new(-6.29877604e-07, 5.52061813e-15, 1.68396775e-06)
- o54.Velocity = Vector3.new(2.84237535e-06, -0.00027731873, 1.0631727e-06)
- o54.CanCollide = false
- o54.Locked = true
- o54.FormFactor = Enum.FormFactor.Symmetric
- o54.Size = Vector3.new(1, 2, 1)
- o54.CFrame = CFrame.new(44.7769051, 0.967441559, 17.4257088, 0.814045668, -5.1267893e-08, -0.580800891, 5.28720854e-08, 1, -1.41659626e-08, 0.580800891, -1.91764133e-08, 0.814045668)
- o54.BottomSurface = Enum.SurfaceType.Smooth
- o54.Color = Color3.new(1, 0.8, 0.6)
- o54.Position = Vector3.new(44.7769051, 0.967441559, 17.4257088)
- o54.velocity = Vector3.new(2.84237535e-06, -0.00027731873, 1.0631727e-06)
- o56.Parent = o54
- o56.Part0 = o54
- o56.Part1 = o132
- o57.Name = "Right Leg"
- o57.Parent = o4
- o57.BrickColor = BrickColor.new("Pastel brown")
- o57.Transparency = 1
- o57.Position = Vector3.new(45.5909538, 0.968118429, 18.0065079)
- o57.Rotation = Vector3.new(0, -35.5099983, 0)
- o57.RotVelocity = Vector3.new(-5.89426463e-07, 4.84538718e-15, 1.57582554e-06)
- o57.Velocity = Vector3.new(2.65877702e-06, -0.046217043, 9.94496759e-07)
- o57.CanCollide = false
- o57.Locked = true
- o57.FormFactor = Enum.FormFactor.Symmetric
- o57.Size = Vector3.new(1, 2, 1)
- o57.CFrame = CFrame.new(45.5909538, 0.968118429, 18.0065079, 0.814045668, 9.00194319e-09, -0.580800891, -9.28362365e-09, 1, 2.48733967e-09, 0.580800891, 3.3671288e-09, 0.814045668)
- o57.BottomSurface = Enum.SurfaceType.Smooth
- o57.Color = Color3.new(1, 0.8, 0.6)
- o57.Position = Vector3.new(45.5909538, 0.968118429, 18.0065079)
- o57.velocity = Vector3.new(2.65877702e-06, -0.046217043, 9.94496759e-07)
- o59.Parent = o57
- o59.Part0 = o57
- o59.Part1 = o142
- o60.Parent = o4
- o60.RightLeg = o57
- o60.LeftLeg = o54
- o60.Torso = o63
- o63.Name = "HumanoidRootPart"
- o63.Parent = o4
- o63.Transparency = 1
- o63.Position = Vector3.new(45.1839294, 2.9687233, 17.7161083)
- o63.Rotation = Vector3.new(0, -35.5099983, 0)
- o63.RotVelocity = Vector3.new(-6.54914913e-07, 1.03519869e-14, 1.75090918e-06)
- o63.Velocity = Vector3.new(-5.47635409e-07, -0.158884585, -2.04839054e-07)
- o63.CanCollide = false
- o63.Locked = true
- o63.FormFactor = Enum.FormFactor.Symmetric
- o63.Size = Vector3.new(2, 2, 1)
- o63.CFrame = CFrame.new(45.1839294, 2.9687233, 17.7161083, 0.814045668, 8.6990859e-08, -0.580800891, -8.97128132e-08, 1, 2.40366997e-08, 0.580800891, 3.25383098e-08, 0.814045668)
- o63.BottomSurface = Enum.SurfaceType.Smooth
- o63.TopSurface = Enum.SurfaceType.Smooth
- o63.Position = Vector3.new(45.1839294, 2.9687233, 17.7161083)
- o63.velocity = Vector3.new(-5.47635409e-07, -0.158884585, -2.04839054e-07)
- o65.Name = "RootJoint"
- o65.Parent = o63
- o65.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o65.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o65.Part0 = o63
- o65.Part1 = o30
- o65.MaxVelocity = 0.10000000149012
- o66.Name = "Sound"
- o66.Parent = o4
- runDummyScript(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,o66)
- o67.Name = "LocalSound"
- o67.Parent = o66
- runDummyScript(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 resetPosition and sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if sound.IsPlaying ~= playing then
- sound.Playing = playing
- 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 IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, false)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, false)
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if 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,o67)
- o68.Name = "Health"
- o68.Parent = o4
- runDummyScript(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,o68)
- o69.Name = "Animate"
- o69.Parent = o4
- runDummyScript(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,o69)
- o70.Name = "idle"
- o70.Parent = o69
- o71.Name = "Animation1"
- o71.Parent = o70
- o71.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o72.Name = "Weight"
- o72.Parent = o71
- o72.Value = 9
- o73.Name = "Animation2"
- o73.Parent = o70
- o73.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o74.Name = "Weight"
- o74.Parent = o73
- o74.Value = 1
- o75.Name = "walk"
- o75.Parent = o69
- o76.Name = "WalkAnim"
- o76.Parent = o75
- o76.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o77.Name = "run"
- o77.Parent = o69
- o78.Name = "RunAnim"
- o78.Parent = o77
- o78.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o79.Name = "jump"
- o79.Parent = o69
- o80.Name = "JumpAnim"
- o80.Parent = o79
- o80.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o81.Name = "climb"
- o81.Parent = o69
- o82.Name = "ClimbAnim"
- o82.Parent = o81
- o82.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o83.Name = "toolnone"
- o83.Parent = o69
- o84.Name = "ToolNoneAnim"
- o84.Parent = o83
- o84.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o85.Name = "fall"
- o85.Parent = o69
- o86.Name = "FallAnim"
- o86.Parent = o85
- o86.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o87.Name = "sit"
- o87.Parent = o69
- o88.Name = "SitAnim"
- o88.Parent = o87
- o88.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o89.Name = "ScaleDampeningPercent"
- o89.Parent = o69
- o89.Value = 0.39999997615814
- o90.Parent = o4
- o90.HeadColor = BrickColor.new("Pastel brown")
- o90.LeftArmColor = BrickColor.new("Pastel brown")
- o90.LeftLegColor = BrickColor.new("Pastel brown")
- o90.RightArmColor = BrickColor.new("Pastel brown")
- o90.RightLegColor = BrickColor.new("Pastel brown")
- o90.TorsoColor = BrickColor.new("Pastel brown")
- o91.Name = "Pants"
- o91.Parent = o4
- o91.PantsTemplate = "http://www.roblox.com/asset/?id=1439542143"
- o92.Name = "Shirt"
- o92.Parent = o4
- o92.ShirtTemplate = "http://www.roblox.com/asset/?id=1439532842"
- o94.Name = "Handle"
- o94.Parent = mas
- o94.Position = Vector3.new(45.1692505, 4.86831141, 17.736681)
- o94.Rotation = Vector3.new(0, -35.5099983, 0)
- o94.RotVelocity = Vector3.new(-7.95405924e-07, 8.80337605e-15, 2.12652571e-06)
- o94.Velocity = Vector3.new(-4.70551686e-06, -0.0988538861, -1.7600521e-06)
- o94.CanCollide = false
- o94.Locked = true
- o94.FormFactor = Enum.FormFactor.Custom
- o94.Size = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o94.CFrame = CFrame.new(45.1692505, 4.86831141, 17.736681, 0.814045668, -6.57990853e-08, -0.580800891, 6.78578331e-08, 1, -1.81812929e-08, 0.580800891, -2.4611488e-08, 0.814045668)
- o94.BottomSurface = Enum.SurfaceType.Smooth
- o94.TopSurface = Enum.SurfaceType.Smooth
- o94.Position = Vector3.new(45.1692505, 4.86831141, 17.736681)
- o94.velocity = Vector3.new(-4.70551686e-06, -0.0988538861, -1.7600521e-06)
- o95.Parent = o94
- o95.MeshId = "http://www.roblox.com/asset/?id=188565062 "
- o95.TextureId = "http://www.roblox.com/asset/?id=188565095 "
- o95.MeshType = Enum.MeshType.FileMesh
- o97.Name = "OriginalSize"
- o97.Parent = o94
- o97.Value = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o98.Name = "AccessoryWeld"
- o98.Parent = o94
- o98.C0 = CFrame.new(8.65748007e-09, 0.199999809, -0.0252722446, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o98.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o98.Part0 = o94
- o98.Part1 = o5
- o99.Name = "Chest"
- o99.Parent = o4
- o100.Parent = o99
- o100.BrickColor = BrickColor.new("Light orange")
- o100.Position = Vector3.new(45.1839294, 4.43847609, 17.7161083)
- o100.Rotation = Vector3.new(0, -35.5099983, 0)
- o100.RotVelocity = Vector3.new(-8.32025592e-07, 1.01844294e-14, 2.22443464e-06)
- o100.Velocity = Vector3.new(-3.96510995e-06, -0.158884585, -1.48310619e-06)
- o100.CanCollide = false
- o100.Locked = true
- o100.FormFactor = Enum.FormFactor.Symmetric
- o100.Size = Vector3.new(2, 1, 1)
- o100.CFrame = CFrame.new(45.1839294, 4.43847609, 17.7161083, 0.814045668, 5.84624154e-08, -0.580800891, -6.02916046e-08, 1, 1.61540701e-08, 0.580800891, 2.18672653e-08, 0.814045668)
- o100.TopSurface = Enum.SurfaceType.Smooth
- o100.Color = Color3.new(0.917647, 0.721569, 0.572549)
- o100.Position = Vector3.new(45.1839294, 4.43847609, 17.7161083)
- o100.velocity = Vector3.new(-3.96510995e-06, -0.158884585, -1.48310619e-06)
- o101.Parent = o100
- o101.Offset = Vector3.new(0, 0.200000003, 0)
- o101.Scale = Vector3.new(0.800000012, 1.60000002, 1.60000002)
- o102.Parent = o100
- o102.Texture = "http://www.roblox.com/asset/?id=36047347"
- o102.Face = Enum.NormalId.Bottom
- o103.Parent = o100
- o103.Texture = "http://www.roblox.com/asset/?id=36047330"
- o103.Face = Enum.NormalId.Back
- o104.Parent = o100
- o104.Texture = "http://www.roblox.com/asset/?id=36047341"
- o104.Face = Enum.NormalId.Top
- o105.Parent = o100
- o105.Texture = "http://www.roblox.com/asset/?id=36047315"
- o105.Face = Enum.NormalId.Right
- o106.Parent = o100
- o106.Texture = "http://www.roblox.com/asset/?id=36047323"
- o106.Face = Enum.NormalId.Left
- o107.Parent = o100
- o107.Texture = "http://www.roblox.com/asset/?id=36047310"
- o108.Name = "DeathScript"
- o108.Parent = o100
- runDummyScript(function()
- local human
- while true do
- human = script.Parent.Parent.Parent:FindFirstChild("Humanoid")
- if human ~= nil then
- break
- else
- wait(5)
- end
- end
- function onDeath()
- script.Parent.CanCollide = true
- script.Parent.Parent.Middle.CanCollide = true
- script.Parent.Parent.Parent.Arm1.Middle.CanCollide = true
- script.Parent.Parent.Parent.Arm2.Middle.CanCollide = true
- script.Parent.Parent.Parent.Leg1.Middle.CanCollide = true
- script.Parent.Parent.Parent.Leg2.Middle.CanCollide = true
- end
- human.Died:connect(onDeath)
- end,o108)
- o109.Name = "Middle"
- o109.Parent = o99
- o109.Position = Vector3.new(45.1839294, 2.97163534, 17.7161083)
- o109.Rotation = Vector3.new(0, -35.5099983, 0)
- o109.RotVelocity = Vector3.new(6.99950419e-07, 6.8143682e-15, -1.87134401e-06)
- o109.Velocity = Vector3.new(5.85304292e-07, 0.181635305, 2.18924995e-07)
- o109.CanCollide = false
- o109.Locked = true
- o109.FormFactor = Enum.FormFactor.Symmetric
- o109.Size = Vector3.new(2, 2, 1)
- o109.CFrame = CFrame.new(45.1839294, 2.97163534, 17.7161083, 0.814045668, 8.97444963e-08, -0.580800891, -9.25522414e-08, 1, 2.47980747e-08, 0.580800891, 3.35676589e-08, 0.814045668)
- o109.LeftSurface = Enum.SurfaceType.Weld
- o109.RightSurface = Enum.SurfaceType.Weld
- o109.Position = Vector3.new(45.1839294, 2.97163534, 17.7161083)
- o109.velocity = Vector3.new(5.85304292e-07, 0.181635305, 2.18924995e-07)
- o110.Name = "roblox"
- o110.Parent = o109
- o111.Parent = o109
- o111.maxTorque = Vector3.new(0, 0, 0)
- o111.MaxTorque = Vector3.new(0, 0, 0)
- o112.Parent = o109
- o112.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- o113.Parent = o109
- o113.Texture = "http://www.roblox.com/asset/?id=38934753"
- o114.Parent = o109
- o114.Texture = "http://www.roblox.com/asset/?id=38934762"
- o114.Face = Enum.NormalId.Right
- o115.Parent = o109
- o115.Texture = "http://www.roblox.com/asset/?id=38934762"
- o115.Face = Enum.NormalId.Left
- o116.Parent = o109
- o116.Texture = "http://www.roblox.com/asset/?id=38934731"
- o116.Face = Enum.NormalId.Back
- o117.Parent = o109
- o117.Texture = "http://www.roblox.com/asset/?id=38934780"
- o117.Face = Enum.NormalId.Top
- o118.Parent = o109
- o118.Texture = "http://www.roblox.com/asset/?id=38934740"
- o118.Face = Enum.NormalId.Bottom
- o119.Parent = o109
- o119.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o119.C1 = CFrame.new(0, -1.50001192, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o119.Part0 = o109
- o119.Part1 = o100
- o120.Parent = o109
- o120.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o120.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o120.Part0 = o109
- o120.Part1 = o109
- o121.Name = "Arm2"
- o121.Parent = o4
- o122.Name = "Middle"
- o122.Parent = o121
- o122.BrickColor = BrickColor.new("Light orange")
- o122.Position = Vector3.new(46.4081688, 2.95613194, 18.5827065)
- o122.Rotation = Vector3.new(0.349999994, -35.1499977, 0.189999998)
- o122.RotVelocity = Vector3.new(5.44140278e-07, 4.05322121e-15, -1.45479544e-06)
- o122.Velocity = Vector3.new(4.34361482e-07, -0.304247439, 1.6246517e-07)
- o122.CanCollide = false
- o122.Locked = true
- o122.FormFactor = Enum.FormFactor.Symmetric
- o122.Size = Vector3.new(1, 2, 1)
- o122.CFrame = CFrame.new(46.4081688, 2.95613194, 18.5827065, 0.817628503, -0.0027554878, -0.575739563, -0.000136445786, 0.999987602, -0.00497969612, 0.575746179, 0.00415009446, 0.817618012)
- o122.Color = Color3.new(0.917647, 0.721569, 0.572549)
- o122.Position = Vector3.new(46.4081688, 2.95613194, 18.5827065)
- o122.velocity = Vector3.new(4.34361482e-07, -0.304247439, 1.6246517e-07)
- o123.Parent = o122
- o123.Texture = "http://www.roblox.com/asset/?id=38934568"
- o123.Face = Enum.NormalId.Bottom
- o124.Parent = o122
- o124.Texture = "http://www.roblox.com/asset/?id=38934613"
- o124.Face = Enum.NormalId.Top
- o125.Parent = o122
- o125.Texture = "http://www.roblox.com/asset/?id=38934581"
- o126.Parent = o122
- o126.Texture = "http://www.roblox.com/asset/?id=38934591"
- o126.Face = Enum.NormalId.Right
- o127.Parent = o122
- o127.Texture = "http://www.roblox.com/asset/?id=38934560"
- o127.Face = Enum.NormalId.Back
- o128.Parent = o122
- o128.Texture = "http://www.roblox.com/asset/?id=38934601"
- o128.Face = Enum.NormalId.Left
- o129.Parent = o122
- o129.Offset = Vector3.new(-0.300000012, 0, 0)
- o129.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- o130.Parent = o122
- o130.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o130.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o130.Part0 = o122
- o130.Part1 = o122
- o131.Name = "Leg1"
- o131.Parent = o4
- o132.Name = "Middle"
- o132.Parent = o131
- o132.BrickColor = BrickColor.new("Br. yellowish green")
- o132.Position = Vector3.new(44.7769051, 0.96840775, 17.4257088)
- o132.Rotation = Vector3.new(0, -35.5099983, 0)
- o132.RotVelocity = Vector3.new(5.14148667e-07, 3.64952065e-15, -1.37461734e-06)
- o132.Velocity = Vector3.new(-2.3226894e-06, 0.167274505, -8.68756445e-07)
- o132.CanCollide = false
- o132.Locked = true
- o132.FormFactor = Enum.FormFactor.Symmetric
- o132.Size = Vector3.new(1, 2, 1)
- o132.CFrame = CFrame.new(44.7769051, 0.96840775, 17.4257088, 0.814045668, -4.17685513e-08, -0.580800891, 4.3075211e-08, 1, -1.1541581e-08, 0.580800891, -1.56227475e-08, 0.814045668)
- o132.BottomSurface = Enum.SurfaceType.Smooth
- o132.Color = Color3.new(0.643137, 0.741176, 0.278431)
- o132.Position = Vector3.new(44.7769051, 0.96840775, 17.4257088)
- o132.velocity = Vector3.new(-2.3226894e-06, 0.167274505, -8.68756445e-07)
- o133.Parent = o132
- o133.Offset = Vector3.new(0.100000001, 0, 0)
- o133.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- o134.Parent = o132
- o134.Texture = "http://www.roblox.com/asset/?id=38936226"
- o135.Parent = o132
- o135.Texture = "http://www.roblox.com/asset/?id=38936255"
- o135.Face = Enum.NormalId.Left
- o136.Parent = o132
- o136.Texture = "http://www.roblox.com/asset/?id=38936242"
- o136.Face = Enum.NormalId.Right
- o137.Parent = o132
- o137.Texture = "http://www.roblox.com/asset/?id=38936209"
- o137.Face = Enum.NormalId.Back
- o138.Parent = o132
- o138.Texture = "http://www.roblox.com/asset/?id=38934719"
- o138.Face = Enum.NormalId.Top
- o139.Parent = o132
- o139.Texture = "http://www.roblox.com/asset/?id=38934712"
- o139.Face = Enum.NormalId.Bottom
- o140.Parent = o132
- o140.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o140.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o140.Part0 = o132
- o140.Part1 = o132
- o141.Name = "Leg2"
- o141.Parent = o4
- o142.Name = "Middle"
- o142.Parent = o141
- o142.BrickColor = BrickColor.new("Br. yellowish green")
- o142.Position = Vector3.new(45.5959358, 0.968318582, 17.9995232)
- o142.Rotation = Vector3.new(0.599999964, -35.5099983, 0.349999994)
- o142.RotVelocity = Vector3.new(-9.39738186e-07, 1.22918787e-14, 2.51247047e-06)
- o142.Velocity = Vector3.new(4.23901884e-06, 0.039614778, 1.58551825e-06)
- o142.CanCollide = false
- o142.Locked = true
- o142.FormFactor = Enum.FormFactor.Symmetric
- o142.Size = Vector3.new(1, 2, 1)
- o142.CFrame = CFrame.new(45.5959358, 0.968318582, 17.9995232, 0.814045668, -0.00498333899, -0.580779493, 3.36844153e-08, 0.999963164, -0.00858006906, 0.580800891, 0.00698454818, 0.814015687)
- o142.BottomSurface = Enum.SurfaceType.Smooth
- o142.Color = Color3.new(0.643137, 0.741176, 0.278431)
- o142.Position = Vector3.new(45.5959358, 0.968318582, 17.9995232)
- o142.velocity = Vector3.new(4.23901884e-06, 0.039614778, 1.58551825e-06)
- o143.Parent = o142
- o143.Offset = Vector3.new(-0.100000001, 0, 0)
- o143.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- o144.Parent = o142
- o144.Texture = "http://www.roblox.com/asset/?id=38936226"
- o145.Parent = o142
- o145.Texture = "http://www.roblox.com/asset/?id=38936255"
- o145.Face = Enum.NormalId.Left
- o146.Parent = o142
- o146.Texture = "http://www.roblox.com/asset/?id=38936242"
- o146.Face = Enum.NormalId.Right
- o147.Parent = o142
- o147.Texture = "http://www.roblox.com/asset/?id=38936209"
- o147.Face = Enum.NormalId.Back
- o148.Parent = o142
- o148.Texture = "http://www.roblox.com/asset/?id=38934719"
- o148.Face = Enum.NormalId.Top
- o149.Parent = o142
- o149.Texture = "http://www.roblox.com/asset/?id=38934712"
- o149.Face = Enum.NormalId.Bottom
- o150.Parent = o142
- o150.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o150.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o150.Part0 = o142
- o150.Part1 = o142
- o151.Name = "Arm1"
- o151.Parent = o4
- o152.Name = "Middle"
- o152.Parent = o151
- o152.BrickColor = BrickColor.new("Light orange")
- o152.Position = Vector3.new(43.996048, 2.98104191, 16.7983818)
- o152.Rotation = Vector3.new(8.03999996, -35.2399979, 4.65999985)
- o152.RotVelocity = Vector3.new(6.87771376e-07, 5.64605354e-15, -1.83882344e-06)
- o152.Velocity = Vector3.new(5.81158076e-07, 0.218425527, 2.17369347e-07)
- o152.CanCollide = false
- o152.Locked = true
- o152.FormFactor = Enum.FormFactor.Symmetric
- o152.Size = Vector3.new(1, 2, 1)
- o152.CFrame = CFrame.new(43.996048, 2.98104191, 16.7983818, 0.814045668, -0.0663845763, -0.576994598, 8.30649185e-08, 0.993446469, -0.114298224, 0.580800951, 0.0930439159, 0.808710814)
- o152.Color = Color3.new(0.917647, 0.721569, 0.572549)
- o152.Position = Vector3.new(43.996048, 2.98104191, 16.7983818)
- o152.velocity = Vector3.new(5.81158076e-07, 0.218425527, 2.17369347e-07)
- o153.Parent = o152
- o153.Texture = "http://www.roblox.com/asset/?id=38934568"
- o153.Face = Enum.NormalId.Bottom
- o154.Parent = o152
- o154.Texture = "http://www.roblox.com/asset/?id=38934613"
- o154.Face = Enum.NormalId.Top
- o155.Parent = o152
- o155.Texture = "http://www.roblox.com/asset/?id=38934581"
- o156.Parent = o152
- o156.Texture = "http://www.roblox.com/asset/?id=38934591"
- o156.Face = Enum.NormalId.Right
- o157.Parent = o152
- o157.Texture = "http://www.roblox.com/asset/?id=38934560"
- o157.Face = Enum.NormalId.Back
- o158.Parent = o152
- o158.Texture = "http://www.roblox.com/asset/?id=38934601"
- o158.Face = Enum.NormalId.Left
- o159.Parent = o152
- o159.Offset = Vector3.new(0.300000012, 0, 0)
- o159.Scale = Vector3.new(0.800000012, 1, 0.800000012)
- o160.Parent = o152
- o160.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o160.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o160.Part0 = o152
- o160.Part1 = o152
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = script
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- mess_handle.Text = "Resetting"
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- v:LoadCharacter()
- end
- wait(1)
- mess_handle:Remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement