{"AnimationHandler":"local AnimationHandler = {}\r\nAnimationHandler.__index = AnimationHandler\r\n\r\nfunction AnimationHandler.new(humanoid, animate)\r\n\tlocal self = setmetatable({}, AnimationHandler)\r\n\t\r\n\tself._AnimFuncs = require(\"Animate.Controller\")\r\n\tself.Humanoid = humanoid\r\n\t\r\n\treturn self\r\nend\r\n\r\nfunction AnimationHandler:EnableDefault(bool)\r\n\tif (bool) then\r\n\t\tself._AnimFuncs.onHook()\r\n\telse\r\n\t\tself._AnimFuncs.onUnhook()\r\n\tend\r\nend\r\n\r\nfunction AnimationHandler:Run(name, ...)\r\n\tself._AnimFuncs[name](...)\r\nend\r\n\r\nreturn AnimationHandler","CameraModifier":"local UIS = game:GetService(\"UserInputService\")\r\nlocal UserGameSettings = UserSettings():GetService(\"UserGameSettings\")\r\n\r\nlocal CameraModifier = {}\r\nCameraModifier.__index = CameraModifier\r\n\r\nlocal FFlagUserCameraToggle do\r\n\tlocal success, result = pcall(function()\r\n\t\treturn UserSettings():IsUserFeatureEnabled(\"UserCameraToggle\")\r\n\tend)\r\n\tFFlagUserCameraToggle = success and result\r\nend\r\n\r\nfunction CameraModifier.new(player)\r\n\tlocal self = setmetatable({}, CameraModifier)\r\n\t\r\n\tlocal playerModule = player.PlayerScripts:WaitForChild(\"PlayerModule\")\r\n\tlocal cameraModule = playerModule:WaitForChild(\"CameraModule\")\r\n\tlocal basecam = require(cameraModule:WaitForChild(\"BaseCamera\"))\r\n\tlocal cameraInput = require(cameraModule:WaitForChild(\"CameraInput\"))\r\n\tlocal cameraUI = require(cameraModule:WaitForChild(\"CameraUI\"))\r\n\tlocal cameraToggleStateController = require(cameraModule:WaitForChild(\"CameraToggleStateController\"))\r\n\t\r\n\tself.IsCamLocked = false\r\n\tself.BaseClass = basecam\r\n\tself.DefaultMouseBehavior = basecam.UpdateMouseBehavior\r\n\t\r\n\tfunction basecam.UpdateMouseBehavior(this)\r\n\t\tif FFlagUserCameraToggle and this.isCameraToggle then\r\n\t\t\tcameraUI.setCameraModeToastEnabled(true)\r\n\t\t\tcameraInput.enableCameraToggleInput()\r\n\t\t\tcameraToggleStateController(this.inFirstPerson)\r\n\t\telse\r\n\t\t\tif FFlagUserCameraToggle then\r\n\t\t\t\tcameraUI.setCameraModeToastEnabled(false)\r\n\t\t\t\tcameraInput.disableCameraToggleInput()\r\n\t\t\tend\r\n\t\t\t-- first time transition to first person mode or mouse-locked third person\r\n\t\t\tif this.inFirstPerson or this.inMouseLockedMode then\r\n\t\t\t\tUserGameSettings.RotationType = Enum.RotationType.CameraRelative\r\n\t\t\t\tUIS.MouseBehavior = Enum.MouseBehavior.LockCenter\r\n\t\t\t\t\r\n\t\t\t\tself.IsCamLocked = true\r\n\t\t\telse\r\n\t\t\t\tUserGameSettings.RotationType = Enum.RotationType.MovementRelative\r\n\t\t\t\tif this.isRightMouseDown or this.isMiddleMouseDown then\r\n\t\t\t\t\tUIS.MouseBehavior = Enum.MouseBehavior.LockCurrentPosition\r\n\t\t\t\telse\r\n\t\t\t\t\tUIS.MouseBehavior = Enum.MouseBehavior.Default\r\n\t\t\t\tend\r\n\t\t\t\t\r\n\t\t\t\tself.IsCamLocked = false\r\n\t\t\tend\r\n\t\tend\r\n\tend\r\n\t\r\n\treturn self\r\nend\r\n\r\n-- Public methods\r\n\r\nfunction CameraModifier:Destroy()\r\n\tself.BaseClass.UpdateMouseBehavior = self.DefaultMouseBehavior\r\nend\r\n\r\n--\r\n\r\nreturn CameraModifier","Animate.R6":"return function(script)\r\n\t\r\n\tlocal Figure = script.Parent\r\n\tlocal Torso = Figure:WaitForChild(\"Torso\")\r\n\tlocal RightShoulder = Torso:WaitForChild(\"Right Shoulder\")\r\n\tlocal LeftShoulder = Torso:WaitForChild(\"Left Shoulder\")\r\n\tlocal RightHip = Torso:WaitForChild(\"Right Hip\")\r\n\tlocal LeftHip = Torso:WaitForChild(\"Left Hip\")\r\n\tlocal Neck = Torso:WaitForChild(\"Neck\")\r\n\tlocal Humanoid = Figure:WaitForChild(\"Humanoid\")\r\n\tlocal pose = \"Standing\"\r\n\t\r\n\tlocal currentAnim = \"\"\r\n\tlocal currentAnimInstance = nil\r\n\tlocal currentAnimTrack = nil\r\n\tlocal currentAnimKeyframeHandler = nil\r\n\tlocal currentAnimSpeed = 1.0\r\n\tlocal animTable = {}\r\n\tlocal animNames = { \r\n\t\tidle = \t{\t\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=180435571\", weight = 9 },\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=180435792\", weight = 1 }\r\n\t\t\t\t},\r\n\t\twalk = \t{ \t\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=180426354\", weight = 10 } \r\n\t\t\t\t}, \r\n\t\trun = \t{\r\n\t\t\t\t\t{ id = \"run.xml\", weight = 10 } \r\n\t\t\t\t}, \r\n\t\tjump = \t{\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=125750702\", weight = 10 } \r\n\t\t\t\t}, \r\n\t\tfall = \t{\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=180436148\", weight = 10 } \r\n\t\t\t\t}, \r\n\t\tclimb = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=180436334\", weight = 10 } \r\n\t\t\t\t}, \r\n\t\tsit = \t{\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=178130996\", weight = 10 } \r\n\t\t\t\t},\t\r\n\t\ttoolnone = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182393478\", weight = 10 } \r\n\t\t\t\t},\r\n\t\ttoolslash = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=129967390\", weight = 10 } \r\n\t--\t\t\t\t{ id = \"slash.xml\", weight = 10 } \r\n\t\t\t\t},\r\n\t\ttoollunge = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=129967478\", weight = 10 } \r\n\t\t\t\t},\r\n\t\twave = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=128777973\", weight = 10 } \r\n\t\t\t\t},\r\n\t\tpoint = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=128853357\", weight = 10 } \r\n\t\t\t\t},\r\n\t\tdance1 = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182435998\", weight = 10 }, \r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182491037\", weight = 10 }, \r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182491065\", weight = 10 } \r\n\t\t\t\t},\r\n\t\tdance2 = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182436842\", weight = 10 }, \r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182491248\", weight = 10 }, \r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182491277\", weight = 10 } \r\n\t\t\t\t},\r\n\t\tdance3 = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182436935\", weight = 10 }, \r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182491368\", weight = 10 }, \r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=182491423\", weight = 10 } \r\n\t\t\t\t},\r\n\t\tlaugh = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=129423131\", weight = 10 } \r\n\t\t\t\t},\r\n\t\tcheer = {\r\n\t\t\t\t\t{ id = \"http://www.roblox.com/asset/?id=129423030\", weight = 10 } \r\n\t\t\t\t},\r\n\t}\r\n\tlocal dances = {\"dance1\", \"dance2\", \"dance3\"}\r\n\t\r\n\t-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote\r\n\tlocal emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}\r\n\t\r\n\tfunction configureAnimationSet(name, fileList)\r\n\t\tif (animTable[name] ~= nil) then\r\n\t\t\tfor _, connection in pairs(animTable[name].connections) do\r\n\t\t\t\tconnection:disconnect()\r\n\t\t\tend\r\n\t\tend\r\n\t\tanimTable[name] = {}\r\n\t\tanimTable[name].count = 0\r\n\t\tanimTable[name].totalWeight = 0\t\r\n\t\tanimTable[name].connections = {}\r\n\t\r\n\t\t-- check for config values\r\n\t\tlocal config = script:FindFirstChild(name)\r\n\t\tif (config ~= nil) then\r\n\t--\t\tprint(\"Loading anims \" .. name)\r\n\t\t\ttable.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))\r\n\t\t\ttable.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))\r\n\t\t\tlocal idx = 1\r\n\t\t\tfor _, childPart in pairs(config:GetChildren()) do\r\n\t\t\t\tif (childPart:IsA(\"Animation\")) then\r\n\t\t\t\t\ttable.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))\r\n\t\t\t\t\tanimTable[name][idx] = {}\r\n\t\t\t\t\tanimTable[name][idx].anim = childPart\r\n\t\t\t\t\tlocal weightObject = childPart:FindFirstChild(\"Weight\")\r\n\t\t\t\t\tif (weightObject == nil) then\r\n\t\t\t\t\t\tanimTable[name][idx].weight = 1\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tanimTable[name][idx].weight = weightObject.Value\r\n\t\t\t\t\tend\r\n\t\t\t\t\tanimTable[name].count = animTable[name].count + 1\r\n\t\t\t\t\tanimTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight\r\n\t\t--\t\t\tprint(name .. \" [\" .. idx .. \"] \" .. animTable[name][idx].anim.AnimationId .. \" (\" .. animTable[name][idx].weight .. \")\")\r\n\t\t\t\t\tidx = idx + 1\r\n\t\t\t\tend\r\n\t\t\tend\r\n\t\tend\r\n\t\r\n\t\t-- fallback to defaults\r\n\t\tif (animTable[name].count <= 0) then\r\n\t\t\tfor idx, anim in pairs(fileList) do\r\n\t\t\t\tanimTable[name][idx] = {}\r\n\t\t\t\tanimTable[name][idx].anim = Instance.new(\"Animation\")\r\n\t\t\t\tanimTable[name][idx].anim.Name = name\r\n\t\t\t\tanimTable[name][idx].anim.AnimationId = anim.id\r\n\t\t\t\tanimTable[name][idx].weight = anim.weight\r\n\t\t\t\tanimTable[name].count = animTable[name].count + 1\r\n\t\t\t\tanimTable[name].totalWeight = animTable[name].totalWeight + anim.weight\r\n\t--\t\t\tprint(name .. \" [\" .. idx .. \"] \" .. anim.id .. \" (\" .. anim.weight .. \")\")\r\n\t\t\tend\r\n\t\tend\r\n\tend\r\n\t\r\n\t-- Setup animation objects\r\n\tfunction scriptChildModified(child)\r\n\t\tlocal fileList = animNames[child.Name]\r\n\t\tif (fileList ~= nil) then\r\n\t\t\tconfigureAnimationSet(child.Name, fileList)\r\n\t\tend\t\r\n\tend\r\n\t\r\n\tscript.ChildAdded:connect(scriptChildModified)\r\n\tscript.ChildRemoved:connect(scriptChildModified)\r\n\t\r\n\t\r\n\tfor name, fileList in pairs(animNames) do \r\n\t\tconfigureAnimationSet(name, fileList)\r\n\tend\t\r\n\t\r\n\t-- ANIMATION\r\n\t\r\n\t-- declarations\r\n\tlocal toolAnim = \"None\"\r\n\tlocal toolAnimTime = 0\r\n\t\r\n\tlocal jumpAnimTime = 0\r\n\tlocal jumpAnimDuration = 0.3\r\n\t\r\n\tlocal toolTransitionTime = 0.1\r\n\tlocal fallTransitionTime = 0.3\r\n\tlocal jumpMaxLimbVelocity = 0.75\r\n\t\r\n\t-- functions\r\n\t\r\n\tfunction<click to see more...>