Advertisement
KrYn0MoRe

belt

Sep 7th, 2022 (edited)
1,160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 32.61 KB | None | 0 0
  1. -- animator
  2.  
  3. local function init()
  4.     local JointData = {}
  5.     JointData["Right Shoulder"] = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  6.     JointData["Left Shoulder"] = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  7.     JointData["Right Hip"] = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  8.     JointData["Left Hip"] = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  9.     JointData["Neck"] = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  10.     JointData["RootJoint"] = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  11.  
  12.     local Animator = {}
  13.     local Playing = {}
  14.     local JointC0 = {}
  15.  
  16.     local GlobalPlaying = _G['GlobalPlaying']
  17.     if not GlobalPlaying then
  18.         _G['GlobalPlaying'] = {}
  19.         GlobalPlaying = _G['GlobalPlaying']
  20.     end
  21.  
  22.     local global_welds = _G['global_welds']
  23.     if not global_welds then
  24.         _G['global_welds'] = {}
  25.         global_welds = _G['global_welds']
  26.     end
  27.  
  28.     local TS = game:GetService("TweenService")
  29.  
  30.     local function Ver(Model)
  31.         if Model and Model.Parent then
  32.             if not GlobalPlaying[Model] then
  33.                 GlobalPlaying[Model] = {}
  34.             end
  35.             if not Playing[Model] then
  36.                 Playing[Model] = {}
  37.                 return true
  38.             end
  39.         end
  40.     end
  41.  
  42.     function Animator.create_welds(targchar)
  43.         if not global_welds[targchar] then else
  44.             return
  45.         end
  46.  
  47.         local anim_welds = {}
  48.         local char_welds = {}
  49.  
  50.         for i,v in ipairs(targchar:GetDescendants()) do
  51.             if v:IsA("Motor6D") or v:IsA("Weld") then
  52.                 if game:GetService("CollectionService"):HasTag(v,'fakemotor') then
  53.                     anim_welds[v] = v.Part0
  54.                 elseif game:GetService("CollectionService"):HasTag(v,'realmotor') then
  55.                     char_welds[v] = v.Part0
  56.                 end
  57.             end
  58.         end
  59.  
  60.         for i,v in ipairs(targchar:GetDescendants()) do
  61.             if v:IsA("Motor6D") and not char_welds[v] then
  62.                 local m = Instance.new("Weld")
  63.                 m.Name = v.Name
  64.                 m.Part0 = v.Part0
  65.                 m.Part1 = v.Part1
  66.                 m.C0 = v.C0
  67.                 m.C1 = v.C1
  68.                 m.Parent = v.Parent
  69.  
  70.                 game:GetService("CollectionService"):AddTag(m,'fakemotor')
  71.                 game:GetService("CollectionService"):AddTag(v,'realmotor')
  72.  
  73.                 anim_welds[m] = v.Part0
  74.                 char_welds[v] = v.Part0
  75.             end
  76.         end
  77.  
  78.         global_welds[targchar] = {
  79.             anim_welds = anim_welds,
  80.             char_welds = char_welds,
  81.             taid = 0,
  82.         }
  83.     end
  84.  
  85.     function Animator.toggle_anim(mode,targchar)
  86.         local welds = global_welds[targchar]
  87.  
  88.         if welds then else
  89.             return
  90.         end
  91.  
  92.         welds.taid += 1
  93.         local cid = welds.taid
  94.  
  95.         local function run()
  96.             if cid == welds.taid then else return end
  97.             if mode then
  98.                 for i,v in pairs(welds.anim_welds) do
  99.                     i.Enabled = true
  100.                 end
  101.                 for i,v in pairs(welds.char_welds) do
  102.                     i.Enabled = false
  103.                 end
  104.             else
  105.                 for i,v in pairs(welds.char_welds) do
  106.                     i.Enabled = true
  107.                 end
  108.                 for i,v in pairs(welds.anim_welds) do
  109.                     i.Enabled = false
  110.                 end
  111.             end
  112.         end
  113.  
  114.         if not mode then
  115.             task.delay(0.2,run)
  116.         else
  117.             run()
  118.         end
  119.  
  120.         return cid
  121.     end
  122.  
  123.     function Animator.get_aid(targchar)
  124.         local welds = global_welds[targchar]
  125.         return welds.taid
  126.     end
  127.  
  128.     local function Play(self, FadeIn, Speed, Looped)
  129.         self.TimePosition = 0
  130.         self.StartInternal = os.clock()
  131.  
  132.         self.FadeIn = FadeIn or 0
  133.         self.Speed = Speed or self.Speed
  134.         self.Looped = Looped or self.Looped
  135.         self.LastPlayed = os.clock()
  136.         self.fired = {}
  137.         self.RecoverFade = {}
  138.  
  139.         local StopEvent = Instance.new("BindableEvent")
  140.         self.Stopped = StopEvent.Event
  141.         self.StopEvent = StopEvent
  142.  
  143.         local LoopedEvent = Instance.new("BindableEvent")
  144.         self.OnLooped = LoopedEvent.Event
  145.         self.LoopedEvent = LoopedEvent
  146.  
  147.         local KeyframeReachedEvent = Instance.new("BindableEvent")
  148.         self.KeyframeReached = KeyframeReachedEvent.Event
  149.         self.KeyframeReachedEvent = KeyframeReachedEvent
  150.  
  151.         local MarkerReachedEvent = Instance.new("BindableEvent")
  152.         self.MarkerReached = MarkerReachedEvent.Event
  153.         self.MarkerReachedEvent = MarkerReachedEvent
  154.  
  155.         local I = Playing[self.Model]
  156.         if I then else
  157.             return
  158.         end
  159.         self.Playing = true
  160.         I[self] = true
  161.     end
  162.  
  163.     local function Stop(self,fire)
  164.         local I = Playing[self.Model]
  165.         if I then
  166.             if fire then
  167.                 self.StopEvent:Fire()
  168.             end
  169.         end
  170.  
  171.         self.LastPlayed = 0
  172.         self.Playing = false
  173.         I[self] = nil
  174.  
  175.         self.Stopped = nil
  176.         if self.StopEvent then
  177.             self.StopEvent:Destroy()
  178.         end
  179.         self.StopEvent = nil
  180.  
  181.         self.OnLooped = nil
  182.         if self.StopEvent then
  183.             self.LoopedEvent:Destroy()
  184.         end
  185.         self.LoopedEvent = nil
  186.  
  187.         self.KeyframeReached = nil
  188.         if self.StopEvent then
  189.             self.KeyframeReachedEvent:Destroy()
  190.         end
  191.         self.KeyframeReachedEvent = nil
  192.  
  193.         self.MarkerReached = nil
  194.         if self.StopEvent then
  195.             self.MarkerReachedEvent:Destroy()
  196.         end
  197.         self.MarkerReachedEvent = nil
  198.  
  199.         self.FadeIn = nil
  200.     end
  201.  
  202.     local function Resume(self)
  203.         if self.PauseInternal then
  204.             self.StartInternal = os.clock() - self.PauseInternal
  205.         end
  206.         local I = Playing[self.Model]
  207.         self.Playing = true
  208.         I[self] = true
  209.     end
  210.  
  211.     local function Pause(self)
  212.         local TimeSince = os.clock() - self.StartInternal
  213.         self.PauseInternal = TimeSince
  214.         local I = Playing[self.Model]
  215.         self.Playing = false
  216.         I[self] = nil
  217.     end
  218.  
  219.     local function SetTime(self, Time)
  220.         self.StartInternal = os.clock() - Time
  221.     end
  222.  
  223.     local function AdjustSpeed(self, NewSpeed)
  224.         self.Speed = NewSpeed
  225.     end
  226.  
  227.     local function ft(t,c)
  228.         for i,v in pairs(t) do
  229.             --if i == 'Parent' or i == 'Name' or i == 'Marker' or i == 'Time' or i == 'CF' then continue end
  230.             if typeof(v) == 'table' then
  231.                 ft(v,true)
  232.                 local name = v.Name
  233.                 v.Name = nil
  234.                 local index_t = {
  235.                     Parent = t,
  236.                     Name = name or i,
  237.                 }
  238.                 if v.Marker then
  239.                     index_t.Marker = v.Marker
  240.                     v.Marker = nil
  241.                 end
  242.                 if v.Time then
  243.                     index_t.Time = v.Time
  244.                     v.Time = nil
  245.                 end
  246.                 if v.CF then
  247.                     index_t.CF = v.CF
  248.                     v.CF = nil
  249.                 end
  250.                 if tonumber(i) and not v.CF then
  251.                     index_t.Time = tonumber(i)
  252.                 end
  253.                 v = setmetatable(v,{
  254.                     __index = index_t
  255.                 })
  256.             end
  257.         end
  258.         return t
  259.     end
  260.  
  261.     local function iter(t)
  262.         local new_t = {}
  263.         for i,v in pairs(t) do
  264.             --if i == 'Parent' or i == 'Name' or i == 'Marker' or i == 'Time' or i == 'CF' then continue end
  265.             table.insert(new_t,v)
  266.             if typeof(v) == 'table' then
  267.                 for ii,vv in pairs(iter(v)) do
  268.                     table.insert(new_t,vv)
  269.                 end
  270.             end
  271.         end
  272.         return new_t
  273.     end
  274.  
  275.     local ModelAnimations = {}
  276.     local hasloaded = {}
  277.     local TrackKeyframes = {}
  278.  
  279.     function Animator.Preload(Track)
  280.         if TrackKeyframes[Track] then
  281.             return TrackKeyframes[Track]
  282.         end
  283.  
  284.         Track.Keyframes = ft(Track.Keyframes)
  285.         local kf = Track.Keyframes
  286.         table.sort(kf, function(a, b) return a.Time < b.Time end)
  287.  
  288.         local Keyframes = {}
  289.         local jdata = {}
  290.         local largest_time = 0
  291.  
  292.         do
  293.             for STime, SKeyframe in next, kf do
  294.                 STime = tonumber(STime)
  295.                 if STime > largest_time then
  296.                     largest_time = STime
  297.                 end
  298.                 local descendants = iter(SKeyframe)
  299.  
  300.                 local function set_marker(name)
  301.                     if not Keyframes['_null'] then
  302.                         Keyframes['_null'] = {}
  303.                     end
  304.                     Keyframes['_null'][#Keyframes['_null'] + 1] = {Time = STime, Name = name, Marker = 1, ["Info"] = nil}
  305.                 end
  306.  
  307.                 if 0 >= #descendants then
  308.                     set_marker(SKeyframe.Name)
  309.                 end
  310.                 for _,Pose in next, descendants do
  311.                     if typeof(Pose) ~= 'table' then continue end
  312.                     if Pose.Name == 'HumanoidRootPart' then continue end
  313.  
  314.                     if Pose.Marker then
  315.                         set_marker(Pose.Name)
  316.                     end
  317.  
  318.                     local P0 = Pose.Parent.Name
  319.                     local P1 = Pose.Name
  320.  
  321.                     local JT = Keyframes[P0..'KEyjtsep'..P1]
  322.                     if not JT then
  323.                         JT = {}
  324.                         Keyframes[P0..'KEyjtsep'..P1] = JT
  325.                         jdata[P0..'KEyjtsep'..P1] = 1
  326.                     end
  327.  
  328.                     local Style = Pose.ES or 'Linear'
  329.                     local Direction = Pose.ED or 'In'
  330.                     local Weight = Pose.Weight or 1
  331.                     local PCF = Pose.CF
  332.  
  333.                     if not PCF then continue end
  334.  
  335.                     local CF
  336.                     for i,v in pairs(PCF) do
  337.                         PCF[i] = tonumber(v)
  338.                     end
  339.  
  340.                     if PCF[1] then
  341.                         CF = CFrame.new(PCF[1],PCF[2],PCF[3])
  342.                     else
  343.                         CF = CFrame.new()
  344.                     end
  345.                     if PCF[4] then
  346.                         CF = CF*CFrame.Angles(math.rad(PCF[4]),math.rad(PCF[5]),math.rad(PCF[6]))
  347.                     end
  348.  
  349.                     local Info = {EasingStyle = Style, EasingDirection = Direction, Weight = Weight, CFrame = CF}
  350.  
  351.                     JT[#JT+1] = {Time = STime, Name = SKeyframe.Name, ["Info"] = Info}
  352.                 end
  353.             end
  354.  
  355.             for Joint,Poses in pairs(Keyframes) do
  356.                 table.sort(Poses, function(a, b) return a.Time < b.Time end)
  357.             end
  358.  
  359.             TrackKeyframes[Track] = {
  360.                 Keyframes,
  361.                 jdata,
  362.                 largest_time
  363.             }
  364.  
  365.             return TrackKeyframes[Track]
  366.         end
  367.     end
  368.  
  369.     function Animator.LoadAnimation(Track, Model)
  370.         assert(Track,'No track.')
  371.         assert(Model,'No model.')
  372.         local notmodel
  373.         if not ModelAnimations[Model] then
  374.             notmodel = true
  375.             ModelAnimations[Model] = {}
  376.             ModelAnimations[Model].Joints = {}
  377.         elseif ModelAnimations[Model][Track] then
  378.             return ModelAnimations[Model][Track]
  379.         end
  380.         local Animation = {}
  381.         ModelAnimations[Model][Track] = Animation
  382.  
  383.         if not hasloaded[Track] then
  384.             Track.Properties.Priority = Enum.AnimationPriority[Track.Properties.Priority]
  385.         end
  386.  
  387.         local set_model = Ver(Model)
  388.  
  389.         local largest_time = 0
  390.  
  391.         if not GlobalPlaying[Model][Animation] then
  392.             GlobalPlaying[Model][Animation] = {}
  393.         end
  394.  
  395.         if notmodel then
  396.             local function new_joint(Obj)
  397.                 if Obj:IsA("Weld") then
  398.                     local P0 = Obj.Part0
  399.                     local P1 = Obj.Part1
  400.                     if not P0 or not P1 then return end
  401.  
  402.                     local jd = JointData[Obj.Name]
  403.                     if jd then
  404.                         Obj.C0 = jd
  405.                         JointC0[Obj] = jd
  406.                     else
  407.                         JointC0[Obj] = Obj.C0
  408.                     end
  409.  
  410.                     local T = ModelAnimations[Model].Joints[P0.Name]
  411.                     if not T then
  412.                         T = {}
  413.                         ModelAnimations[Model].Joints[P0.Name] = T
  414.                     end
  415.                     if not T[P1.Name] then
  416.                         T[P1.Name] = Obj
  417.                     end
  418.                 end
  419.             end
  420.  
  421.             for _,v in ipairs(Model:GetDescendants()) do
  422.                 new_joint(v)
  423.             end
  424.             Model.DescendantAdded:Connect(new_joint)
  425.         end
  426.  
  427.         local track_data = Animator.Preload(Track)
  428.         if track_data then
  429.             local Keyframes,jdata,lt = unpack(track_data)
  430.             Animation.Keyframes = Keyframes
  431.             GlobalPlaying[Model][Animation] = jdata
  432.             largest_time = lt
  433.         else
  434.             error('No track preloaded.')
  435.         end
  436.  
  437.         Animation.TimePosition = 0
  438.         Animation.TimeLength = largest_time
  439.         Animation.Track = Track
  440.         Animation.Model = Model
  441.         Animation.TimeScale = 1
  442.         Animation.GeneralWeight = 1
  443.         Animation.Play = Play
  444.         Animation.Stop = Stop
  445.         Animation.Resume = Resume
  446.         Animation.Pause = Pause
  447.         Animation.SetTime = SetTime
  448.         Animation.AdjustSpeed = AdjustSpeed
  449.         Animation.Looped = Track.Properties.Looping or false
  450.         Animation.Speed = 1
  451.         Animation.FadeIn = 0
  452.         Animation.LastPlayed = 0
  453.         Animation.i = 0
  454.         Animation.Playing = false
  455.         Animation.fired = {}
  456.         Animation.RecoverFade = {}
  457.  
  458.         if Track.Properties.Priority == Enum.AnimationPriority.Idle then
  459.             Animation.Priority = 1
  460.         elseif Track.Properties.Priority == Enum.AnimationPriority.Movement then
  461.             Animation.Priority = 2
  462.         elseif Track.Properties.Priority == Enum.AnimationPriority.Action then
  463.             Animation.Priority = 3
  464.         else--if Track.Properties.Priority == Enum.AnimationPriority.Core then
  465.             Animation.Priority = 0
  466.         end
  467.  
  468.         Animation.StartInternal = 0
  469.         Animation.PauseInternal = 0
  470.  
  471.         Animation.GetTimeOfKeyframe = function(name)
  472.             for Time,v in ipairs(Animation.Keyframes) do
  473.                 if v.Name == name then
  474.                     return Time
  475.                 end
  476.             end
  477.         end
  478.  
  479.         hasloaded[Track] = true
  480.  
  481.         return Animation
  482.     end
  483.  
  484.     local CF = CFrame.new()
  485.     local function GetPose(TimeSince, Poses, Joint, Animation)
  486.         for i = 1,#Poses do
  487.             local Keyframe = Poses[i]
  488.             local NextKeyframe = Poses[i+1]
  489.             local Time = Keyframe.Time
  490.  
  491.             --local JT = Joint.Transform
  492.  
  493.             if TimeSince >= Time then
  494.                 if not Animation.fired[Keyframe.Name .. Time] and Keyframe.Name ~= 'Keyframe' then
  495.                     Animation.fired[Keyframe.Name .. Time] = 1
  496.                     if Keyframe.Marker then -- keymarker
  497.                         Animation.MarkerReachedEvent:Fire(Keyframe.Name)
  498.                     else -- keyframe
  499.                         Animation.KeyframeReachedEvent:Fire(Keyframe.Name)
  500.                     end
  501.                 end
  502.             end
  503.  
  504.             if (TimeSince >= Time) or Poses[1].Time > TimeSince then
  505.                 if NextKeyframe then
  506.                     local NextTime = NextKeyframe.Time
  507.                     if TimeSince < NextTime then
  508.                         if Keyframe.Marker then
  509.                             return {nil, nil, Keyframe.Name, Time, Keyframe.Marker}
  510.                         end
  511.                         local Info1 = Keyframe.Info
  512.                         local Info2 = NextKeyframe.Info
  513.  
  514.                         local Alpha = (TimeSince - Time) / (NextTime - Time)
  515.  
  516.                         local CFA = CF:Lerp(Info1.CFrame, Info1.Weight)
  517.                         local CFB = CF:Lerp(Info2.CFrame, Info2.Weight)
  518.  
  519.                         local Pose
  520.                         if Info2.EasingStyle == 'Constant' then
  521.                             Pose = CFA
  522.                         else
  523.                             Pose = CFA:Lerp(CFB, TS:GetValue(Alpha, Enum.EasingStyle[Info2.EasingStyle], Enum.EasingDirection[Info2.EasingDirection]))
  524.                         end
  525.  
  526.                         return {Joint, Pose, Keyframe.Name, Time}
  527.                     end
  528.                 else
  529.                     if Keyframe.Marker then
  530.                         return {nil, nil, Keyframe.Name, Time, Keyframe.Marker}
  531.                     end
  532.                     return {Joint, Keyframe.Info.CFrame, Keyframe.Name, Time}
  533.                 end
  534.             end
  535.         end
  536.     end
  537.  
  538.     local total_playing = 0
  539.  
  540.     local function UpdatePlaying()
  541.         local tp = 0
  542.         for Model, Animations in next, Playing do
  543.             for Animation,_ in next, Animations do
  544.                 if not Animation.Playing then
  545.                     continue
  546.                 end
  547.                 if not Model or not Model.Parent then
  548.                     Playing[Model] = nil
  549.                     Animation.FadeIn = nil
  550.                     Animation.fired = {}
  551.                     Animation.Playing = false
  552.  
  553.                     continue
  554.                 end
  555.  
  556.                 local TimeSince = Animation.StartInternal
  557.                 TimeSince = os.clock() - ((os.clock() - TimeSince) * Animation.Speed)
  558.                 TimeSince = os.clock() - TimeSince
  559.  
  560.                 --local TimeSince = os.clock() - Animation.StartInternal
  561.                 --TimeSince = TimeSince * Animation.Speed
  562.  
  563.                 if Animation.FadeIn then
  564.                     Animation.OFadeIn = Animation.FadeIn
  565.                 end
  566.  
  567.                 local Length = Animation.TimeLength
  568.  
  569.                 if TimeSince > Length then
  570.                     Animation.FadeIn = nil
  571.                     Animation.fired = {}
  572.                     if Animation.Looped then
  573.                         Animation.LoopedEvent:Fire()
  574.                         if 0 >= Length then
  575.                             TimeSince = 0
  576.                         else
  577.                             TimeSince = TimeSince%Length
  578.                         end
  579.                         --Animation.StartInternal += Length-TimeSince
  580.                     else
  581.                         Animation.TimePosition = 0
  582.                         Playing[Model][Animation] = nil
  583.                         Animation.Playing = false
  584.                         Animation.StopEvent:Fire()
  585.                         continue
  586.                     end
  587.                 end
  588.  
  589.                 local Keyframes = Animation.Keyframes
  590.  
  591.                 if Keyframes then else continue end
  592.                 tp += 1
  593.                 local ToAnimate = {}
  594.                 local StartFade = nil
  595.                 for Joint, Poses in pairs(Keyframes) do
  596.                     local strjoint = Joint
  597.                     local jd = string.split(strjoint,'KEyjtsep')
  598.                     local Joint
  599.                     if jd[1] and jd[2] then
  600.                         Joint = ModelAnimations[Model].Joints[jd[1]]
  601.                         if not Joint then
  602.                             continue
  603.                         end
  604.                         Joint = Joint[jd[2]]
  605.                         if not Joint then
  606.                             continue
  607.                         end
  608.                     end
  609.                     if not Poses[1] or not Poses[1].Marker then
  610.                         local f,fade
  611.                         for i,using in pairs(GlobalPlaying[Model]) do
  612.                             if i ~= Animation then else
  613.                                 continue
  614.                             end
  615.                             if i.Playing then else
  616.                                 continue
  617.                             end
  618.                             if using[strjoint] then else
  619.                                 continue
  620.                             end
  621.                             if i.Priority > Animation.Priority or (i.Priority == Animation.Priority and i.LastPlayed > Animation.LastPlayed) then else
  622.                                 continue
  623.                             end
  624.                             f = true
  625.                         end
  626.                         if f then
  627.                             Animation.RecoverFade[Joint.Name] = os.clock()
  628.                             continue
  629.                         end
  630.                     end
  631.                     if Poses[1] and Poses[1].Time > TimeSince then
  632.                         --StartFade = Poses[1].Time * Animation.Speed
  633.                     end
  634.  
  635.                     ToAnimate[#ToAnimate+1] = GetPose(TimeSince, Poses, Joint, Animation)
  636.                 end
  637.                 for i = 1,#ToAnimate do
  638.                     local Pose = ToAnimate[i]
  639.                     if not Pose[5] then
  640.                         local TCF = Pose[2]
  641.                         local FadeIn = Animation.FadeIn
  642.                         local RF = Animation.RecoverFade[Pose[1].Name]
  643.                         local TimeSince = TimeSince
  644.                         if RF then
  645.                             TimeSince = os.clock()-RF
  646.                             if TimeSince >= Length then
  647.                                 Animation.RecoverFade[Pose[1].Name] = nil
  648.                             else
  649.                                 FadeIn = Animation.OFadeIn
  650.                             end
  651.                         end
  652.                         TCF = JointC0[Pose[1]] * TCF
  653.                         if StartFade then
  654.                             TCF = Pose[1].C0:Lerp(TCF, TimeSince / StartFade)
  655.                         elseif FadeIn and TimeSince < FadeIn then
  656.                             TCF = Pose[1].C0:Lerp(TCF, TimeSince / FadeIn)
  657.                         end
  658.                         Pose[1].C0 = TCF
  659.                     end
  660.                 end
  661.  
  662.                 Animation.TimePosition = TimeSince
  663.             end
  664.         end
  665.         total_playing = tp
  666.     end
  667.  
  668.     function Animator.GetPlaying()
  669.         return total_playing
  670.     end
  671.  
  672.     local con
  673.     if game:GetService("RunService"):IsClient() then
  674.         con = game:GetService("RunService").RenderStepped:Connect(UpdatePlaying)
  675.     else
  676.         con = game:GetService("RunService").Stepped:Connect(UpdatePlaying)
  677.     end
  678.  
  679.     return Animator,con
  680. end
  681.  
  682. -- anims
  683.  
  684. local default_anims = game:GetService("HttpService"):GetAsync('https://pastebin.com/raw/0JSVJpVB')
  685. default_anims = game:GetService("HttpService"):JSONDecode(default_anims)
  686.  
  687. -- anims
  688.  
  689. local anims = {}
  690.  
  691. local function add_anim(li)
  692.     local a = game:GetService("HttpService"):GetAsync(li)
  693.     a = game:GetService("HttpService"):JSONDecode(a)
  694.     if a then
  695.         for i,v in pairs(a) do
  696.             anims[i] = v
  697.         end
  698.     end
  699. end
  700.  
  701. add_anim('https://pastebin.com/raw/dhCkVwux')
  702.  
  703. -- starter
  704.  
  705. local plr = owner
  706. local char = plr.Character
  707. local hum = char:FindFirstChildOfClass("Humanoid")
  708. local root = char:FindFirstChild("HumanoidRootPart")
  709.  
  710. if hum.RigType == Enum.HumanoidRigType.R6 then else
  711.     warn('Humanoid is not R6')
  712.     return
  713. end
  714.  
  715. --
  716.  
  717. local animator,con = init()
  718.  
  719. animator.create_welds(char)
  720. animator.toggle_anim(false,char)
  721.  
  722. for i,v in pairs(anims) do
  723.     animator.Preload(v)
  724. end
  725. for i,v in pairs(default_anims) do
  726.     animator.Preload(v)
  727. end
  728.  
  729. function load(anim,targchar)
  730.     targchar = targchar or char
  731.     return animator.LoadAnimation(anim,targchar)
  732. end
  733.  
  734. local move_anims = {
  735.     fall = {
  736.         anim = default_anims.fall,
  737.         fade = 0.3,
  738.     },
  739.     climb = {
  740.         anim = default_anims.climb,
  741.         fade = 0.2,
  742.     },
  743.     jump = {
  744.         anim = default_anims.jump,
  745.         fade = 0.2,
  746.     },
  747.     walk = {
  748.         anim = default_anims.walk,
  749.         fade = 0.2,
  750.     },
  751.     idle = {
  752.         anim = default_anims.idle,
  753.         fade = 0.3,
  754.     },
  755.     sit = {
  756.         anim = default_anims.sit,
  757.         fade = 0.5,
  758.     },
  759. }
  760.  
  761. local jumped = false
  762. local paused_default = false
  763. local current_move = nil
  764.  
  765. function play_move_anim(cid)
  766.     if not cid then
  767.         for id,data in pairs(move_anims) do
  768.             local anim = load(data.anim)
  769.             if anim.Playing then
  770.                 anim:Stop()
  771.             end
  772.         end
  773.         return
  774.     end
  775.     local data = move_anims[cid]
  776.     local anim = load(data.anim)
  777.     if cid == 'walk' then
  778.         --data.anim:AdjustSpeed(hum.WalkSpeed/16)
  779.     end
  780.     if not anim.Playing then
  781.         if current_move then
  782.             local data = move_anims[current_move]
  783.             local anim = load(data.anim)
  784.             anim:Stop()
  785.         end
  786.         current_move = cid
  787.         anim:Play(data.fade, nil, true)
  788.     end
  789. end
  790.  
  791. --
  792.  
  793. function sleep(n)
  794.     return task.wait(n or 0)
  795. end
  796.  
  797. local function wrap(func)
  798.     coroutine.resume(coroutine.create(func))
  799. end
  800.  
  801. function play_sound(par,id,vol,speed,loop,perm)
  802.     local s = Instance.new("Sound")
  803.     s.SoundId = 'rbxassetid://' .. id
  804.     s.Volume = vol or 0.5
  805.     s.PlaybackSpeed = speed or 1
  806.     s.Looped = loop or false
  807.     s.Parent = par or root
  808.     if not perm then
  809.         s:Play()
  810.     end
  811.     if not loop and not perm then
  812.         s.Ended:Connect(function()
  813.             sleep()
  814.             s:Destroy()
  815.         end)
  816.     end
  817.     return s
  818. end
  819.  
  820. function hitbox(hb,ignore,func)
  821.     local hit = {}
  822.  
  823.     local params = OverlapParams.new()
  824.     params.FilterDescendantsInstances = ignore or {char}
  825.     params.FilterType = Enum.RaycastFilterType.Blacklist
  826.     params.MaxParts = 100
  827.  
  828.     for _,box in ipairs(hb) do
  829.         for i,obj in ipairs(workspace:GetPartsInPart(box,params)) do
  830.             local targchar = obj.Parent
  831.             local targhum
  832.             pcall(function()
  833.                 targhum = targchar:FindFirstChildOfClass("Humanoid")
  834.             end)
  835.             local targroot
  836.             pcall(function()
  837.                 targroot = targchar:FindFirstChild("HumanoidRootPart") or targchar:FindFirstChild("Torso")
  838.             end)
  839.             if targchar and not hit[targchar] and targhum and targroot then
  840.                 hit[targchar] = {targchar,targroot,obj}
  841.                 func(targchar,targroot,targhum)
  842.             end
  843.         end
  844.     end
  845. end
  846.  
  847. --
  848.  
  849. do
  850.     Tool0 = Instance.new("Tool")
  851.     Part1 = Instance.new("Part")
  852.     Part2 = Instance.new("Part")
  853.     Part3 = Instance.new("Part")
  854.     Part4 = Instance.new("Part")
  855.     Part5 = Instance.new("Part")
  856.     Part6 = Instance.new("Part")
  857.     Part7 = Instance.new("Part")
  858.     Part8 = Instance.new("Part")
  859.     Part9 = Instance.new("Part")
  860.     Part10 = Instance.new("Part")
  861.     Part11 = Instance.new("Part")
  862.     Part12 = Instance.new("Part")
  863.     Part13 = Instance.new("Part")
  864.     Tool0.Parent = nil
  865.     Part1.Name = "main"
  866.     Part1.Parent = Tool0
  867.     Part1.CFrame = CFrame.new(-12.3988037, 1.79999995, 2.77315688, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  868.     Part1.Position = Vector3.new(-12.3988037109375, 1.7999999523162842, 2.7731568813323975)
  869.     Part1.Color = Color3.new(0.411765, 0.25098, 0.156863)
  870.     Part1.Transparency = 1
  871.     Part1.Size = Vector3.new(0.5, 0.30000001192092896, 0.5)
  872.     Part1.BottomSurface = Enum.SurfaceType.Smooth
  873.     Part1.BrickColor = BrickColor.new("Reddish brown")
  874.     Part1.CanCollide = false
  875.     Part1.TopSurface = Enum.SurfaceType.Smooth
  876.     Part1.brickColor = BrickColor.new("Reddish brown")
  877.     Part2.Parent = Part1
  878.     Part2.CFrame = CFrame.new(-12.3988037, 1.89999998, 2.77315688, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  879.     Part2.Position = Vector3.new(-12.3988037109375, 1.899999976158142, 2.7731568813323975)
  880.     Part2.Color = Color3.new(0.411765, 0.25098, 0.156863)
  881.     Part2.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  882.     Part2.Anchored = true
  883.     Part2.BottomSurface = Enum.SurfaceType.Smooth
  884.     Part2.BrickColor = BrickColor.new("Reddish brown")
  885.     Part2.CanCollide = false
  886.     Part2.TopSurface = Enum.SurfaceType.Smooth
  887.     Part2.brickColor = BrickColor.new("Reddish brown")
  888.     Part3.Parent = Part1
  889.     Part3.CFrame = CFrame.new(-12.3988037, 1.96129727, 3.23875642, 1, 0, 0, 0, 0.965925813, 0.258819044, 0, -0.258819044, 0.965925813)
  890.     Part3.Orientation = Vector3.new(-15, 0, 0)
  891.     Part3.Position = Vector3.new(-12.3988037109375, 1.9612972736358643, 3.2387564182281494)
  892.     Part3.Rotation = Vector3.new(-15, 0, 0)
  893.     Part3.Color = Color3.new(0.411765, 0.25098, 0.156863)
  894.     Part3.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  895.     Part3.Anchored = true
  896.     Part3.BottomSurface = Enum.SurfaceType.Smooth
  897.     Part3.BrickColor = BrickColor.new("Reddish brown")
  898.     Part3.CanCollide = false
  899.     Part3.TopSurface = Enum.SurfaceType.Smooth
  900.     Part3.brickColor = BrickColor.new("Reddish brown")
  901.     Part4.Parent = Part1
  902.     Part4.CFrame = CFrame.new(-12.3988037, 2.14101195, 3.67262602, 1, 0, 0, 0, 0.866025388, 0.5, 0, -0.5, 0.866025388)
  903.     Part4.Orientation = Vector3.new(-30, 0, 0)
  904.     Part4.Position = Vector3.new(-12.3988037109375, 2.141011953353882, 3.67262601852417)
  905.     Part4.Rotation = Vector3.new(-30, 0, 0)
  906.     Part4.Color = Color3.new(0.411765, 0.25098, 0.156863)
  907.     Part4.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  908.     Part4.Anchored = true
  909.     Part4.BottomSurface = Enum.SurfaceType.Smooth
  910.     Part4.BrickColor = BrickColor.new("Reddish brown")
  911.     Part4.CanCollide = false
  912.     Part4.TopSurface = Enum.SurfaceType.Smooth
  913.     Part4.brickColor = BrickColor.new("Reddish brown")
  914.     Part5.Parent = Part1
  915.     Part5.CFrame = CFrame.new(-12.3988037, 1.96300101, 2.29461646, 1, 0, 0, 0, 0.965925813, -0.258819044, 0, 0.258819044, 0.965925813)
  916.     Part5.Orientation = Vector3.new(15, 0, 0)
  917.     Part5.Position = Vector3.new(-12.3988037109375, 1.963001012802124, 2.294616460800171)
  918.     Part5.Rotation = Vector3.new(15, 0, 0)
  919.     Part5.Color = Color3.new(0.411765, 0.25098, 0.156863)
  920.     Part5.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  921.     Part5.Anchored = true
  922.     Part5.BottomSurface = Enum.SurfaceType.Smooth
  923.     Part5.BrickColor = BrickColor.new("Reddish brown")
  924.     Part5.CanCollide = false
  925.     Part5.TopSurface = Enum.SurfaceType.Smooth
  926.     Part5.brickColor = BrickColor.new("Reddish brown")
  927.     Part6.Parent = Part1
  928.     Part6.CFrame = CFrame.new(-12.3988037, 1.90770078, 1.87456977, 1, 0, 0, 0, 0.866025269, 0.49999994, 0, -0.49999994, 0.866025269)
  929.     Part6.Orientation = Vector3.new(-30, 0, 0)
  930.     Part6.Position = Vector3.new(-12.3988037109375, 1.907700777053833, 1.8745697736740112)
  931.     Part6.Rotation = Vector3.new(-30, 0, 0)
  932.     Part6.Color = Color3.new(0.411765, 0.25098, 0.156863)
  933.     Part6.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  934.     Part6.Anchored = true
  935.     Part6.BottomSurface = Enum.SurfaceType.Smooth
  936.     Part6.BrickColor = BrickColor.new("Reddish brown")
  937.     Part6.CanCollide = false
  938.     Part6.TopSurface = Enum.SurfaceType.Smooth
  939.     Part6.brickColor = BrickColor.new("Reddish brown")
  940.     Part7.Parent = Part1
  941.     Part7.CFrame = CFrame.new(-12.3988037, 1.63449574, 1.80136478, 1, 0, 0, 0, -0.499999821, 0.866025031, 0, -0.866025031, -0.499999821)
  942.     Part7.Orientation = Vector3.new(-60, 180, 180)
  943.     Part7.Position = Vector3.new(-12.3988037109375, 1.634495735168457, 1.801364779472351)
  944.     Part7.Rotation = Vector3.new(-120, 0, 0)
  945.     Part7.Color = Color3.new(0.411765, 0.25098, 0.156863)
  946.     Part7.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  947.     Part7.Anchored = true
  948.     Part7.BottomSurface = Enum.SurfaceType.Smooth
  949.     Part7.BrickColor = BrickColor.new("Reddish brown")
  950.     Part7.CanCollide = false
  951.     Part7.TopSurface = Enum.SurfaceType.Smooth
  952.     Part7.brickColor = BrickColor.new("Reddish brown")
  953.     Part8.Parent = Part1
  954.     Part8.CFrame = CFrame.new(-12.3988037, 1.56129074, 2.0745697, 1, 0, 0, 0, -0.866024315, -0.499999434, 0, 0.499999434, -0.866024315)
  955.     Part8.Orientation = Vector3.new(30, 180, 180)
  956.     Part8.Position = Vector3.new(-12.3988037109375, 1.5612907409667969, 2.0745697021484375)
  957.     Part8.Rotation = Vector3.new(150, 0, 0)
  958.     Part8.Color = Color3.new(0.411765, 0.25098, 0.156863)
  959.     Part8.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  960.     Part8.Anchored = true
  961.     Part8.BottomSurface = Enum.SurfaceType.Smooth
  962.     Part8.BrickColor = BrickColor.new("Reddish brown")
  963.     Part8.CanCollide = false
  964.     Part8.TopSurface = Enum.SurfaceType.Smooth
  965.     Part8.brickColor = BrickColor.new("Reddish brown")
  966.     Part9.Parent = Part1
  967.     Part9.CFrame = CFrame.new(-12.3988037, 1.72376347, 2.52095985, 1, 0, 0, 0, -0.984804153, -0.173647612, 0, 0.173647612, -0.984804153)
  968.     Part9.Orientation = Vector3.new(10, 180, 180)
  969.     Part9.Position = Vector3.new(-12.3988037109375, 1.7237634658813477, 2.5209598541259766)
  970.     Part9.Rotation = Vector3.new(170, 0, 0)
  971.     Part9.Color = Color3.new(0.411765, 0.25098, 0.156863)
  972.     Part9.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  973.     Part9.Anchored = true
  974.     Part9.BottomSurface = Enum.SurfaceType.Smooth
  975.     Part9.BrickColor = BrickColor.new("Reddish brown")
  976.     Part9.CanCollide = false
  977.     Part9.TopSurface = Enum.SurfaceType.Smooth
  978.     Part9.brickColor = BrickColor.new("Reddish brown")
  979.     Part10.Parent = Part1
  980.     Part10.CFrame = CFrame.new(-12.3988037, 1.7237637, 2.99599719, 1, 0, 0, 0, -0.984807789, 0.173648089, 0, -0.173648089, -0.984807789)
  981.     Part10.Orientation = Vector3.new(-10, 180, 180)
  982.     Part10.Position = Vector3.new(-12.3988037109375, 1.7237637042999268, 2.995997190475464)
  983.     Part10.Rotation = Vector3.new(-170, 0, 0)
  984.     Part10.Color = Color3.new(0.411765, 0.25098, 0.156863)
  985.     Part10.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  986.     Part10.Anchored = true
  987.     Part10.BottomSurface = Enum.SurfaceType.Smooth
  988.     Part10.BrickColor = BrickColor.new("Reddish brown")
  989.     Part10.CanCollide = false
  990.     Part10.TopSurface = Enum.SurfaceType.Smooth
  991.     Part10.brickColor = BrickColor.new("Reddish brown")
  992.     Part11.Parent = Part1
  993.     Part11.CFrame = CFrame.new(-12.3988037, 1.56129074, 3.44238758, 1, 0, 0, 0, -0.866025448, 0.49999994, 0, -0.49999994, -0.866025448)
  994.     Part11.Orientation = Vector3.new(-30, 180, 180)
  995.     Part11.Position = Vector3.new(-12.3988037109375, 1.5612907409667969, 3.442387580871582)
  996.     Part11.Rotation = Vector3.new(-150, 0, 0)
  997.     Part11.Color = Color3.new(0.411765, 0.25098, 0.156863)
  998.     Part11.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  999.     Part11.Anchored = true
  1000.     Part11.BottomSurface = Enum.SurfaceType.Smooth
  1001.     Part11.BrickColor = BrickColor.new("Reddish brown")
  1002.     Part11.CanCollide = false
  1003.     Part11.TopSurface = Enum.SurfaceType.Smooth
  1004.     Part11.brickColor = BrickColor.new("Reddish brown")
  1005.     Part12.Parent = Part1
  1006.     Part12.CFrame = CFrame.new(-12.3988037, 1.25594175, 3.80628848, 1, 0, 0, 0, -0.642787695, 0.766044378, 0, -0.766044378, -0.642787695)
  1007.     Part12.Orientation = Vector3.new(-50, 180, 180)
  1008.     Part12.Position = Vector3.new(-12.3988037109375, 1.2559417486190796, 3.806288480758667)
  1009.     Part12.Rotation = Vector3.new(-130, 0, 0)
  1010.     Part12.Color = Color3.new(0.411765, 0.25098, 0.156863)
  1011.     Part12.Size = Vector3.new(0.5, 0.10000000149011612, 0.5)
  1012.     Part12.Anchored = true
  1013.     Part12.BottomSurface = Enum.SurfaceType.Smooth
  1014.     Part12.BrickColor = BrickColor.new("Reddish brown")
  1015.     Part12.CanCollide = false
  1016.     Part12.TopSurface = Enum.SurfaceType.Smooth
  1017.     Part12.brickColor = BrickColor.new("Reddish brown")
  1018.     Part13.Name = "hitbox"
  1019.     Part13.Parent = Part1
  1020.     Part13.CFrame = CFrame.new(-12.3988037, 1.75, 2.87315702, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1021.     Part13.Position = Vector3.new(-12.3988037109375, 1.75, 2.873157024383545)
  1022.     Part13.Color = Color3.new(0.411765, 0.25098, 0.156863)
  1023.     Part13.Transparency = 1
  1024.     Part13.Size = Vector3.new(1, 1.600000023841858, 2.700000047683716)
  1025.     Part13.Anchored = true
  1026.     Part13.BottomSurface = Enum.SurfaceType.Smooth
  1027.     Part13.BrickColor = BrickColor.new("Reddish brown")
  1028.     Part13.CanCollide = false
  1029.     Part13.TopSurface = Enum.SurfaceType.Smooth
  1030.     Part13.brickColor = BrickColor.new("Reddish brown")
  1031.    
  1032.     local tool = Tool0
  1033.    
  1034.     tool.Name = 'BELT'
  1035.     tool.RequiresHandle = false
  1036.    
  1037.     tool.main.CanCollide = true
  1038.  
  1039.     for i,v in pairs(tool.main:GetChildren()) do
  1040.         if v:IsA("BasePart") then
  1041.             v.Anchored = false
  1042.             if v ~= tool.main then
  1043.                 local w = Instance.new("Weld")
  1044.                 w.Part0 = tool.main
  1045.                 w.Part1 = v
  1046.                 w.C0 = w.Part0.CFrame:Inverse()
  1047.                 w.C1 = w.Part1.CFrame:Inverse()
  1048.                 w.Parent = v
  1049.             end
  1050.         end
  1051.     end
  1052.    
  1053.     local w = Instance.new("Weld")
  1054.     w.Part0 = nil
  1055.     w.Part1 = tool.main
  1056.     w.C1 = CFrame.new(0,-0.7,0)*CFrame.new(0,math.rad(90),0)
  1057.     w.Parent = tool.main
  1058.    
  1059.     tool.Parent = plr:FindFirstChildOfClass("Backpack")
  1060.    
  1061.     local using = false
  1062.    
  1063.     function swing()
  1064.         if using then
  1065.             return
  1066.         end
  1067.         using = true
  1068.        
  1069.         local anim = load(anims.swing)
  1070.         anim:Play()
  1071.        
  1072.         play_sound(tool.main,1306070008,0.5,math.random(95,105)/100)
  1073.        
  1074.         local st = os.clock()
  1075.         repeat
  1076.             hitbox({tool.main.hitbox},nil,function(targchar,targroot,targhum)
  1077.                 if targhum.Health > 0 then else
  1078.                     return
  1079.                 end
  1080.                 play_sound(tool.main,4533871268,0.5,math.random(95,105)/100) -- 8556065163
  1081.                 targchar:BreakJoints()
  1082.                 targhum.BreakJointsOnDeath = true
  1083.                 targhum.Health = 0
  1084.             end)
  1085.             sleep()
  1086.         until os.clock()-st >= 0.5
  1087.        
  1088.         sleep(0.2)
  1089.  
  1090.         using = false
  1091.     end
  1092.    
  1093.     tool.main.Touched:Connect(function(obj)
  1094.         if tool.Parent == workspace and obj and obj.Parent and obj.Parent:FindFirstChildOfClass("Humanoid") then
  1095.             tool.Parent = obj.Parent
  1096.         end
  1097.     end)
  1098.    
  1099.     tool.Equipped:Connect(function()
  1100.         char = tool.Parent
  1101.         hum = char:FindFirstChildOfClass("Humanoid")
  1102.         root = char:FindFirstChild("HumanoidRootPart")
  1103.        
  1104.         local rarm = char:FindFirstChild("Right Arm")
  1105.         if rarm and hum and hum.Health > 0 and hum.RigType == Enum.HumanoidRigType.R6 then else
  1106.             sleep()
  1107.             tool.Parent = workspace
  1108.         end
  1109.         w.Part0 = rarm
  1110.  
  1111.         animator.create_welds(char)
  1112.         animator.toggle_anim(true,char)
  1113.     end)
  1114.     tool.Unequipped:Connect(function()
  1115.         w.Part0 = nil
  1116.         animator.toggle_anim(false,char)
  1117.         if tool.Parent == workspace then
  1118.             tool.main.CFrame = tool.main.CFrame*CFrame.new(0,0,-5)
  1119.         end
  1120.     end)
  1121.     tool.Activated:Connect(function()
  1122.         swing()
  1123.     end)
  1124. end
  1125.  
  1126. --
  1127.  
  1128. local c
  1129. c = game:GetService("RunService").Heartbeat:Connect(function()
  1130.     if not char or not char.Parent or 0 >= hum.Health then
  1131.         --c:Disconnect()
  1132.         return
  1133.     end
  1134.     local dir = root.Velocity
  1135.     local params = RaycastParams.new()
  1136.     params.FilterType = Enum.RaycastFilterType.Blacklist
  1137.     params.FilterDescendantsInstances = {char}
  1138.     params.IgnoreWater = false
  1139.     local ground = workspace:Raycast(root.Position,root.CFrame.UpVector*-1*5,params)
  1140.     local jumpvel = dir.Y
  1141.     local walkvel = (dir*Vector3.new(1,0,1)).Magnitude
  1142.     local movevel = dir.Magnitude
  1143.     local faceDir = root.CFrame.LookVector.Unit
  1144.     local moveDir = dir.Unit
  1145.     local dot = faceDir:Dot(moveDir)
  1146.  
  1147.     local moving,air_state
  1148.  
  1149.     if walkvel > 0.01 then
  1150.         moving = true
  1151.     else
  1152.         moving = false
  1153.     end
  1154.  
  1155.     local state = hum:GetState()
  1156.  
  1157.     if state == Enum.HumanoidStateType.Freefall then
  1158.         air_state = 1
  1159.     elseif state == Enum.HumanoidStateType.Jumping then
  1160.         air_state = 2
  1161.     else
  1162.         air_state = 0
  1163.     end
  1164.  
  1165.     if state == Enum.HumanoidStateType.Jumping then
  1166.         jumped = true
  1167.     else
  1168.         jumped = false
  1169.     end
  1170.  
  1171.     if not paused_default then
  1172.         if state == Enum.HumanoidStateType.Climbing then
  1173.             play_move_anim('climb')
  1174.         elseif hum.Sit then
  1175.             play_move_anim('sit')
  1176.         elseif air_state == 1 then
  1177.             play_move_anim('fall')
  1178.         elseif air_state == 2 then
  1179.             play_move_anim('jump')
  1180.         elseif moving then
  1181.             play_move_anim('walk')
  1182.         else
  1183.             play_move_anim('idle')
  1184.         end
  1185.     else
  1186.         play_move_anim()
  1187.     end
  1188. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement