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"
- o3 = Instance.new("Model")
- o4 = Instance.new("Model")
- o5 = Instance.new("Model")
- o6 = Instance.new("Part")
- o7 = Instance.new("SpecialMesh")
- o8 = Instance.new("Part")
- o9 = Instance.new("SpecialMesh")
- o10 = Instance.new("Part")
- o11 = Instance.new("SpecialMesh")
- o12 = Instance.new("Part")
- o13 = Instance.new("Script")
- o14 = Instance.new("ClickDetector")
- o15 = Instance.new("Script")
- o16 = Instance.new("Smoke")
- o17 = Instance.new("Script")
- o18 = Instance.new("BlockMesh")
- o19 = Instance.new("Part")
- o20 = Instance.new("BlockMesh")
- o21 = Instance.new("Part")
- o22 = Instance.new("SpecialMesh")
- o23 = Instance.new("Part")
- o24 = Instance.new("SpecialMesh")
- o25 = Instance.new("Part")
- o26 = Instance.new("SpecialMesh")
- o27 = Instance.new("Part")
- o28 = Instance.new("CylinderMesh")
- o29 = Instance.new("Part")
- o30 = Instance.new("SpecialMesh")
- o31 = Instance.new("Part")
- o32 = Instance.new("CylinderMesh")
- o33 = Instance.new("Part")
- o34 = Instance.new("CylinderMesh")
- o35 = Instance.new("Sound")
- o36 = Instance.new("Smoke")
- o37 = Instance.new("Script")
- o38 = Instance.new("Part")
- o39 = Instance.new("CylinderMesh")
- o40 = Instance.new("Part")
- o41 = Instance.new("CylinderMesh")
- o42 = Instance.new("Part")
- o43 = Instance.new("SpecialMesh")
- o44 = Instance.new("Part")
- o45 = Instance.new("CylinderMesh")
- o46 = Instance.new("VehicleSeat")
- o47 = Instance.new("Weld")
- o48 = Instance.new("Part")
- o49 = Instance.new("SpecialMesh")
- o50 = Instance.new("Part")
- o51 = Instance.new("BlockMesh")
- o52 = Instance.new("Part")
- o53 = Instance.new("SpecialMesh")
- o54 = Instance.new("Part")
- o55 = Instance.new("BlockMesh")
- o56 = Instance.new("Part")
- o57 = Instance.new("BlockMesh")
- o58 = Instance.new("Part")
- o59 = Instance.new("SpecialMesh")
- o60 = Instance.new("Part")
- o61 = Instance.new("Part")
- o62 = Instance.new("Part")
- o63 = Instance.new("Part")
- o64 = Instance.new("Model")
- o65 = Instance.new("Part")
- o66 = Instance.new("SpecialMesh")
- o71 = Instance.new("Sound")
- o72 = Instance.new("RemoteEvent")
- o73 = Instance.new("Sound")
- o74 = Instance.new("RemoteEvent")
- o75 = Instance.new("Sound")
- o76 = Instance.new("RemoteEvent")
- o77 = Instance.new("Sound")
- o78 = Instance.new("RemoteEvent")
- o79 = Instance.new("Sound")
- o80 = Instance.new("RemoteEvent")
- o81 = Instance.new("Sound")
- o82 = Instance.new("RemoteEvent")
- o83 = Instance.new("Sound")
- o84 = Instance.new("RemoteEvent")
- o85 = Instance.new("Sound")
- o86 = Instance.new("RemoteEvent")
- o87 = Instance.new("Sound")
- o88 = Instance.new("RemoteEvent")
- o89 = Instance.new("Decal")
- o90 = Instance.new("Part")
- o91 = Instance.new("Decal")
- o100 = Instance.new("Motor6D")
- o101 = Instance.new("Motor6D")
- o102 = Instance.new("Motor6D")
- o103 = Instance.new("Motor6D")
- o104 = Instance.new("Motor6D")
- o105 = Instance.new("Part")
- o108 = Instance.new("Part")
- o111 = Instance.new("Part")
- o113 = Instance.new("Part")
- o115 = Instance.new("Humanoid")
- o118 = Instance.new("Part")
- o120 = Instance.new("Motor6D")
- o121 = Instance.new("Script")
- o122 = Instance.new("LocalScript")
- o123 = Instance.new("Script")
- o124 = Instance.new("LocalScript")
- o125 = Instance.new("StringValue")
- o126 = Instance.new("Animation")
- o127 = Instance.new("NumberValue")
- o128 = Instance.new("Animation")
- o129 = Instance.new("NumberValue")
- o130 = Instance.new("StringValue")
- o131 = Instance.new("Animation")
- o132 = Instance.new("StringValue")
- o133 = Instance.new("Animation")
- o134 = Instance.new("StringValue")
- o135 = Instance.new("Animation")
- o136 = Instance.new("StringValue")
- o137 = Instance.new("Animation")
- o138 = Instance.new("StringValue")
- o139 = Instance.new("Animation")
- o140 = Instance.new("StringValue")
- o141 = Instance.new("Animation")
- o142 = Instance.new("StringValue")
- o143 = Instance.new("Animation")
- o144 = Instance.new("NumberValue")
- o145 = Instance.new("BodyColors")
- o146 = Instance.new("Pants")
- o147 = Instance.new("Shirt")
- o149 = Instance.new("Part")
- o150 = Instance.new("SpecialMesh")
- o152 = Instance.new("Vector3Value")
- o153 = Instance.new("Weld")
- o3.Parent = mas
- o4.Parent = o3
- o5.Parent = o4
- o6.Parent = o5
- o6.BrickColor = BrickColor.new("Dark stone grey")
- o6.Position = Vector3.new(-132.795517, 8.79358292, -11.2341585)
- o6.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
- o6.RotVelocity = Vector3.new(-0.00299954996, 0.000413790403, -0.000806274242)
- o6.Velocity = Vector3.new(0.0137291709, -0.017024124, -0.0225311555)
- o6.Locked = true
- o6.Size = Vector3.new(3, 1.20000005, 2)
- o6.CFrame = CFrame.new(-132.795517, 8.79358292, -11.2341585, 0.961952269, 0.0018707643, 0.273211241, -0.00214518933, 0.999997437, 0.000705718063, -0.273209214, -0.0012649569, 0.961953819)
- o6.BackSurface = Enum.SurfaceType.Weld
- o6.BottomSurface = Enum.SurfaceType.Weld
- o6.FrontSurface = Enum.SurfaceType.Weld
- o6.LeftSurface = Enum.SurfaceType.Weld
- o6.RightSurface = Enum.SurfaceType.Weld
- o6.TopSurface = Enum.SurfaceType.Weld
- o6.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o6.Position = Vector3.new(-132.795517, 8.79358292, -11.2341585)
- o6.velocity = Vector3.new(0.0137291709, -0.017024124, -0.0225311555)
- o7.Parent = o6
- o7.MeshType = Enum.MeshType.Torso
- o8.Parent = o5
- o8.BrickColor = BrickColor.new("Dark stone grey")
- o8.Position = Vector3.new(-134.434998, 8.78941917, -17.0056496)
- o8.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
- o8.RotVelocity = Vector3.new(0.00608392386, 0.000780430855, 0.00306902756)
- o8.Velocity = Vector3.new(-0.0135553963, -0.0159314163, 0.0320526734)
- o8.Locked = true
- o8.Size = Vector3.new(3, 1.20000005, 2)
- o8.CFrame = CFrame.new(-134.434998, 8.78941917, -17.0056496, 0.961951733, 0.00184027455, 0.273213208, -0.00210510753, 0.999997556, 0.000676181866, -0.2732113, -0.00122559746, 0.961953282)
- o8.BackSurface = Enum.SurfaceType.Weld
- o8.BottomSurface = Enum.SurfaceType.Weld
- o8.FrontSurface = Enum.SurfaceType.Weld
- o8.LeftSurface = Enum.SurfaceType.Weld
- o8.RightSurface = Enum.SurfaceType.Weld
- o8.TopSurface = Enum.SurfaceType.Weld
- o8.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o8.Position = Vector3.new(-134.434998, 8.78941917, -17.0056496)
- o8.velocity = Vector3.new(-0.0135553963, -0.0159314163, 0.0320526734)
- o9.Parent = o8
- o9.MeshType = Enum.MeshType.Torso
- o10.Parent = o5
- o10.Position = Vector3.new(-133.614151, 9.3915596, -14.1206102)
- o10.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
- o10.RotVelocity = Vector3.new(0.00107312179, 0.00101654918, 0.00028337253)
- o10.Velocity = Vector3.new(0.00422847597, -0.00450160913, 0.00663938001)
- o10.Locked = true
- o10.Size = Vector3.new(5, 1.20000005, 4)
- o10.CFrame = CFrame.new(-133.614151, 9.3915596, -14.1206102, 0.961951554, 0.00185383158, 0.273213863, -0.00212258054, 0.999997497, 0.000688078871, -0.273211896, -0.00124181691, 0.961953104)
- o10.BackSurface = Enum.SurfaceType.Weld
- o10.BottomSurface = Enum.SurfaceType.Weld
- o10.FrontSurface = Enum.SurfaceType.Weld
- o10.LeftSurface = Enum.SurfaceType.Weld
- o10.RightSurface = Enum.SurfaceType.Weld
- o10.TopSurface = Enum.SurfaceType.Weld
- o10.Position = Vector3.new(-133.614151, 9.3915596, -14.1206102)
- o10.velocity = Vector3.new(0.00422847597, -0.00450160913, 0.00663938001)
- o11.Parent = o10
- o11.Scale = Vector3.new(0.889999986, 1, 1)
- o11.MeshType = Enum.MeshType.Torso
- o12.Name = "Switch"
- o12.Parent = o5
- o12.BrickColor = BrickColor.new("Bright blue")
- o12.Position = Vector3.new(-136.62146, 9.29618359, -14.8258924)
- o12.Rotation = Vector3.new(89.9300003, -0.109999999, -105.860001)
- o12.RotVelocity = Vector3.new(-0.00343973376, 0.000749820727, 0.000173723078)
- o12.Velocity = Vector3.new(0.00544150174, -0.0181603394, -0.024878066)
- o12.Locked = true
- o12.FormFactor = Enum.FormFactor.Plate
- o12.Size = Vector3.new(1, 0.400000006, 1)
- o12.CFrame = CFrame.new(-136.62146, 9.29618359, -14.8258924, -0.273212492, 0.961951911, -0.00184826145, -0.000708246662, -0.00212251628, -0.999997497, -0.961953461, -0.273210496, 0.00126119726)
- o12.BackSurface = Enum.SurfaceType.Weld
- o12.BottomSurface = Enum.SurfaceType.Weld
- o12.LeftSurface = Enum.SurfaceType.Weld
- o12.RightSurface = Enum.SurfaceType.Weld
- o12.TopSurface = Enum.SurfaceType.Smooth
- o12.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- o12.Position = Vector3.new(-136.62146, 9.29618359, -14.8258924)
- o12.velocity = Vector3.new(0.00544150174, -0.0181603394, -0.024878066)
- o13.Name = "CannonBall"
- o13.Parent = o12
- o13.Disabled = true
- runDummyScript(function()
- ball = script.Parent
- damage = 100
- function onTouched(hit)
- local humanoid = hit.Parent:findFirstChild("Humanoid")
- if humanoid~=nil then
- tagHumanoid(humanoid)
- humanoid.Health = 0
- wait()
- untagHumanoid(humanoid)
- connection:disconnect()
- else
- damage = damage / 2
- if damage < 2 then
- connection:disconnect()
- ball.Parent = nil
- end
- end
- explosion = Instance.new("Explosion")
- explosion.BlastRadius = 20
- explosion.BlastPressure = 800000
- explosion.Position = script.Parent.Position
- explosion.Parent = game.Workspace
- connection:disconnect()
- ball.Parent = nil
- end
- function tagHumanoid(humanoid)
- -- todo: make tag expire
- local tag = ball:findFirstChild("creator")
- if tag ~= nil then
- local new_tag = tag:clone()
- new_tag.Parent = humanoid
- end
- end
- function untagHumanoid(humanoid)
- if humanoid ~= nil then
- local tag = humanoid:findFirstChild("creator")
- if tag ~= nil then
- tag.Parent = nil
- end
- end
- end
- connection = ball.Touched:connect(onTouched)
- r = game:service("RunService")
- t, s = r.Stepped:wait()
- d = t + 5.0 - s
- while t < d do
- t = r.Stepped:wait()
- end
- ball.Parent = nil
- end,o13)
- o14.Parent = o12
- o14.MaxActivationDistance = 20
- o15.Name = "FireGun"
- o15.Parent = o12
- runDummyScript(function()
- local switch = script.Parent
- local debounce = false
- local cannonBall = Instance.new("Part")
- cannonBall.Size = Vector3.new(3,3,3)
- cannonBall.BrickColor = BrickColor.new(1)
- cannonBall.Shape = 0
- cannonBall.BottomSurface = 0
- cannonBall.TopSurface = 0
- cannonBall.Name = "Cannon Shot"
- cannonBall.Elasticity = .1
- cannonBall.Reflectance = 0
- cannonBall.Friction = 0
- function fire(gun)
- local sound = gun:findFirstChild("Fire")
- if sound == nil then
- sound = Instance.new("Sound")
- sound.Name = "Fire"
- sound.SoundId = "http://www.roblox.com/asset?id=2101148"
- sound.Pitch = 1
- sound.Volume = 1
- sound.Parent = gun
- end
- sound:play()
- local smoke = gun:findFirstChild("Smoke")
- if smoke == nil then
- smoke = switch.Smoke:clone()
- smoke.Parent = gun
- smoke.Script.Disabled = false
- end
- smoke.Enabled = true
- local spawnPos = (gun.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)) * Vector3.new(0, 0, -15)
- local v = (gun.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)).lookVector * 800
- local missile = cannonBall:clone()
- missile.Position = spawnPos
- missile.Velocity = v
- local force = Instance.new("BodyForce")
- force.force = Vector3.new(0,(missile:GetMass() * 95),0)
- force.Parent = missile
- local new_script = script.Parent.CannonBall:clone()
- new_script.Disabled = false
- new_script.Parent = missile
- missile.Parent = game.Workspace
- game.Debris:AddItem(missile,14)
- end
- function onClicked()
- if debounce == false then
- debounce = true
- switch.BrickColor = BrickColor.new("Bright red")
- fire(script.Parent.Parent.Gun)
- wait(1)
- debounce = false
- switch.BrickColor = BrickColor.new("Bright blue")
- end
- end
- script.Parent.ClickDetector.MouseClick:connect(onClicked)
- end,o15)
- o16.Parent = o12
- o16.Color = Color3.new(0.109804, 0.109804, 0.109804)
- o16.Enabled = false
- o16.RiseVelocity = 8
- o17.Parent = o16
- o17.Disabled = true
- runDummyScript(function()
- function Check()
- if script.Parent.Enabled == true then
- wait(0.25)
- script.Parent.Enabled = false
- end
- end
- script.Parent.Changed:connect(Check)
- end,o17)
- o18.Parent = o12
- o18.Scale = Vector3.new(1, 1, 0.5)
- o19.Parent = o5
- o19.Position = Vector3.new(-132.18013, 4.58837748, -14.5245323)
- o19.Rotation = Vector3.new(179.559998, 74.1399994, -179.610001)
- o19.RotVelocity = Vector3.new(-0.00291023683, 0.00142147497, 0.000273291487)
- o19.Velocity = Vector3.new(0.00543753896, -0.0111651057, -0.0144352363)
- o19.Locked = true
- o19.Size = Vector3.new(2, 1.20000005, 2)
- o19.CFrame = CFrame.new(-132.18013, 4.58837748, -14.5245323, -0.273215503, 0.00183905393, 0.961951077, -0.000709586253, 0.999997497, -0.00211332925, -0.961952567, -0.00125998154, -0.273213506)
- o19.BackSurface = Enum.SurfaceType.Weld
- o19.BottomSurface = Enum.SurfaceType.Weld
- o19.FrontSurface = Enum.SurfaceType.Weld
- o19.LeftSurface = Enum.SurfaceType.Weld
- o19.RightSurface = Enum.SurfaceType.Weld
- o19.TopSurface = Enum.SurfaceType.Weld
- o19.Position = Vector3.new(-132.18013, 4.58837748, -14.5245323)
- o19.velocity = Vector3.new(0.00543753896, -0.0111651057, -0.0144352363)
- o20.Parent = o19
- o21.Parent = o5
- o21.Position = Vector3.new(-133.208786, 6.99258947, -12.6747847)
- o21.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
- o21.RotVelocity = Vector3.new(-0.00233547692, 0.00106526236, -0.00141616841)
- o21.Velocity = Vector3.new(0.0137156602, -0.00905784592, -0.0153651778)
- o21.Locked = true
- o21.Size = Vector3.new(5, 3.60000014, 1)
- o21.CFrame = CFrame.new(-133.208786, 6.99258947, -12.6747847, -0.961951494, 0.00185312005, -0.273213983, 0.00212600199, 0.999997497, -0.000702729158, 0.273212016, -0.00125684496, -0.961953044)
- o21.BackSurface = Enum.SurfaceType.Weld
- o21.BottomSurface = Enum.SurfaceType.Weld
- o21.FrontSurface = Enum.SurfaceType.Weld
- o21.LeftSurface = Enum.SurfaceType.Weld
- o21.RightSurface = Enum.SurfaceType.Weld
- o21.TopSurface = Enum.SurfaceType.Weld
- o21.Position = Vector3.new(-133.208786, 6.99258947, -12.6747847)
- o21.velocity = Vector3.new(0.0137156602, -0.00905784592, -0.0153651778)
- o22.Parent = o21
- o22.MeshType = Enum.MeshType.Torso
- o23.Parent = o5
- o23.BrickColor = BrickColor.new("Mid gray")
- o23.Position = Vector3.new(-131.694641, 6.98722792, -14.6641645)
- o23.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
- o23.RotVelocity = Vector3.new(-0.00249349466, 0.000972564099, -0.00249066437)
- o23.Velocity = Vector3.new(0.0162097961, -0.0195786767, -0.0175110158)
- o23.Locked = true
- o23.Size = Vector3.new(1, 3.60000014, 2)
- o23.CFrame = CFrame.new(-131.694641, 6.98722792, -14.6641645, -0.961951494, 0.00187182252, -0.273213834, 0.002145743, 0.999997437, -0.00070378196, 0.273211837, -0.00126325083, -0.961953044)
- o23.BackSurface = Enum.SurfaceType.Weld
- o23.BottomSurface = Enum.SurfaceType.Weld
- o23.FrontSurface = Enum.SurfaceType.Weld
- o23.LeftSurface = Enum.SurfaceType.Weld
- o23.RightSurface = Enum.SurfaceType.Weld
- o23.TopSurface = Enum.SurfaceType.Weld
- o23.Color = Color3.new(0.803922, 0.803922, 0.803922)
- o23.Position = Vector3.new(-131.694641, 6.98722792, -14.6641645)
- o23.velocity = Vector3.new(0.0162097961, -0.0195786767, -0.0175110158)
- o24.Parent = o23
- o24.MeshType = Enum.MeshType.Torso
- o25.Parent = o5
- o25.BrickColor = BrickColor.new("Dark stone grey")
- o25.Position = Vector3.new(-132.373871, 6.89333916, -10.8327341)
- o25.Rotation = Vector3.new(-0.0399999991, 15.8599997, 89.8899994)
- o25.RotVelocity = Vector3.new(-0.00182265427, 0.0012148415, -0.00102851947)
- o25.Velocity = Vector3.new(0.0148531571, -0.00633196067, -0.0134898312)
- o25.Locked = true
- o25.Size = Vector3.new(1, 2.4000001, 1)
- o25.CFrame = CFrame.new(-132.373871, 6.89333916, -10.8327341, 0.00187461742, -0.961951256, 0.273214728, 0.999997437, 0.00214804546, 0.000701654528, -0.00126183499, 0.273212701, 0.961952806)
- o25.BackSurface = Enum.SurfaceType.Weld
- o25.BottomSurface = Enum.SurfaceType.Weld
- o25.FrontSurface = Enum.SurfaceType.Weld
- o25.LeftSurface = Enum.SurfaceType.Weld
- o25.RightSurface = Enum.SurfaceType.Weld
- o25.TopSurface = Enum.SurfaceType.Weld
- o25.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o25.Position = Vector3.new(-132.373871, 6.89333916, -10.8327341)
- o25.velocity = Vector3.new(0.0148531571, -0.00633196067, -0.0134898312)
- o26.Parent = o25
- o26.MeshType = Enum.MeshType.Torso
- o27.Name = "Smooth Block Model"
- o27.Parent = o5
- o27.Position = Vector3.new(-132.660812, 7.79399204, -10.7518921)
- o27.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
- o27.RotVelocity = Vector3.new(-0.00159689877, 0.000973881339, 0.00018386131)
- o27.Velocity = Vector3.new(0.0089943381, -0.00388312666, -0.0137049453)
- o27.Locked = true
- o27.FormFactor = Enum.FormFactor.Plate
- o27.Size = Vector3.new(1, 0.800000012, 1)
- o27.CFrame = CFrame.new(-132.660812, 7.79399204, -10.7518921, -0.961951554, 0.0018624143, -0.273213804, 0.00213557924, 0.999997497, -0.000702432066, 0.273211807, -0.00125917525, -0.961953104)
- o27.BackSurface = Enum.SurfaceType.Weld
- o27.BottomSurface = Enum.SurfaceType.Weld
- o27.FrontSurface = Enum.SurfaceType.Weld
- o27.LeftSurface = Enum.SurfaceType.Weld
- o27.RightSurface = Enum.SurfaceType.Weld
- o27.TopSurface = Enum.SurfaceType.Weld
- o27.Position = Vector3.new(-132.660812, 7.79399204, -10.7518921)
- o27.velocity = Vector3.new(0.0089943381, -0.00388312666, -0.0137049453)
- o28.Parent = o27
- o28.Scale = Vector3.new(1, 2, 1)
- o29.Parent = o5
- o29.Position = Vector3.new(-134.028442, 6.99044323, -15.5606823)
- o29.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
- o29.RotVelocity = Vector3.new(-0.00409532944, 0.00102448335, 0.00157562341)
- o29.Velocity = Vector3.new(0.000179392518, -0.0231168214, -0.0219743215)
- o29.Locked = true
- o29.Size = Vector3.new(5, 3.60000014, 1)
- o29.CFrame = CFrame.new(-134.028442, 6.99044323, -15.5606823, -0.961951435, 0.0018474235, -0.273214251, 0.0021229845, 0.999997497, -0.000712954206, 0.273212224, -0.0012658569, -0.961952925)
- o29.BackSurface = Enum.SurfaceType.Weld
- o29.BottomSurface = Enum.SurfaceType.Weld
- o29.FrontSurface = Enum.SurfaceType.Weld
- o29.LeftSurface = Enum.SurfaceType.Weld
- o29.RightSurface = Enum.SurfaceType.Weld
- o29.TopSurface = Enum.SurfaceType.Weld
- o29.Position = Vector3.new(-134.028442, 6.99044323, -15.5606823)
- o29.velocity = Vector3.new(0.000179392518, -0.0231168214, -0.0219743215)
- o30.Parent = o29
- o30.MeshType = Enum.MeshType.Torso
- o31.Name = "Smooth Block Model"
- o31.Parent = o5
- o31.Position = Vector3.new(-130.642441, 6.88951349, -11.3245296)
- o31.Rotation = Vector3.new(179.959991, -15.8599997, 90.1100006)
- o31.RotVelocity = Vector3.new(-0.00392165966, 0.000615938334, 0.000664196035)
- o31.Velocity = Vector3.new(0.00663693296, -0.00728883827, -0.0225109309)
- o31.Locked = true
- o31.FormFactor = Enum.FormFactor.Plate
- o31.Size = Vector3.new(1, 1.20000005, 1)
- o31.CFrame = CFrame.new(-130.642441, 6.88951349, -11.3245296, -0.00185461598, -0.961951852, -0.273212701, -0.999997497, 0.00212993263, -0.00071109907, 0.00126596761, 0.273210675, -0.961953402)
- o31.BackSurface = Enum.SurfaceType.Weld
- o31.BottomSurface = Enum.SurfaceType.Weld
- o31.FrontSurface = Enum.SurfaceType.Weld
- o31.LeftSurface = Enum.SurfaceType.Weld
- o31.RightSurface = Enum.SurfaceType.Weld
- o31.TopSurface = Enum.SurfaceType.Weld
- o31.Position = Vector3.new(-130.642441, 6.88951349, -11.3245296)
- o31.velocity = Vector3.new(0.00663693296, -0.00728883827, -0.0225109309)
- o32.Parent = o31
- o32.Scale = Vector3.new(1, 3, 1)
- o33.Name = "Gun"
- o33.Parent = o5
- o33.BrickColor = BrickColor.new("Really black")
- o33.Position = Vector3.new(-129.584259, 6.88714123, -11.6250658)
- o33.Rotation = Vector3.new(-90.0699997, 0.109999999, -74.1399994)
- o33.RotVelocity = Vector3.new(-0.00383019145, 0.00056818407, 0.000126178085)
- o33.Velocity = Vector3.new(0.00865810458, -0.00888883974, -0.0229801033)
- o33.Locked = true
- o33.FormFactor = Enum.FormFactor.Symmetric
- o33.Size = Vector3.new(1, 1, 1)
- o33.CFrame = CFrame.new(-129.584259, 6.88714123, -11.6250658, 0.273212284, 0.961951971, 0.00186316785, 0.000710154942, -0.00213855412, 0.999997437, 0.961953521, -0.273210287, -0.00126741419)
- o33.BackSurface = Enum.SurfaceType.Weld
- o33.BottomSurface = Enum.SurfaceType.Weld
- o33.FrontSurface = Enum.SurfaceType.Weld
- o33.LeftSurface = Enum.SurfaceType.Weld
- o33.RightSurface = Enum.SurfaceType.Weld
- o33.TopSurface = Enum.SurfaceType.Weld
- o33.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o33.Position = Vector3.new(-129.584259, 6.88714123, -11.6250658)
- o33.velocity = Vector3.new(0.00865810458, -0.00888883974, -0.0229801033)
- o34.Parent = o33
- o34.Scale = Vector3.new(1.20000005, 1, 1.20000005)
- o35.Name = "Fire"
- o35.Parent = o33
- o35.SoundId = "http://www.roblox.com/asset?id=2101148"
- o35.Volume = 1
- o36.Parent = o33
- o36.Color = Color3.new(0.109804, 0.109804, 0.109804)
- o36.Enabled = false
- o36.RiseVelocity = 8
- o37.Parent = o36
- runDummyScript(function()
- function Check()
- if script.Parent.Enabled == true then
- wait(0.25)
- script.Parent.Enabled = false
- end
- end
- script.Parent.Changed:connect(Check)
- end,o37)
- o38.Name = "Gun"
- o38.Parent = o5
- o38.BrickColor = BrickColor.new("Really black")
- o38.Position = Vector3.new(-131.496765, 6.88219929, -18.3587475)
- o38.Rotation = Vector3.new(-90.0699997, 0.109999999, -74.1399994)
- o38.RotVelocity = Vector3.new(-0.00417036097, 0.000950930291, 0.000697736861)
- o38.Velocity = Vector3.new(0.00106051425, -0.0337170437, -0.0244025681)
- o38.Locked = true
- o38.FormFactor = Enum.FormFactor.Symmetric
- o38.Size = Vector3.new(1, 1, 1)
- o38.CFrame = CFrame.new(-131.496765, 6.88219929, -18.3587475, 0.273214132, 0.961951435, 0.00185392459, 0.00071244064, -0.00212959689, 0.999997497, 0.961952984, -0.273212135, -0.00126716925)
- o38.BackSurface = Enum.SurfaceType.Weld
- o38.BottomSurface = Enum.SurfaceType.Weld
- o38.FrontSurface = Enum.SurfaceType.Weld
- o38.LeftSurface = Enum.SurfaceType.Weld
- o38.RightSurface = Enum.SurfaceType.Weld
- o38.TopSurface = Enum.SurfaceType.Weld
- o38.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o38.Position = Vector3.new(-131.496765, 6.88219929, -18.3587475)
- o38.velocity = Vector3.new(0.00106051425, -0.0337170437, -0.0244025681)
- o39.Parent = o38
- o39.Scale = Vector3.new(1.20000005, 1, 1.20000005)
- o40.Name = "Smooth Block Model"
- o40.Parent = o5
- o40.Position = Vector3.new(-132.554916, 6.8845849, -18.0581875)
- o40.Rotation = Vector3.new(179.959991, -15.8599997, 90.1100006)
- o40.RotVelocity = Vector3.new(-0.00235087913, 0.0012729381, -0.00113409851)
- o40.Velocity = Vector3.new(0.00586256431, -0.022124622, -0.0168664809)
- o40.Locked = true
- o40.FormFactor = Enum.FormFactor.Plate
- o40.Size = Vector3.new(1, 1.20000005, 1)
- o40.CFrame = CFrame.new(-132.554916, 6.8845849, -18.0581875, -0.00186064071, -0.961951137, -0.273215175, -0.999997497, 0.00213423837, -0.000704196107, 0.00126050855, 0.273213148, -0.961952686)
- o40.BackSurface = Enum.SurfaceType.Weld
- o40.BottomSurface = Enum.SurfaceType.Weld
- o40.FrontSurface = Enum.SurfaceType.Weld
- o40.LeftSurface = Enum.SurfaceType.Weld
- o40.RightSurface = Enum.SurfaceType.Weld
- o40.TopSurface = Enum.SurfaceType.Weld
- o40.Position = Vector3.new(-132.554916, 6.8845849, -18.0581875)
- o40.velocity = Vector3.new(0.00586256431, -0.022124622, -0.0168664809)
- o41.Parent = o40
- o41.Scale = Vector3.new(1, 3, 1)
- o42.Parent = o5
- o42.BrickColor = BrickColor.new("Dark stone grey")
- o42.Position = Vector3.new(-134.286392, 6.88837337, -17.5664158)
- o42.Rotation = Vector3.new(-0.0399999991, 15.8599997, 89.8899994)
- o42.RotVelocity = Vector3.new(-0.00327797909, 0.000569265627, 9.73321949e-05)
- o42.Velocity = Vector3.new(0.0051581217, -0.0317814052, -0.0170049388)
- o42.Locked = true
- o42.Size = Vector3.new(1, 2.4000001, 1)
- o42.CFrame = CFrame.new(-134.286392, 6.88837337, -17.5664158, 0.00186291547, -0.96195209, 0.273211837, 0.999997437, 0.00213765819, 0.000707926694, -0.00126502512, 0.27320984, 0.96195364)
- o42.BackSurface = Enum.SurfaceType.Weld
- o42.BottomSurface = Enum.SurfaceType.Weld
- o42.FrontSurface = Enum.SurfaceType.Weld
- o42.LeftSurface = Enum.SurfaceType.Weld
- o42.RightSurface = Enum.SurfaceType.Weld
- o42.TopSurface = Enum.SurfaceType.Weld
- o42.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o42.Position = Vector3.new(-134.286392, 6.88837337, -17.5664158)
- o42.velocity = Vector3.new(0.0051581217, -0.0317814052, -0.0170049388)
- o43.Parent = o42
- o43.MeshType = Enum.MeshType.Torso
- o44.Name = "Smooth Block Model"
- o44.Parent = o5
- o44.Position = Vector3.new(-134.573334, 7.78907061, -17.4855652)
- o44.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
- o44.RotVelocity = Vector3.new(-0.00188569503, 0.00110359606, -0.00128656928)
- o44.Velocity = Vector3.new(0.00888236519, -0.0164775308, -0.013150149)
- o44.Locked = true
- o44.FormFactor = Enum.FormFactor.Plate
- o44.Size = Vector3.new(1, 0.800000012, 1)
- o44.CFrame = CFrame.new(-134.573334, 7.78907061, -17.4855652, -0.961951494, 0.00186560571, -0.273213983, 0.00213870569, 0.999997437, -0.000701758079, 0.273211986, -0.00125938153, -0.961953044)
- o44.BackSurface = Enum.SurfaceType.Weld
- o44.BottomSurface = Enum.SurfaceType.Weld
- o44.FrontSurface = Enum.SurfaceType.Weld
- o44.LeftSurface = Enum.SurfaceType.Weld
- o44.RightSurface = Enum.SurfaceType.Weld
- o44.TopSurface = Enum.SurfaceType.Weld
- o44.Position = Vector3.new(-134.573334, 7.78907061, -17.4855652)
- o44.velocity = Vector3.new(0.00888236519, -0.0164775308, -0.013150149)
- o45.Parent = o44
- o45.Scale = Vector3.new(1, 2, 1)
- o46.Parent = o5
- o46.BrickColor = BrickColor.new("Light stone grey")
- o46.Position = Vector3.new(-134.104202, 4.49256992, -13.9779787)
- o46.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
- o46.RotVelocity = Vector3.new(-0.00361638982, 0.00064811646, 0.000531136873)
- o46.Velocity = Vector3.new(0.0068000108, -0.0189370755, -0.0106117744)
- o46.Locked = true
- o46.Size = Vector3.new(2, 1, 2)
- o46.CFrame = CFrame.new(-134.104202, 4.49256992, -13.9779787, 0.273212552, 0.00185650866, -0.961951911, 0.000709909596, 0.999997497, 0.00213156198, 0.961953402, -0.00126526842, 0.273210526)
- o46.BackSurface = Enum.SurfaceType.Weld
- o46.BottomSurface = Enum.SurfaceType.Weld
- o46.FrontSurface = Enum.SurfaceType.Weld
- o46.LeftSurface = Enum.SurfaceType.Weld
- o46.RightSurface = Enum.SurfaceType.Weld
- o46.TopSurface = Enum.SurfaceType.Weld
- o46.MaxSpeed = 10
- o46.Torque = 1
- o46.Color = Color3.new(0.898039, 0.894118, 0.87451)
- o46.Position = Vector3.new(-134.104202, 4.49256992, -13.9779787)
- o46.velocity = Vector3.new(0.0068000108, -0.0189370755, -0.0106117744)
- o47.Name = "SeatWeld"
- o47.Parent = o46
- o47.Archivable = false
- o47.C0 = CFrame.new(0, 0.5, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o47.C1 = CFrame.new(0, -1.5, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
- o47.Part0 = o46
- o47.Part1 = o118
- o48.Parent = o5
- o48.Position = Vector3.new(-134.442673, 4.58942795, -17.0005627)
- o48.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
- o48.RotVelocity = Vector3.new(-0.00202778564, 0.00109578029, -0.00107223727)
- o48.Velocity = Vector3.new(0.00489517115, -0.0161795598, -0.00807946734)
- o48.Locked = true
- o48.Size = Vector3.new(7, 1.20000005, 2)
- o48.CFrame = CFrame.new(-134.442673, 4.58942795, -17.0005627, -0.961951435, 0.00186016143, -0.273214102, 0.00213333499, 0.999997497, -0.000702774792, 0.273212105, -0.00125889247, -0.961952984)
- o48.BackSurface = Enum.SurfaceType.Weld
- o48.BottomSurface = Enum.SurfaceType.Smooth
- o48.FrontSurface = Enum.SurfaceType.Weld
- o48.LeftSurface = Enum.SurfaceType.Weld
- o48.RightSurface = Enum.SurfaceType.Weld
- o48.TopSurface = Enum.SurfaceType.Weld
- o48.Position = Vector3.new(-134.442673, 4.58942795, -17.0005627)
- o48.velocity = Vector3.new(0.00489517115, -0.0161795598, -0.00807946734)
- o49.Parent = o48
- o49.Scale = Vector3.new(1, 2, 1.10000002)
- o49.MeshType = Enum.MeshType.Torso
- o50.Parent = o5
- o50.Position = Vector3.new(-133.213226, 4.59257412, -12.6717863)
- o50.Rotation = Vector3.new(179.550003, 74.1399994, -179.610001)
- o50.RotVelocity = Vector3.new(-0.00408259081, 0.000769795384, 0.000164236728)
- o50.Velocity = Vector3.new(0.00908565708, -0.0117738051, -0.0129809128)
- o50.Locked = true
- o50.Size = Vector3.new(1, 1.20000005, 5)
- o50.CFrame = CFrame.new(-133.213226, 4.59257412, -12.6717863, -0.27321294, 0.0018594506, 0.961951792, -0.000711265544, 0.999997497, -0.00213500601, -0.961953342, -0.00126751442, -0.273210913)
- o50.BackSurface = Enum.SurfaceType.Weld
- o50.BottomSurface = Enum.SurfaceType.Weld
- o50.FrontSurface = Enum.SurfaceType.Weld
- o50.LeftSurface = Enum.SurfaceType.Weld
- o50.RightSurface = Enum.SurfaceType.Weld
- o50.TopSurface = Enum.SurfaceType.Weld
- o50.Position = Vector3.new(-133.213226, 4.59257412, -12.6717863)
- o50.velocity = Vector3.new(0.00908565708, -0.0117738051, -0.0129809128)
- o51.Parent = o50
- o52.Parent = o5
- o52.Position = Vector3.new(-132.803391, 4.59362411, -11.2288504)
- o52.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
- o52.RotVelocity = Vector3.new(-0.00355896261, 0.000553214864, 9.86231098e-05)
- o52.Velocity = Vector3.new(0.00914993789, -0.00956097525, -0.0114497906)
- o52.Locked = true
- o52.Size = Vector3.new(7, 1.20000005, 2)
- o52.CFrame = CFrame.new(-132.803391, 4.59362411, -11.2288504, 0.961952031, 0.00186185399, 0.273212045, -0.002136881, 0.999997437, 0.000709074084, -0.273210049, -0.00126591686, 0.96195358)
- o52.BackSurface = Enum.SurfaceType.Weld
- o52.BottomSurface = Enum.SurfaceType.Smooth
- o52.FrontSurface = Enum.SurfaceType.Weld
- o52.LeftSurface = Enum.SurfaceType.Weld
- o52.RightSurface = Enum.SurfaceType.Weld
- o52.TopSurface = Enum.SurfaceType.Weld
- o52.Position = Vector3.new(-132.803391, 4.59362411, -11.2288504)
- o52.velocity = Vector3.new(0.00914993789, -0.00956097525, -0.0114497906)
- o53.Parent = o52
- o53.Scale = Vector3.new(1, 2, 1.10000002)
- o53.MeshType = Enum.MeshType.Torso
- o54.Parent = o5
- o54.Position = Vector3.new(-134.032837, 4.59044456, -15.5576458)
- o54.Rotation = Vector3.new(179.550003, 74.1399994, -179.610001)
- o54.RotVelocity = Vector3.new(-0.00384912337, 0.000789649901, 0.000177847542)
- o54.Velocity = Vector3.new(0.00672962889, -0.0227337591, -0.0118665574)
- o54.Locked = true
- o54.Size = Vector3.new(1, 1.20000005, 5)
- o54.CFrame = CFrame.new(-134.032837, 4.59044456, -15.5576458, -0.27321291, 0.00186002406, 0.961951792, -0.00071038655, 0.999997497, -0.00213535246, -0.961953342, -0.00126676343, -0.273210883)
- o54.BackSurface = Enum.SurfaceType.Weld
- o54.BottomSurface = Enum.SurfaceType.Weld
- o54.FrontSurface = Enum.SurfaceType.Weld
- o54.LeftSurface = Enum.SurfaceType.Weld
- o54.RightSurface = Enum.SurfaceType.Weld
- o54.TopSurface = Enum.SurfaceType.Weld
- o54.Position = Vector3.new(-134.032837, 4.59044456, -15.5576458)
- o54.velocity = Vector3.new(0.00672962889, -0.0227337591, -0.0118665574)
- o55.Parent = o54
- o56.Parent = o5
- o56.BrickColor = BrickColor.new("Dark stone grey")
- o56.Position = Vector3.new(-135.546951, 4.59576654, -13.5682898)
- o56.Rotation = Vector3.new(179.550003, 74.1399994, -179.610001)
- o56.RotVelocity = Vector3.new(-0.00362602342, 0.000589581323, 0.000368714973)
- o56.Velocity = Vector3.new(0.00744601898, -0.0180878807, -0.0102737518)
- o56.Locked = true
- o56.Size = Vector3.new(2, 1.20000005, 1)
- o56.CFrame = CFrame.new(-135.546951, 4.59576654, -13.5682898, -0.273212135, 0.00185799086, 0.961952031, -0.000709685322, 0.999997497, -0.00213303859, -0.961953521, -0.00126545527, -0.273210138)
- o56.BackSurface = Enum.SurfaceType.Weld
- o56.BottomSurface = Enum.SurfaceType.Weld
- o56.FrontSurface = Enum.SurfaceType.Weld
- o56.LeftSurface = Enum.SurfaceType.Weld
- o56.RightSurface = Enum.SurfaceType.Weld
- o56.TopSurface = Enum.SurfaceType.Weld
- o56.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o56.Position = Vector3.new(-135.546951, 4.59576654, -13.5682898)
- o56.velocity = Vector3.new(0.00744601898, -0.0180878807, -0.0102737518)
- o57.Parent = o56
- o58.Parent = o5
- o58.BrickColor = BrickColor.new("Dark stone grey")
- o58.Position = Vector3.new(-133.625275, 3.39151073, -14.1131954)
- o58.Rotation = Vector3.new(179.959991, -15.8599997, 0.109999999)
- o58.RotVelocity = Vector3.new(-0.00364024681, 0.000637281395, 0.000496431254)
- o58.Velocity = Vector3.new(0.00747687183, -0.0185573604, -0.00733480742)
- o58.Locked = true
- o58.Size = Vector3.new(5, 1.20000005, 4)
- o58.CFrame = CFrame.new(-133.625275, 3.39151073, -14.1131954, 0.961951911, -0.00185659365, -0.273212612, -0.00213165162, -0.999997497, -0.000709913031, -0.273210585, 0.00126529625, -0.961953402)
- o58.BottomSurface = Enum.SurfaceType.Weld
- o58.TopSurface = Enum.SurfaceType.Weld
- o58.Color = Color3.new(0.388235, 0.372549, 0.384314)
- o58.Position = Vector3.new(-133.625275, 3.39151073, -14.1131954)
- o58.velocity = Vector3.new(0.00747687183, -0.0185573604, -0.00733480742)
- o59.Parent = o58
- o59.MeshType = Enum.MeshType.Torso
- o60.Parent = o5
- o60.BrickColor = BrickColor.new("Really black")
- o60.Position = Vector3.new(-131.392365, 2.98060203, -11.6283941)
- o60.Rotation = Vector3.new(-105.720001, 43.579998, -67.8499985)
- o60.Locked = true
- o60.FormFactor = Enum.FormFactor.Symmetric
- o60.Shape = Enum.PartType.Cylinder
- o60.Size = Vector3.new(2, 2, 2)
- o60.CFrame = CFrame.new(-131.392365, 2.98060203, -11.6283941, 0.273208141, 0.670982659, 0.689303696, 0.00073814299, -0.716711462, 0.697369456, 0.961954653, -0.190018207, -0.196306691)
- o60.BottomSurface = Enum.SurfaceType.Smooth
- o60.LeftSurface = Enum.SurfaceType.Hinge
- o60.TopSurface = Enum.SurfaceType.Smooth
- o60.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o60.Position = Vector3.new(-131.392365, 2.98060203, -11.6283941)
- o61.Parent = o5
- o61.BrickColor = BrickColor.new("Really black")
- o61.Position = Vector3.new(-133.031586, 2.97639489, -17.4001045)
- o61.Rotation = Vector3.new(83.0800018, -22.8699989, -107.25)
- o61.Locked = true
- o61.FormFactor = Enum.FormFactor.Symmetric
- o61.Shape = Enum.PartType.Cylinder
- o61.Size = Vector3.new(2, 2, 2)
- o61.CFrame = CFrame.new(-133.031586, 2.97639489, -17.4001045, -0.273202896, 0.87996912, -0.388605833, -0.000696757983, -0.404155374, -0.914690077, -0.961956203, -0.249625221, 0.11102955)
- o61.BottomSurface = Enum.SurfaceType.Smooth
- o61.LeftSurface = Enum.SurfaceType.Hinge
- o61.TopSurface = Enum.SurfaceType.Smooth
- o61.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o61.Position = Vector3.new(-133.031586, 2.97639489, -17.4001045)
- o62.Parent = o5
- o62.BrickColor = BrickColor.new("Really black")
- o62.Position = Vector3.new(-134.278198, 2.99691701, -10.8087835)
- o62.Rotation = Vector3.new(-71.4799957, -48.2599983, -65.7699966)
- o62.Locked = true
- o62.FormFactor = Enum.FormFactor.Symmetric
- o62.Shape = Enum.PartType.Cylinder
- o62.Size = Vector3.new(2, 2, 2)
- o62.CFrame = CFrame.new(-134.278198, 2.99691701, -10.8087835, 0.273206651, 0.607095778, -0.746185541, 0.000710595108, 0.775569022, 0.631262362, 0.96195513, -0.172995299, 0.211459219)
- o62.BottomSurface = Enum.SurfaceType.Smooth
- o62.LeftSurface = Enum.SurfaceType.Hinge
- o62.TopSurface = Enum.SurfaceType.Smooth
- o62.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o62.Position = Vector3.new(-134.278198, 2.99691701, -10.8087835)
- o63.Parent = o5
- o63.BrickColor = BrickColor.new("Really black")
- o63.Position = Vector3.new(-135.91745, 2.99266267, -16.5805092)
- o63.Rotation = Vector3.new(-94.0199966, 13.7399998, 106.339996)
- o63.Locked = true
- o63.FormFactor = Enum.FormFactor.Symmetric
- o63.Shape = Enum.PartType.Cylinder
- o63.Size = Vector3.new(2, 2, 2)
- o63.CFrame = CFrame.new(-135.91745, 2.99266267, -16.5805092, -0.273206145, -0.932174683, 0.237505257, -0.000698235235, 0.247090474, 0.968992174, -0.961955249, 0.264568776, -0.068157509)
- o63.BottomSurface = Enum.SurfaceType.Smooth
- o63.LeftSurface = Enum.SurfaceType.Hinge
- o63.TopSurface = Enum.SurfaceType.Smooth
- o63.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
- o63.Position = Vector3.new(-135.91745, 2.99266267, -16.5805092)
- o64.Name = "timetodie23232223"
- o64.Parent = mas
- o64.Archivable = false
- o64.PrimaryPart = o65
- o65.Name = "Head"
- o65.Parent = o64
- o65.BrickColor = BrickColor.new("Pastel brown")
- o65.Position = Vector3.new(-134.097672, 7.99255943, -13.9824114)
- o65.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
- o65.RotVelocity = Vector3.new(-0.00366616971, 0.000549944642, 0.000128250787)
- o65.Velocity = Vector3.new(0.00730870059, -0.0192007702, -0.0237619039)
- o65.Locked = true
- o65.FormFactor = Enum.FormFactor.Symmetric
- o65.Size = Vector3.new(2, 1, 1)
- o65.CFrame = CFrame.new(-134.097672, 7.99255943, -13.9824114, 0.273212016, 0.00186096458, -0.961952031, 0.000709518034, 0.999997497, 0.00213608216, 0.96195358, -0.00126612559, 0.273210019)
- o65.TopSurface = Enum.SurfaceType.Smooth
- o65.Color = Color3.new(1, 0.8, 0.6)
- o65.Position = Vector3.new(-134.097672, 7.99255943, -13.9824114)
- o65.velocity = Vector3.new(0.00730870059, -0.0192007702, -0.0237619039)
- o66.Parent = o65
- o66.Scale = Vector3.new(1.25, 1.25, 1.25)
- o71.Name = "GettingUp"
- o71.Parent = o65
- o71.Archivable = false
- o71.SoundId = "rbxasset://sounds/action_get_up.mp3"
- o71.Volume = 0.64999997615814
- o72.Name = "CharacterSoundEvent"
- o72.Parent = o71
- o73.Name = "Died"
- o73.Parent = o65
- o73.Archivable = false
- o73.SoundId = "rbxasset://sounds/uuhhh.mp3"
- o73.Volume = 0.64999997615814
- o74.Name = "CharacterSoundEvent"
- o74.Parent = o73
- o75.Name = "FreeFalling"
- o75.Parent = o65
- o75.Archivable = false
- o75.SoundId = "rbxasset://sounds/action_falling.mp3"
- o75.TimePosition = 0.060414153314923
- o75.Volume = 1
- o75.Looped = true
- o76.Name = "CharacterSoundEvent"
- o76.Parent = o75
- o77.Name = "Jumping"
- o77.Parent = o65
- o77.Archivable = false
- o77.SoundId = "rbxasset://sounds/action_jump.mp3"
- o77.Volume = 0.64999997615814
- o78.Name = "CharacterSoundEvent"
- o78.Parent = o77
- o79.Name = "Landing"
- o79.Parent = o65
- o79.Archivable = false
- o79.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- o79.Volume = 1
- o80.Name = "CharacterSoundEvent"
- o80.Parent = o79
- o81.Name = "Splash"
- o81.Parent = o65
- o81.Archivable = false
- o81.SoundId = "rbxasset://sounds/impact_water.mp3"
- o81.Volume = 0.64999997615814
- o82.Name = "CharacterSoundEvent"
- o82.Parent = o81
- o83.Name = "Running"
- o83.Parent = o65
- o83.Archivable = false
- o83.Pitch = 1.8500000238419
- o83.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o83.TimePosition = 1.1257365234617
- o83.Volume = 0.64999997615814
- o83.Looped = true
- o84.Name = "CharacterSoundEvent"
- o84.Parent = o83
- o85.Name = "Swimming"
- o85.Parent = o65
- o85.Archivable = false
- o85.Pitch = 1.6000000238419
- o85.SoundId = "rbxasset://sounds/action_swim.mp3"
- o85.Volume = 0.64999997615814
- o85.Looped = true
- o86.Name = "CharacterSoundEvent"
- o86.Parent = o85
- o87.Name = "Climbing"
- o87.Parent = o65
- o87.Archivable = false
- o87.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- o87.Volume = 0.64999997615814
- o87.Looped = true
- o88.Name = "CharacterSoundEvent"
- o88.Parent = o87
- o89.Name = "face"
- o89.Parent = o65
- o89.Texture = "http://www.roblox.com/asset/?id=13038247"
- o90.Name = "Torso"
- o90.Parent = o64
- o90.BrickColor = BrickColor.new("Pastel brown")
- o90.Position = Vector3.new(-134.100464, 6.49258947, -13.9804831)
- o90.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
- o90.RotVelocity = Vector3.new(-0.00163458323, 0.00098092726, -0.00170538155)
- o90.Velocity = Vector3.new(0.0119806472, -0.0127420211, -0.00988146011)
- o90.Locked = true
- o90.FormFactor = Enum.FormFactor.Symmetric
- o90.Size = Vector3.new(2, 2, 1)
- o90.CFrame = CFrame.new(-134.100464, 6.49258947, -13.9804831, 0.273213685, 0.00186787848, -0.961951554, 0.000700736069, 0.999997437, 0.00214077765, 0.961953104, -0.00125896395, 0.273211688)
- o90.LeftSurface = Enum.SurfaceType.Weld
- o90.RightSurface = Enum.SurfaceType.Weld
- o90.Color = Color3.new(1, 0.8, 0.6)
- o90.Position = Vector3.new(-134.100464, 6.49258947, -13.9804831)
- o90.velocity = Vector3.new(0.0119806472, -0.0127420211, -0.00988146011)
- o91.Name = "roblox"
- o91.Parent = o90
- o100.Name = "Right Shoulder"
- o100.Parent = o90
- o100.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o100.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o100.Part0 = o90
- o100.Part1 = o108
- o100.CurrentAngle = 1.5707963705063
- o100.MaxVelocity = 0.10000000149012
- o101.Name = "Left Shoulder"
- o101.Parent = o90
- o101.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o101.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o101.Part0 = o90
- o101.Part1 = o105
- o101.CurrentAngle = -1.5707963705063
- o101.MaxVelocity = 0.10000000149012
- o102.Name = "Right Hip"
- o102.Parent = o90
- o102.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o102.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- o102.Part0 = o90
- o102.Part1 = o113
- o102.CurrentAngle = 1.5707963705063
- o102.MaxVelocity = 0.10000000149012
- o103.Name = "Left Hip"
- o103.Parent = o90
- o103.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o103.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- o103.Part0 = o90
- o103.Part1 = o111
- o103.CurrentAngle = -1.5707963705063
- o103.MaxVelocity = 0.10000000149012
- o104.Name = "Neck"
- o104.Parent = o90
- o104.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o104.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o104.Part0 = o90
- o104.Part1 = o65
- o104.MaxVelocity = 0.10000000149012
- o105.Name = "Left Arm"
- o105.Parent = o64
- o105.BrickColor = BrickColor.new("Pastel brown")
- o105.Position = Vector3.new(-134.028473, 6.9903245, -15.5603104)
- o105.Rotation = Vector3.new(89.9300003, -0.109999999, 74.1399994)
- o105.RotVelocity = Vector3.new(0.0173833147, 0.000907649868, 0.0064344923)
- o105.Velocity = Vector3.new(-0.0137807541, -0.0499749333, 0.0702756792)
- o105.CanCollide = false
- o105.Locked = true
- o105.FormFactor = Enum.FormFactor.Symmetric
- o105.Size = Vector3.new(1, 2, 1)
- o105.CFrame = CFrame.new(-134.028473, 6.9903245, -15.5603104, 0.273213327, -0.961951733, -0.00183552608, 0.000632914132, 0.00208788272, -0.999997616, 0.961953223, 0.273211569, 0.00117927033)
- o105.Color = Color3.new(1, 0.8, 0.6)
- o105.Position = Vector3.new(-134.028473, 6.9903245, -15.5603104)
- o105.velocity = Vector3.new(-0.0137807541, -0.0499749333, 0.0702756792)
- o108.Name = "Right Arm"
- o108.Parent = o64
- o108.BrickColor = BrickColor.new("Pastel brown")
- o108.Position = Vector3.new(-133.208832, 6.99222326, -12.6744499)
- o108.Rotation = Vector3.new(89.9300003, -0.109999999, 74.1399994)
- o108.RotVelocity = Vector3.new(0.0173833147, 0.000907649868, 0.0064344923)
- o108.Velocity = Vector3.new(-0.0111736208, -0.0948667824, 0.0695647448)
- o108.CanCollide = false
- o108.Locked = true
- o108.FormFactor = Enum.FormFactor.Symmetric
- o108.Size = Vector3.new(1, 2, 1)
- o108.CFrame = CFrame.new(-133.208832, 6.99222326, -12.6744499, 0.273213267, -0.961951733, -0.0018355021, 0.000633001793, 0.00208788272, -0.999997616, 0.961953223, 0.273211509, 0.00117935438)
- o108.Color = Color3.new(1, 0.8, 0.6)
- o108.Position = Vector3.new(-133.208832, 6.99222326, -12.6744499)
- o108.velocity = Vector3.new(-0.0111736208, -0.0948667824, 0.0695647448)
- o111.Name = "Left Leg"
- o111.Parent = o64
- o111.BrickColor = BrickColor.new("Pastel brown")
- o111.Position = Vector3.new(-133.277145, 5.4902401, -14.7332573)
- o111.Rotation = Vector3.new(89.9300003, -0.099999994, 74.1399994)
- o111.RotVelocity = Vector3.new(0.00438322453, 0.00169923075, 0.00324965641)
- o111.Velocity = Vector3.new(-0.00543624116, 0.00709632318, 0.0166214965)
- o111.CanCollide = false
- o111.Locked = true
- o111.FormFactor = Enum.FormFactor.Symmetric
- o111.Size = Vector3.new(1, 2, 1)
- o111.CFrame = CFrame.new(-133.277145, 5.4902401, -14.7332573, 0.27321586, -0.961951017, -0.00181173789, 0.000674283598, 0.00207490637, -0.999997616, 0.961952448, 0.273214042, 0.00121552532)
- o111.BottomSurface = Enum.SurfaceType.Smooth
- o111.Color = Color3.new(1, 0.8, 0.6)
- o111.Position = Vector3.new(-133.277145, 5.4902401, -14.7332573)
- o111.velocity = Vector3.new(-0.00543624116, 0.00709632318, 0.0166214965)
- o113.Name = "Right Leg"
- o113.Parent = o64
- o113.BrickColor = BrickColor.new("Pastel brown")
- o113.Position = Vector3.new(-133.003983, 5.49092627, -13.7714157)
- o113.Rotation = Vector3.new(89.9300003, -0.099999994, 74.1399994)
- o113.RotVelocity = Vector3.new(0.000289053394, 0.000902900298, 0.00468921755)
- o113.Velocity = Vector3.new(-0.00559230847, 0.0044792681, -0.0051766918)
- o113.CanCollide = false
- o113.Locked = true
- o113.FormFactor = Enum.FormFactor.Symmetric
- o113.Size = Vector3.new(1, 2, 1)
- o113.CFrame = CFrame.new(-133.003983, 5.49092627, -13.7714157, 0.273213446, -0.961951733, -0.00179531099, 0.000702179619, 0.00206574984, -0.999997616, 0.961953104, 0.273211569, 0.00123985356)
- o113.BottomSurface = Enum.SurfaceType.Smooth
- o113.Color = Color3.new(1, 0.8, 0.6)
- o113.Position = Vector3.new(-133.003983, 5.49092627, -13.7714157)
- o113.velocity = Vector3.new(-0.00559230847, 0.0044792681, -0.0051766918)
- o115.Parent = o64
- o115.RightLeg = o113
- o115.LeftLeg = o111
- o115.Torso = o118
- o115.Sit = true
- o118.Name = "HumanoidRootPart"
- o118.Parent = o64
- o118.Transparency = 1
- o118.Position = Vector3.new(-134.100479, 6.49259663, -13.9804878)
- o118.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
- o118.RotVelocity = Vector3.new(-0.00239218515, 0.00103416073, -0.00141358236)
- o118.Velocity = Vector3.new(0.012269523, -0.0113523081, -0.0135693792)
- o118.CanCollide = false
- o118.Locked = true
- o118.FormFactor = Enum.FormFactor.Symmetric
- o118.Size = Vector3.new(2, 2, 1)
- o118.CFrame = CFrame.new(-134.100479, 6.49259663, -13.9804878, 0.273213983, 0.00186020019, -0.961951494, 0.000702761929, 0.999997497, 0.00213337154, 0.961953044, -0.0012588898, 0.273211986)
- o118.BottomSurface = Enum.SurfaceType.Smooth
- o118.TopSurface = Enum.SurfaceType.Smooth
- o118.Position = Vector3.new(-134.100479, 6.49259663, -13.9804878)
- o118.velocity = Vector3.new(0.012269523, -0.0113523081, -0.0135693792)
- o120.Name = "RootJoint"
- o120.Parent = o118
- o120.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o120.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- o120.Part0 = o118
- o120.Part1 = o90
- o120.MaxVelocity = 0.10000000149012
- o121.Name = "Sound"
- o121.Parent = o64
- 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,o121)
- o122.Name = "LocalSound"
- o122.Parent = o121
- 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,o122)
- o123.Name = "Health"
- o123.Parent = o64
- 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,o123)
- o124.Name = "Animate"
- o124.Parent = o64
- 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,o124)
- o125.Name = "idle"
- o125.Parent = o124
- o126.Name = "Animation1"
- o126.Parent = o125
- o126.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- o127.Name = "Weight"
- o127.Parent = o126
- o127.Value = 9
- o128.Name = "Animation2"
- o128.Parent = o125
- o128.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- o129.Name = "Weight"
- o129.Parent = o128
- o129.Value = 1
- o130.Name = "walk"
- o130.Parent = o124
- o131.Name = "WalkAnim"
- o131.Parent = o130
- o131.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o132.Name = "run"
- o132.Parent = o124
- o133.Name = "RunAnim"
- o133.Parent = o132
- o133.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- o134.Name = "jump"
- o134.Parent = o124
- o135.Name = "JumpAnim"
- o135.Parent = o134
- o135.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- o136.Name = "climb"
- o136.Parent = o124
- o137.Name = "ClimbAnim"
- o137.Parent = o136
- o137.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- o138.Name = "toolnone"
- o138.Parent = o124
- o139.Name = "ToolNoneAnim"
- o139.Parent = o138
- o139.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- o140.Name = "fall"
- o140.Parent = o124
- o141.Name = "FallAnim"
- o141.Parent = o140
- o141.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- o142.Name = "sit"
- o142.Parent = o124
- o143.Name = "SitAnim"
- o143.Parent = o142
- o143.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- o144.Name = "ScaleDampeningPercent"
- o144.Parent = o124
- o144.Value = 0.39999997615814
- o145.Parent = o64
- o145.HeadColor = BrickColor.new("Pastel brown")
- o145.LeftArmColor = BrickColor.new("Pastel brown")
- o145.LeftLegColor = BrickColor.new("Pastel brown")
- o145.RightArmColor = BrickColor.new("Pastel brown")
- o145.RightLegColor = BrickColor.new("Pastel brown")
- o145.TorsoColor = BrickColor.new("Pastel brown")
- o146.Name = "Pants"
- o146.Parent = o64
- o146.PantsTemplate = "http://www.roblox.com/asset/?id=1439542143"
- o147.Name = "Shirt"
- o147.Parent = o64
- o147.ShirtTemplate = "http://www.roblox.com/asset/?id=1439532842"
- o149.Name = "Handle"
- o149.Parent = mas
- o149.Position = Vector3.new(-134.121231, 8.39259243, -13.9760065)
- o149.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
- o149.RotVelocity = Vector3.new(-0.00334252417, 0.000452164415, -0.000137843788)
- o149.Velocity = Vector3.new(0.00836813357, -0.0241958033, -0.0229405127)
- o149.CanCollide = false
- o149.Locked = true
- o149.FormFactor = Enum.FormFactor.Custom
- o149.Size = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o149.CFrame = CFrame.new(-134.121231, 8.39259243, -13.9760065, 0.273211837, 0.00186326669, -0.96195209, 0.000707792584, 0.999997437, 0.00213798531, 0.96195364, -0.00126498542, 0.27320981)
- o149.BottomSurface = Enum.SurfaceType.Smooth
- o149.TopSurface = Enum.SurfaceType.Smooth
- o149.Position = Vector3.new(-134.121231, 8.39259243, -13.9760065)
- o149.velocity = Vector3.new(0.00836813357, -0.0241958033, -0.0229405127)
- o150.Parent = o149
- o150.MeshId = "http://www.roblox.com/asset/?id=188565062 "
- o150.TextureId = "http://www.roblox.com/asset/?id=188565095 "
- o150.MeshType = Enum.MeshType.FileMesh
- o152.Name = "OriginalSize"
- o152.Parent = o149
- o152.Value = Vector3.new(1.45002651, 2.35999823, 1.24000001)
- o153.Name = "AccessoryWeld"
- o153.Parent = o149
- o153.C0 = CFrame.new(8.65748007e-09, 0.199999809, -0.0252722446, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o153.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- o153.Part0 = o149
- o153.Part1 = o65
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = workspace
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
- 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