Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By giantgamingchannel
- --Discord: Polandball (giant)#3166
- function onKeyPress(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Enum.KeyCode.Q then
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- BodyColors1 = Instance.new("BodyColors")
- Shirt2 = Instance.new("Shirt")
- Script3 = Instance.new("Script")
- Humanoid4 = Instance.new("Humanoid")
- Accessory5 = Instance.new("Accessory")
- Part6 = Instance.new("Part")
- SpecialMesh7 = Instance.new("SpecialMesh")
- Attachment8 = Instance.new("Attachment")
- Vector3Value9 = Instance.new("Vector3Value")
- Weld10 = Instance.new("Weld")
- Script11 = Instance.new("Script")
- LocalScript12 = Instance.new("LocalScript")
- LocalScript13 = Instance.new("LocalScript")
- StringValue14 = Instance.new("StringValue")
- Animation15 = Instance.new("Animation")
- NumberValue16 = Instance.new("NumberValue")
- Animation17 = Instance.new("Animation")
- NumberValue18 = Instance.new("NumberValue")
- StringValue19 = Instance.new("StringValue")
- Animation20 = Instance.new("Animation")
- StringValue21 = Instance.new("StringValue")
- Animation22 = Instance.new("Animation")
- StringValue23 = Instance.new("StringValue")
- Animation24 = Instance.new("Animation")
- StringValue25 = Instance.new("StringValue")
- Animation26 = Instance.new("Animation")
- StringValue27 = Instance.new("StringValue")
- Animation28 = Instance.new("Animation")
- StringValue29 = Instance.new("StringValue")
- Animation30 = Instance.new("Animation")
- StringValue31 = Instance.new("StringValue")
- Animation32 = Instance.new("Animation")
- Part33 = Instance.new("Part")
- SpecialMesh34 = Instance.new("SpecialMesh")
- Decal35 = Instance.new("Decal")
- Attachment36 = Instance.new("Attachment")
- Attachment37 = Instance.new("Attachment")
- Attachment38 = Instance.new("Attachment")
- Attachment39 = Instance.new("Attachment")
- Sound40 = Instance.new("Sound")
- RemoteEvent41 = Instance.new("RemoteEvent")
- Sound42 = Instance.new("Sound")
- RemoteEvent43 = Instance.new("RemoteEvent")
- Sound44 = Instance.new("Sound")
- RemoteEvent45 = Instance.new("RemoteEvent")
- Sound46 = Instance.new("Sound")
- RemoteEvent47 = Instance.new("RemoteEvent")
- Sound48 = Instance.new("Sound")
- RemoteEvent49 = Instance.new("RemoteEvent")
- Sound50 = Instance.new("Sound")
- RemoteEvent51 = Instance.new("RemoteEvent")
- Sound52 = Instance.new("Sound")
- RemoteEvent53 = Instance.new("RemoteEvent")
- Sound54 = Instance.new("Sound")
- RemoteEvent55 = Instance.new("RemoteEvent")
- Sound56 = Instance.new("Sound")
- RemoteEvent57 = Instance.new("RemoteEvent")
- Part58 = Instance.new("Part")
- Attachment59 = Instance.new("Attachment")
- Motor6D60 = Instance.new("Motor6D")
- Part61 = Instance.new("Part")
- Attachment62 = Instance.new("Attachment")
- Attachment63 = Instance.new("Attachment")
- Part64 = Instance.new("Part")
- Attachment65 = Instance.new("Attachment")
- Part66 = Instance.new("Part")
- Attachment67 = Instance.new("Attachment")
- Attachment68 = Instance.new("Attachment")
- Part69 = Instance.new("Part")
- Attachment70 = Instance.new("Attachment")
- Part71 = Instance.new("Part")
- Decal72 = Instance.new("Decal")
- Attachment73 = Instance.new("Attachment")
- Attachment74 = Instance.new("Attachment")
- Attachment75 = Instance.new("Attachment")
- Attachment76 = Instance.new("Attachment")
- Attachment77 = Instance.new("Attachment")
- Attachment78 = Instance.new("Attachment")
- Attachment79 = Instance.new("Attachment")
- Attachment80 = Instance.new("Attachment")
- Motor6D81 = Instance.new("Motor6D")
- Motor6D82 = Instance.new("Motor6D")
- Motor6D83 = Instance.new("Motor6D")
- Motor6D84 = Instance.new("Motor6D")
- Motor6D85 = Instance.new("Motor6D")
- Model0.Name = "WorkableJoshie"
- Model0.Parent = mas
- BodyColors1.Parent = Model0
- BodyColors1.HeadColor = BrickColor.new("Pastel yellow")
- BodyColors1.LeftLegColor = BrickColor.new("Medium blue")
- BodyColors1.RightArmColor = BrickColor.new("Pastel yellow")
- BodyColors1.RightLegColor = BrickColor.new("Medium blue")
- BodyColors1.TorsoColor = BrickColor.new("Teal")
- Shirt2.Name = "Shirt"
- Shirt2.Parent = Model0
- Shirt2.ShirtTemplate = "http://www.roblox.com/asset/?id=227888194"
- Script3.Name = "Health"
- Script3.Parent = Model0
- table.insert(cors,sandbox(Script3,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))
- Humanoid4.Parent = Model0
- Humanoid4.RightLeg = Part69
- Humanoid4.LeftLeg = Part64
- Humanoid4.Torso = Part58
- Accessory5.Name = "Robloxclassicred"
- Accessory5.Parent = Model0
- Accessory5.AttachmentPos = Vector3.new(0, -0.0500000007, 0.100000001)
- Part6.Name = "Handle"
- Part6.Parent = Accessory5
- Part6.CanCollide = false
- Part6.Locked = true
- Part6.FormFactor = Enum.FormFactor.Symmetric
- Part6.Size = Vector3.new(1, 1, 2)
- Part6.CFrame = CFrame.new(-6, 5.04999924, -11.0997276, 1, -7.87137555e-09, 0, 7.87137555e-09, 1, 4.1444221e-16, -3.26223034e-24, -4.1444221e-16, 1)
- Part6.BottomSurface = Enum.SurfaceType.Smooth
- Part6.TopSurface = Enum.SurfaceType.Smooth
- Part6.Position = Vector3.new(-6, 5.04999924, -11.0997276)
- SpecialMesh7.Parent = Part6
- SpecialMesh7.MeshId = "http://www.roblox.com/asset/?id=46834172"
- SpecialMesh7.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
- SpecialMesh7.TextureId = "http://www.roblox.com/asset/?id=47991609"
- SpecialMesh7.MeshType = Enum.MeshType.FileMesh
- SpecialMesh7.Scale = Vector3.new(1.04999995, 1.04999995, 1.04999995)
- Attachment8.Name = "HatAttachment"
- Attachment8.Parent = Part6
- Attachment8.Rotation = Vector3.new(2.37457877e-14, -1.86912021e-22, -4.50996566e-07)
- Attachment8.CFrame = CFrame.new(8.65838956e-09, 0.0499997139, 0.0997277573, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Attachment8.Position = Vector3.new(8.65838956e-09, 0.0499997139, 0.0997277573)
- Attachment8.Axis = Vector3.new(1, -7.87137555e-09, 0)
- Attachment8.Orientation = Vector3.new(2.37457877e-14, -1.86912021e-22, -4.50996566e-07)
- Vector3Value9.Name = "OriginalSize"
- Vector3Value9.Parent = Part6
- Vector3Value9.Value = Vector3.new(1, 1, 2)
- Weld10.Name = "AccessoryWeld"
- Weld10.Parent = Part6
- Weld10.C0 = CFrame.new(8.65838956e-09, 0.0499997139, 0.0997277573, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
- Weld10.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld10.Part0 = Part6
- Weld10.Part1 = Part33
- Script11.Name = "Sound"
- Script11.Parent = Model0
- table.insert(cors,sandbox(Script11,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))
- LocalScript12.Name = "LocalSound"
- LocalScript12.Parent = Script11
- table.insert(cors,sandbox(LocalScript12,function()
- --[[
- Author: @spotco
- This script runs locally for the player of the given humanoid.
- This script triggers humanoid sound play/pause actions locally.
- The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
- immediately for the player and is replicated to all other players.
- This script is optimized to reduce network traffic through minimizing the amount of property replication.
- ]]--
- --All sounds are referenced by this ID
- local SFX = {
- Died = 0;
- Running = 1;
- Swimming = 2;
- Climbing = 3,
- Jumping = 4;
- GettingUp = 5;
- FreeFalling = 6;
- FallingDown = 7;
- Landing = 8;
- Splash = 9;
- }
- local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- local SoundService = game:GetService("SoundService")
- local soundEventFolderName = "DefaultSoundEvents"
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local AddCharacterLoadedEvent = nil
- local RemoveCharacterEvent = nil
- local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
- local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
- if useSoundDispatcher then
- if not soundEventFolder then
- soundEventFolder = Instance.new("Folder", ReplicatedStorage)
- soundEventFolder.Name = soundEventFolderName
- soundEventFolder.Archivable = false
- end
- -- Load the RemoveCharacterEvent
- RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
- if RemoveCharacterEvent == nil then
- RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
- RemoveCharacterEvent.Name = "RemoveCharacterEvent"
- end
- AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
- if AddCharacterLoadedEvent == nil then
- AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
- AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
- end
- -- Notify the server a new character has been loaded
- AddCharacterLoadedEvent:FireServer()
- -- Notify the sound dispatcher this character has left.
- game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
- RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
- end)
- end
- do
- local Figure = script.Parent.Parent
- Head = Figure:WaitForChild("Head")
- while not Humanoid do
- for _,NewHumanoid in pairs(Figure:GetChildren()) do
- if NewHumanoid:IsA("Humanoid") then
- Humanoid = NewHumanoid
- break
- end
- end
- if Humanoid then break end
- Figure.ChildAdded:wait()
- end
- Sounds[SFX.Died] = Head:WaitForChild("Died")
- Sounds[SFX.Running] = Head:WaitForChild("Running")
- Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
- Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
- Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
- Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
- Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
- Sounds[SFX.Landing] = Head:WaitForChild("Landing")
- Sounds[SFX.Splash] = Head:WaitForChild("Splash")
- local DefaultServerSoundEvent = nil
- if useSoundDispatcher then
- DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
- else
- DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
- end
- if DefaultServerSoundEvent then
- DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") then
- if resetPosition and sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if sound.IsPlaying ~= playing then
- sound.Playing = playing
- end
- else
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end
- end)
- end
- end
- local IsSoundFilteringEnabled = function()
- return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
- end
- local Util
- Util = {
- --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
- YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
- --(y - y1)/(x - x1) = m
- local m = (pt1y - pt2y) / (pt1x - pt2x)
- --float b = pt1.y - m * pt1.x;
- local b = (pt1y - m * pt1x)
- return m * x + b
- end;
- --Clamps the value of "val" between the "min" and "max"
- Clamp = function(val,min,max)
- return math.min(max,math.max(min,val))
- end;
- --Gets the horizontal (x,z) velocity magnitude of the given part
- HorizontalSpeed = function(Head)
- local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
- return hVel.magnitude
- end;
- --Gets the vertical (y) velocity magnitude of the given part
- VerticalSpeed = function(Head)
- return math.abs(Head.Velocity.Y)
- end;
- --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
- --If these properties are enabled, use them.
- Play = function(sound)
- if IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, true)
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, false)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(true, false)
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if UserSettings():IsUserFeatureEnabled("UserPlayCharacterLoopSoundWhenFE") and IsSoundFilteringEnabled() then
- sound.CharacterSoundEvent:FireServer(false, true)
- end
- if sound.IsPlaying then
- sound.Playing = false
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- end;
- }
- do
- -- List of all active Looped sounds
- local playingLoopedSounds = {}
- -- Last seen Enum.HumanoidStateType
- local activeState = nil
- local fallSpeed = 0
- -- Verify and set that "sound" is in "playingLoopedSounds".
- function setSoundInPlayingLoopedSounds(sound)
- for i=1, #playingLoopedSounds do
- if playingLoopedSounds[i] == sound then
- return
- end
- end
- table.insert(playingLoopedSounds,sound)
- end
- -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
- function stopPlayingLoopedSoundsExcept(except)
- for i=#playingLoopedSounds,1,-1 do
- if playingLoopedSounds[i] ~= except then
- Util.Pause(playingLoopedSounds[i])
- table.remove(playingLoopedSounds,i)
- end
- end
- end
- -- Table of Enum.HumanoidStateType to handling function
- local stateUpdateHandler = {
- [Enum.HumanoidStateType.Dead] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Died]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
- stateUpdated(Enum.HumanoidStateType.Running, speed)
- end;
- [Enum.HumanoidStateType.Running] = function(speed)
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
- -- Play a landing sound if the character dropped from a large distance
- local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
- local freeFallSound = Sounds[SFX.FreeFalling]
- freeFallSound.Volume = vol
- Util.Play(freeFallSound)
- fallSpeed = 0
- end
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and speed > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- elseif speed ~= nil then
- stopPlayingLoopedSoundsExcept()
- end
- else
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function(speed)
- local threshold
- if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
- if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
- local splashSound = Sounds[SFX.Splash]
- splashSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 100, 0.28,
- 350, 1),
- 0,1)
- Util.Play(splashSound)
- end
- do
- local sound = Sounds[SFX.Swimming]
- stopPlayingLoopedSoundsExcept(sound)
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- end
- end;
- [Enum.HumanoidStateType.Climbing] = function(speed)
- local sound = Sounds[SFX.Climbing]
- if useUpdatedLocalSoundFlag then
- if speed ~= nil and math.abs(speed) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- Util.Pause(sound)
- stopPlayingLoopedSoundsExcept(sound)
- end
- else
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end
- setSoundInPlayingLoopedSounds(sound)
- end;
- [Enum.HumanoidStateType.Jumping] = function()
- if activeState == Enum.HumanoidStateType.Jumping then
- return
- end
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Jumping]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.GettingUp] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.GettingUp]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.Freefall] = function()
- if activeState == Enum.HumanoidStateType.Freefall then
- return
- end
- local sound = Sounds[SFX.FreeFalling]
- sound.Volume = 0
- stopPlayingLoopedSoundsExcept()
- fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
- end;
- [Enum.HumanoidStateType.FallingDown] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.Landed] = function()
- stopPlayingLoopedSoundsExcept()
- if Util.VerticalSpeed(Head) > 75 then
- local landingSound = Sounds[SFX.Landing]
- landingSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 50, 0,
- 100, 1),
- 0,1)
- Util.Play(landingSound)
- end
- end;
- [Enum.HumanoidStateType.Seated] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state, speed)
- if stateUpdateHandler[state] ~= nil then
- if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
- or state == Enum.HumanoidStateType.Climbing
- or state == Enum.HumanoidStateType.Swimming
- or state == Enum.HumanoidStateType.RunningNoPhysics) then
- stateUpdateHandler[state](speed)
- else
- stateUpdateHandler[state]()
- end
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
- Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
- Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
- Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
- Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
- Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
- Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
- -- required for proper handling of Landed event
- Humanoid.StateChanged:connect(function(old, new)
- stateUpdated(new)
- end)
- function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
- local stepScale = stepDeltaSeconds / tickSpeedSeconds
- do
- local sound = Sounds[SFX.FreeFalling]
- if activeState == Enum.HumanoidStateType.Freefall then
- if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
- Util.Resume(sound)
- --Volume takes 1.1 seconds to go from volume 0 to 1
- local ANIMATION_LENGTH_SECONDS = 1.1
- local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
- sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
- else
- sound.Volume = 0
- end
- else
- Util.Pause(sound)
- end
- end
- do
- local sound = Sounds[SFX.Running]
- if activeState == Enum.HumanoidStateType.Running then
- if Util.HorizontalSpeed(Head) < 0.5 then
- Util.Pause(sound)
- end
- end
- end
- end
- local lastTick = tick()
- local TICK_SPEED_SECONDS = 0.25
- while true do
- onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
- lastTick = tick()
- wait(TICK_SPEED_SECONDS)
- end
- end
- end))
- LocalScript13.Name = "Animate"
- LocalScript13.Parent = Model0
- table.insert(cors,sandbox(LocalScript13,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))
- StringValue14.Name = "idle"
- StringValue14.Parent = LocalScript13
- Animation15.Name = "Animation1"
- Animation15.Parent = StringValue14
- Animation15.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- NumberValue16.Name = "Weight"
- NumberValue16.Parent = Animation15
- NumberValue16.Value = 9
- Animation17.Name = "Animation2"
- Animation17.Parent = StringValue14
- Animation17.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- NumberValue18.Name = "Weight"
- NumberValue18.Parent = Animation17
- NumberValue18.Value = 1
- StringValue19.Name = "walk"
- StringValue19.Parent = LocalScript13
- Animation20.Name = "WalkAnim"
- Animation20.Parent = StringValue19
- Animation20.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- StringValue21.Name = "run"
- StringValue21.Parent = LocalScript13
- Animation22.Name = "RunAnim"
- Animation22.Parent = StringValue21
- Animation22.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- StringValue23.Name = "jump"
- StringValue23.Parent = LocalScript13
- Animation24.Name = "JumpAnim"
- Animation24.Parent = StringValue23
- Animation24.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- StringValue25.Name = "climb"
- StringValue25.Parent = LocalScript13
- Animation26.Name = "ClimbAnim"
- Animation26.Parent = StringValue25
- Animation26.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- StringValue27.Name = "toolnone"
- StringValue27.Parent = LocalScript13
- Animation28.Name = "ToolNoneAnim"
- Animation28.Parent = StringValue27
- Animation28.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- StringValue29.Name = "fall"
- StringValue29.Parent = LocalScript13
- Animation30.Name = "FallAnim"
- Animation30.Parent = StringValue29
- Animation30.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- StringValue31.Name = "sit"
- StringValue31.Parent = LocalScript13
- Animation32.Name = "SitAnim"
- Animation32.Parent = StringValue31
- Animation32.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- Part33.Name = "Head"
- Part33.Parent = Model0
- Part33.BrickColor = BrickColor.new("Cool yellow")
- Part33.Locked = true
- Part33.FormFactor = Enum.FormFactor.Symmetric
- Part33.Size = Vector3.new(2, 1, 1)
- Part33.CFrame = CFrame.new(-6, 4.49999905, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part33.TopSurface = Enum.SurfaceType.Smooth
- Part33.Color = Color3.new(0.992157, 0.917647, 0.552941)
- Part33.Position = Vector3.new(-6, 4.49999905, -11)
- Part33.Color = Color3.new(0.992157, 0.917647, 0.552941)
- SpecialMesh34.Parent = Part33
- SpecialMesh34.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh34.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal35.Name = "face"
- Decal35.Parent = Part33
- Decal35.Texture = "rbxasset://textures/face.png"
- Attachment36.Name = "HairAttachment"
- Attachment36.Parent = Part33
- Attachment36.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment36.Position = Vector3.new(0, 0.600000024, 0)
- Attachment37.Name = "HatAttachment"
- Attachment37.Parent = Part33
- Attachment37.CFrame = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment37.Position = Vector3.new(0, 0.600000024, 0)
- Attachment38.Name = "FaceFrontAttachment"
- Attachment38.Parent = Part33
- Attachment38.CFrame = CFrame.new(0, 0, -0.600000024, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment38.Position = Vector3.new(0, 0, -0.600000024)
- Attachment39.Name = "FaceCenterAttachment"
- Attachment39.Parent = Part33
- Sound40.Name = "GettingUp"
- Sound40.Parent = Part33
- Sound40.SoundId = "rbxasset://sounds/action_get_up.mp3"
- Sound40.Volume = 0.64999997615814
- RemoteEvent41.Name = "CharacterSoundEvent"
- RemoteEvent41.Parent = Sound40
- Sound42.Name = "Died"
- Sound42.Parent = Part33
- Sound42.SoundId = "rbxasset://sounds/uuhhh.mp3"
- Sound42.Volume = 0.64999997615814
- RemoteEvent43.Name = "CharacterSoundEvent"
- RemoteEvent43.Parent = Sound42
- Sound44.Name = "FreeFalling"
- Sound44.Parent = Part33
- Sound44.SoundId = "rbxasset://sounds/action_falling.mp3"
- Sound44.TimePosition = 0.016619052999999
- Sound44.Volume = 0.36001586914062
- Sound44.Looped = true
- RemoteEvent45.Name = "CharacterSoundEvent"
- RemoteEvent45.Parent = Sound44
- Sound46.Name = "Jumping"
- Sound46.Parent = Part33
- Sound46.SoundId = "rbxasset://sounds/action_jump.mp3"
- Sound46.Volume = 0.64999997615814
- RemoteEvent47.Name = "CharacterSoundEvent"
- RemoteEvent47.Parent = Sound46
- Sound48.Name = "Landing"
- Sound48.Parent = Part33
- Sound48.SoundId = "rbxasset://sounds/action_jump_land.mp3"
- Sound48.Volume = 1
- RemoteEvent49.Name = "CharacterSoundEvent"
- RemoteEvent49.Parent = Sound48
- Sound50.Name = "Splash"
- Sound50.Parent = Part33
- Sound50.SoundId = "rbxasset://sounds/impact_water.mp3"
- Sound50.Volume = 0.64999997615814
- RemoteEvent51.Name = "CharacterSoundEvent"
- RemoteEvent51.Parent = Sound50
- Sound52.Name = "Running"
- Sound52.Parent = Part33
- Sound52.Pitch = 1.8500000238419
- Sound52.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound52.Volume = 0.64999997615814
- Sound52.Looped = true
- RemoteEvent53.Name = "CharacterSoundEvent"
- RemoteEvent53.Parent = Sound52
- Sound54.Name = "Swimming"
- Sound54.Parent = Part33
- Sound54.Pitch = 1.6000000238419
- Sound54.SoundId = "rbxasset://sounds/action_swim.mp3"
- Sound54.Volume = 0.64999997615814
- Sound54.Looped = true
- RemoteEvent55.Name = "CharacterSoundEvent"
- RemoteEvent55.Parent = Sound54
- Sound56.Name = "Climbing"
- Sound56.Parent = Part33
- Sound56.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
- Sound56.Volume = 0.64999997615814
- Sound56.Looped = true
- RemoteEvent57.Name = "CharacterSoundEvent"
- RemoteEvent57.Parent = Sound56
- Part58.Name = "HumanoidRootPart"
- Part58.Parent = Model0
- Part58.Transparency = 1
- Part58.CanCollide = false
- Part58.Locked = true
- Part58.FormFactor = Enum.FormFactor.Symmetric
- Part58.Size = Vector3.new(2, 2, 1)
- Part58.CFrame = CFrame.new(-6, 2.99999905, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part58.BottomSurface = Enum.SurfaceType.Smooth
- Part58.TopSurface = Enum.SurfaceType.Smooth
- Part58.Position = Vector3.new(-6, 2.99999905, -11)
- Attachment59.Name = "RootAttachment"
- Attachment59.Parent = Part58
- Motor6D60.Name = "RootJoint"
- Motor6D60.Parent = Part58
- Motor6D60.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D60.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D60.Part0 = Part58
- Motor6D60.Part1 = Part71
- Motor6D60.MaxVelocity = 0.10000000149012
- Part61.Name = "Left Arm"
- Part61.Parent = Model0
- Part61.BrickColor = BrickColor.new("Cool yellow")
- Part61.CanCollide = false
- Part61.Locked = true
- Part61.FormFactor = Enum.FormFactor.Symmetric
- Part61.Size = Vector3.new(1, 2, 1)
- Part61.CFrame = CFrame.new(-7.5, 2.99999905, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part61.Color = Color3.new(0.992157, 0.917647, 0.552941)
- Part61.Position = Vector3.new(-7.5, 2.99999905, -11)
- Part61.Color = Color3.new(0.992157, 0.917647, 0.552941)
- Attachment62.Name = "LeftShoulderAttachment"
- Attachment62.Parent = Part61
- Attachment62.CFrame = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment62.Position = Vector3.new(0, 1, 0)
- Attachment63.Name = "LeftGripAttachment"
- Attachment63.Parent = Part61
- Attachment63.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment63.Position = Vector3.new(0, -1, 0)
- Part64.Name = "Left Leg"
- Part64.Parent = Model0
- Part64.BrickColor = BrickColor.new("Bright blue")
- Part64.CanCollide = false
- Part64.Locked = true
- Part64.FormFactor = Enum.FormFactor.Symmetric
- Part64.Size = Vector3.new(1, 2, 1)
- Part64.CFrame = CFrame.new(-6.5, 0.999999046, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part64.BottomSurface = Enum.SurfaceType.Smooth
- Part64.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part64.Position = Vector3.new(-6.5, 0.999999046, -11)
- Part64.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Attachment65.Name = "LeftFootAttachment"
- Attachment65.Parent = Part64
- Attachment65.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment65.Position = Vector3.new(0, -1, 0)
- Part66.Name = "Right Arm"
- Part66.Parent = Model0
- Part66.BrickColor = BrickColor.new("Cool yellow")
- Part66.CanCollide = false
- Part66.Locked = true
- Part66.FormFactor = Enum.FormFactor.Symmetric
- Part66.Size = Vector3.new(1, 2, 1)
- Part66.CFrame = CFrame.new(-4.5, 2.99999905, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part66.Color = Color3.new(0.992157, 0.917647, 0.552941)
- Part66.Position = Vector3.new(-4.5, 2.99999905, -11)
- Part66.Color = Color3.new(0.992157, 0.917647, 0.552941)
- Attachment67.Name = "RightShoulderAttachment"
- Attachment67.Parent = Part66
- Attachment67.CFrame = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment67.Position = Vector3.new(0, 1, 0)
- Attachment68.Name = "RightGripAttachment"
- Attachment68.Parent = Part66
- Attachment68.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment68.Position = Vector3.new(0, -1, 0)
- Part69.Name = "Right Leg"
- Part69.Parent = Model0
- Part69.BrickColor = BrickColor.new("Bright blue")
- Part69.CanCollide = false
- Part69.Locked = true
- Part69.FormFactor = Enum.FormFactor.Symmetric
- Part69.Size = Vector3.new(1, 2, 1)
- Part69.CFrame = CFrame.new(-5.5, 0.999999046, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part69.BottomSurface = Enum.SurfaceType.Smooth
- Part69.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Part69.Position = Vector3.new(-5.5, 0.999999046, -11)
- Part69.Color = Color3.new(0.0509804, 0.411765, 0.67451)
- Attachment70.Name = "RightFootAttachment"
- Attachment70.Parent = Part69
- Attachment70.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment70.Position = Vector3.new(0, -1, 0)
- Part71.Name = "Torso"
- Part71.Parent = Model0
- Part71.BrickColor = BrickColor.new("Dark green")
- Part71.Locked = true
- Part71.FormFactor = Enum.FormFactor.Symmetric
- Part71.Size = Vector3.new(2, 2, 1)
- Part71.CFrame = CFrame.new(-6, 2.99999905, -11, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part71.LeftSurface = Enum.SurfaceType.Weld
- Part71.RightSurface = Enum.SurfaceType.Weld
- Part71.Color = Color3.new(0.156863, 0.498039, 0.278431)
- Part71.Position = Vector3.new(-6, 2.99999905, -11)
- Part71.Color = Color3.new(0.156863, 0.498039, 0.278431)
- Decal72.Name = "roblox"
- Decal72.Parent = Part71
- Attachment73.Name = "NeckAttachment"
- Attachment73.Parent = Part71
- Attachment73.CFrame = CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment73.Position = Vector3.new(0, 1, 0)
- Attachment74.Name = "BodyFrontAttachment"
- Attachment74.Parent = Part71
- Attachment74.CFrame = CFrame.new(0, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment74.Position = Vector3.new(0, 0, -0.5)
- Attachment75.Name = "BodyBackAttachment"
- Attachment75.Parent = Part71
- Attachment75.CFrame = CFrame.new(0, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment75.Position = Vector3.new(0, 0, 0.5)
- Attachment76.Name = "LeftCollarAttachment"
- Attachment76.Parent = Part71
- Attachment76.CFrame = CFrame.new(-1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment76.Position = Vector3.new(-1, 1, 0)
- Attachment77.Name = "RightCollarAttachment"
- Attachment77.Parent = Part71
- Attachment77.CFrame = CFrame.new(1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment77.Position = Vector3.new(1, 1, 0)
- Attachment78.Name = "WaistFrontAttachment"
- Attachment78.Parent = Part71
- Attachment78.CFrame = CFrame.new(0, -1, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment78.Position = Vector3.new(0, -1, -0.5)
- Attachment79.Name = "WaistCenterAttachment"
- Attachment79.Parent = Part71
- Attachment79.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment79.Position = Vector3.new(0, -1, 0)
- Attachment80.Name = "WaistBackAttachment"
- Attachment80.Parent = Part71
- Attachment80.CFrame = CFrame.new(0, -1, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Attachment80.Position = Vector3.new(0, -1, 0.5)
- Motor6D81.Name = "Right Shoulder"
- Motor6D81.Parent = Part71
- Motor6D81.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D81.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D81.Part0 = Part71
- Motor6D81.Part1 = Part66
- Motor6D81.MaxVelocity = 0.10000000149012
- Motor6D82.Name = "Left Shoulder"
- Motor6D82.Parent = Part71
- Motor6D82.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D82.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D82.Part0 = Part71
- Motor6D82.Part1 = Part61
- Motor6D82.MaxVelocity = 0.10000000149012
- Motor6D83.Name = "Right Hip"
- Motor6D83.Parent = Part71
- Motor6D83.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D83.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D83.Part0 = Part71
- Motor6D83.Part1 = Part69
- Motor6D83.MaxVelocity = 0.10000000149012
- Motor6D84.Name = "Left Hip"
- Motor6D84.Parent = Part71
- Motor6D84.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D84.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D84.Part0 = Part71
- Motor6D84.Part1 = Part64
- Motor6D84.MaxVelocity = 0.10000000149012
- Motor6D85.Name = "Neck"
- Motor6D85.Parent = Part71
- Motor6D85.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D85.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D85.Part0 = Part71
- Motor6D85.Part1 = Part33
- Motor6D85.MaxVelocity = 0.10000000149012
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement