JIT
friendly coding help with lua script for game development
this code. local data = require(script:WaitForChild'ClientReplication')(script,script:WaitForChild'Owner'.Value) local req = data.Requests local S = setmetatable({},{__index = function(s,i) return game:service(i) end}) local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ} local C3 = {tRGB= function(c3) return c3.r*255,c3.g*255,c3.b*255 end,N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV} local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis} local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end} local R3 = {N=Region3.new} local De = S.Debris local WS = workspace local Lght = S.Lighting local RepS = S.ReplicatedStorage local IN = Instance.new local Plrs = S.Players local Player = data.User local Char = req:Pull"Character" local Mouse = data.Local:GetMouse(); local Hum = Char:FindFirstChildOfClass'Humanoid' local Torso = Char.Torso local RArm = Char["Right Arm"] local LArm = Char["Left Arm"] local RLeg = Char["Right Leg"] local LLeg = Char["Left Leg"] local Root = Char:FindFirstChild'HumanoidRootPart' local Head = Char.Head local Sine = 0; local Change = 1 local Attack=false local NeutralAnims=true local timePos=30; local walking=true; local legAnims=true; local movement = 8 local footsound=0; local WalkSpeed=16; local Combo=0; function SetTween(SPart,CFr,MoveStyle2,outorin2,AnimTime) local MoveStyle = Enum.EasingStyle[MoveStyle2] local outorin = Enum.EasingDirection[outorin2] local dahspeed=1 if Attack == true then dahspeed=3 end if SPart.Name=="Bullet" then dahspeed=1 end local tweeningInformation = TweenInfo.new( AnimTime/dahspeed, MoveStyle, outorin, 0, false, 0 ) local MoveCF = CFr local tweenanim = game:GetService("TweenService"):Create(SPart,tweeningInformation,MoveCF) tweenanim:Play() end NewInstance = function(instance,parent,properties) local inst = Instance.new(instance) inst.Parent = parent if(properties)then for i,v in next, properties do pcall(function() inst[i] = v end) end end return inst; end local NK,RJ,RH,RS,LH,LS=unpack(req:Pull"Welds") local NKC0,RJC0,RHC0,RSC0,LHC0,LSC0=unpack(req:Pull"WeldDefaults") if(req.Recievers.sync)then req:DelReciever("sync")end if(req.Recievers.playMusic)then req:DelReciever("playMusic")end if(req.Recievers.effect)then req:DelReciever("effect")end if(req.Recievers.stop)then req:DelReciever("stop")end if(req.Recievers.ShowDamage)then req:DelReciever("ShowDamage")end function makeMusic(id,pit,timePos) local sound = Torso:FindFirstChild(script.Name.."song") if(not sound)then sound = NewInstance("Sound",Torso,{Name=script.Name.."song",Volume=5,Pitch=(pit or 1),Looped=true}) NewInstance("EqualizerSoundEffect",sound,{HighGain=0,MidGain=2,LowGain=30}) end if(id=='stop')then if(sound)then sound:Stop() end else local timePos = typeof(timePos)=='number' and timePos or sound.TimePosition sound.Volume = 5 sound.Name = script.Name.."song" sound.Looped=true sound.SoundId = "rbxassetid://"..id sound.Pitch=(pit or 1) sound:Play() sound.TimePosition = timePos end return sound; end req:AddReciever("playMusic",function(id,pitch,timePos) if(data.Local~=data.User)then makeMusic(id,pitch,timePos) end end) function playMusic(id,pitch,timePos) req:Push("Broadcast","playMusic",id,pitch,timePos) return makeMusic(id,pitch,timePos) end for _,v in next, Hum:GetPlayingAnimationTracks() do v:Stop(0); end local Frame_Speed = 60 local ArtificialHB = script:FindFirstChild'Heartbeat' or IN("BindableEvent", script) ArtificialHB.Name = "Heartbeat" local tf = 0 local allowframeloss = true local tossremainder = true local lastframe = tick() local frame = 1/Frame_Speed ArtificialHB:Fire() game:GetService("RunService").Stepped:connect(function(s, p) tf = tf + s if tf >= frame then if allowframeloss then ArtificialHB:Fire() lastframe = tick() else for i = 1, math.floor(tf / frame) do ArtificialHB:Fire() end lastframe = tick() end if tossremainder then tf = 0 else tf = tf - frame * math.floor(tf / frame) end end end) local _wait = (task and task.wait) or wait local SWAIT_DELAY = 1 -- set to seconds of extra delay you want after each swait tick (0 for no extra delay) function swait(num) local extra = SWAIT_DELAY if num == 0 or num == nil then ArtificialHB.Event:wait() if extra and extra > 0 then _wait(extra) end else for i = 0, num do ArtificialHB.Event:wait() if extra and extra > 0 then _wait(extra) end end end end if(workspace:FindFirstChild(script.Name..'Effects'))then workspace[script.Name..'Effects']:destroy() end local Effects=NewInstance("Folder",Char) Effects.Name=script.Name..'Effects' function ShowDamage(Pos, Text, Time, Color) local Pos = Pos or V3.N(0, 0, 0) local Text = tostring(Text or "") local Time = Time or 2 local Color = Color or C3.N(1, 0, 1) local EffectPart = Part(Effects,Color,Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),CFrame.new(Pos),true,false) EffectPart.Transparency=1 local BillboardGui = NewInstance("BillboardGui",EffectPart,{ Size = UDim2.new(3,0,3,0), Adornee = EffectPart, }) local TextLabel = NewInstance("TextLabel",BillboardGui,{ BackgroundTransparency = 1, Size = UDim2.new(1, 0, 1, 0), Text = Text, TextColor3 = Color, TextScaled = true, Font = Enum.Font.ArialBold, }) S.Debris:AddItem(EffectPart, Time+.5) delay(0, function() local rot=math.random(-10,10)/15 local raise=.2 local Frames = Time/Frame_Speed for i=0,1.1,.02 do swait() TextLabel.Rotation=TextLabel.Rotation+rot raise=raise-.008 EffectPart.Position = EffectPart.Position + Vector3.new(0, raise, 0) TextLabel.TextTransparency=i TextLabel.TextStrokeTransparency=i end if EffectPart and EffectPart.Parent then EffectPart:Destroy() end end) end req:AddReciever("ShowDamage",ShowDamage) local baseSound = IN("Sound") function Sound(parent,id,pitch,volume,looped,effect,autoPlay) local Sound = baseSound:Clone() Sound.SoundId = "rbxassetid://".. tostring(id or 0) Sound.Pitch = pitch or 1 Sound.Volume = volume or 1 Sound.Looped = looped or false if(autoPlay)then coroutine.wrap(function() repeat wait() until Sound.IsLoaded Sound.Playing = autoPlay or false end)() end if(not looped and effect)then Sound.Stopped:connect(function() Sound.Volume = 0 Sound:destroy() end) elseif(effect)then warn("Sound can't be looped and a sound effect!") end Sound.Parent =parent or Torso return Sound end function Part(parent,color,material,size,cframe,anchored,cancollide) local part = IN("Part") part.Parent = parent or Char part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) part.Material = material or Enum.Material.SmoothPlastic part.TopSurface,part.BottomSurface=10,10 part.Size = size or V3.N(1,1,1) part.CFrame = cframe or CF.N(0,0,0) part.CanCollide = cancollide or false part.Anchored = anchored or false return part end function Weld(part0,part1,c0,c1) local weld = IN("Weld") weld.Parent = part0 weld.Part0 = part0 weld.Part1 = part1 weld.C0 = c0 or CF.N() weld.C1 = c1 or CF.N() return weld end function Mesh(parent,meshtype,meshid,textid,scale,offset) local part = IN("SpecialMesh") part.MeshId = meshid or "" part.TextureId = textid or "" part.Scale = scale or V3.N(1,1,1) part.Offset = offset or V3.N(0,0,0) part.MeshType = meshtype or Enum.MeshType.Sphere part.Parent = parent return part end function GotEffect(data) local color = data.Color or Color3.new(.7,.7,.7); local endcolor = data.EndColor or nil; local mat = data.Material or Enum.Material.SmoothPlastic; local cframe = data.CFrame or CFrame.new(); local endpos = data.EndPos or nil; local meshdata = data.Mesh or {} local sounddata = data.Sound or {} local size = data.Size or Vector3.new(1,1,1) local endsize = data.EndSize or Vector3.new(6,6,6) local rotinc = data.RotInc or {0,0,0} local transparency = data.Transparency or NumberRange.new(0,1) local acceleration = data.Acceleration or nil; local endrot = data.EndRotation or {0,0,0} local style = data.Style or false; local lifetime = data.Lifetime or 1; local system = data.FXSystem; local S,PM; local P = Part(workspace,color,mat,Vector3.new(1,1,1),cframe,true,false) if(meshdata == "Blast")then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://20329976','',size,Vector3.new(0,0,-size.X/8)) elseif(meshdata == 'Ring')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://559831844','',size,Vector3.new(0,0,0)) elseif(meshdata == 'Slash1')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://662586858','',Vector3.new(size.X/10,.001,size.Z/10),Vector3.new(0,0,0)) elseif(meshdata == 'Slash2')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://448386996','',Vector3.new(size.X/1000,size.Y/100,size.Z/100),Vector3.new(0,0,0)) elseif(meshdata == 'Tornado1')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://443529437','',size/10,Vector3.new(0,0,0)) elseif(meshdata == 'Tornado2')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://168892432','',size/4,Vector3.new(0,0,0)) elseif(meshdata == 'Skull')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://4770583','',size*2,Vector3.new(0,0,0)) elseif(meshdata == 'Crystal')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://9756362','',size,Vector3.new(0,0,0)) elseif(meshdata == 'Cloud')then PM = Mesh(P,Enum.MeshType.FileMesh,'rbxassetid://1095708','',size,Vector3.new(0,0,0)) elseif(typeof(meshdata) == 'table')then local Type = meshdata.Type or Enum.MeshType.Brick local ID = meshdata.ID or ''; local Tex = meshdata.Texture or ''; local Offset = meshdata.Offset or Vector3.new(0,0,0) PM = Mesh(P,Type,ID,Tex,size,Offset) else PM = Mesh(P,Enum.MeshType.Brick,'','',size) end local startTrans = typeof(transparency) == 'number' and transparency or typeof(transparency) == 'NumberRange' and transparency.Min or typeof(transparency) == 'table' and transparency[1] or 0 local endTrans = typeof(transparency) == 'NumberRange' and transparency.Max or typeof(transparency) == 'table' and transparency[2] or 1 P.Transparency = startTrans local random = Random.new(); game:service'Debris':AddItem(P,lifetime+3) local mult = 1; if(PM.MeshId == 'rbxassetid://20329976')then PM.Offset = Vector3.new(0,0,-PM.Scale.Z/8) elseif(PM.MeshId == 'rbxassetid://4770583')then mult = 2 elseif(PM.MeshId == 'rbxassetid://168892432')then mult = .25 elseif(PM.MeshId == 'rbxassetid://443529437')then mult = .1 elseif(PM.MeshId == 'rbxassetid://443529437')then mult = .1 end coroutine.wrap(function() if(system == 'Legacy' or system == 1 or system == nil)then local frames = (typeof(lifetime) == 'NumberRange' and random:NextNumber(lifetime.Min,lifetime.Max) or typeof(lifetime) == 'number' and lifetime or 1)*Frame_Speed for i = 0, frames do local div = (i/frames) P.Transparency=(startTrans+(endTrans-startTrans)*div) PM.Scale = size:lerp(endsize*mult,div) local RotCF=CFrame.Angles(0,0,0) if(rotinc == 'random')then RotCF=CFrame.Angles(math.rad(random:NextNumber(-180,180)),math.rad(random:NextNumber(-180,180)),math.rad(random:NextNumber(-180,180))) elseif(typeof(rotinc) == 'table')then RotCF=CFrame.Angles(unpack(rotinc)) end if(PM.MeshId == 'rbxassetid://20329976')then PM.Offset = Vector3.new(0,0,-PM.Scale.Z/8) end if(endpos and typeof(endpos) == 'CFrame')then P.CFrame=cframe:lerp(endpos,div)*RotCF elseif(acceleration and typeof(acceleration) == 'table' and acceleration.Force)then local force = acceleration.Force; if(typeof(force)=='CFrame')then force=force.p; end if(typeof(force)=='Vector3')then if(acceleration.LookAt)then P.CFrame=(CFrame.new(P.Position,force)+force)*RotCF else P.CFrame=(P.CFrame+force)*RotCF end end else P.CFrame=P.CFrame*RotCF end if(endcolor and typeof(endcolor) == 'Color3')then P.Color = color:lerp(endcolor,div) end swait() end P:destroy() elseif(system == 'Experimental' or system == 2)then local info = TweenInfo.new(lifetime,style,Enum.EasingDirection.InOut,0,false,0) local info2 = TweenInfo.new(lifetime,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0) if(style == Enum.EasingStyle.Elastic)then info = TweenInfo.new(lifetime*2,style,Enum.EasingDirection.Out,0,false,0) elseif(style == Enum.EasingStyle.Bounce)then info = TweenInfo.new(lifetime,style,Enum.EasingDirection.Out,0,false,0) end local tweenPart = game:service'TweenService':Create(P,info2,{ CFrame=(typeof(endpos) == 'CFrame' and endpos or P.CFrame)*CFrame.Angles(unpack(endrot)), Color=typeof(endcolor) == 'Color3' and endcolor or color, Transparency=endTrans, }) local off = Vector3.new(0,0,0) if(PM.MeshId == 'rbxassetid://20329976')then off=Vector3.new(0,0,(endsize*mult).Z/8) end local tweenMesh = game:service'TweenService':Create(PM,info,{ Scale=endsize*mult, Offset=off, }) tweenPart:Play() tweenMesh:Play() end end)() end function Effect(data) if(data.User==data.Local)then req:Push("Broadcast","effect",data) GotEffect(data) end end req:AddReciever("effect",function(data) if(data.User~=data.Local)then GotEffect(data) end end) function Trail(data) coroutine.wrap(function() data.Frames = typeof(data.Frames)=='number' and data.Frames or 60 data.CFrame = typeof(data.CFrame)=='CFrame' and data.CFrame or Root.CFrame local ep = typeof(data.EndPos)=='CFrame' and data.EndPos or data.CFrame*CFrame.new(0,5,0); data.EndPos=nil local trailPart = Part(Effects,BrickColor.new'White',Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),data.CFrame,true,false) trailPart.Transparency=1 local start = data.CFrame for i = 1, data.Frames do trailPart.CFrame = start:lerp(ep,i/data.Frames) data.CFrame = trailPart.CFrame Effect(data) swait() end end)() end function ClientTrail(data) coroutine.wrap(function() data.Frames = typeof(data.Frames)=='number' and data.Frames or 60 data.CFrame = typeof(data.CFrame)=='CFrame' and data.CFrame or Root.CFrame local ep = typeof(data.EndPos)=='CFrame' and data.EndPos or data.CFrame*CFrame.new(0,5,0); data.EndPos=nil local trailPart = Part(Effects,BrickColor.new'White',Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),data.CFrame,true,false) trailPart.Transparency=1 local start = data.CFrame for i = 1, data.Frames do trailPart.CFrame = start:lerp(ep,i/data.Frames) data.CFrame = trailPart.CFrame GotEffect(data) swait() end end)() end function syncStuff(data) local neut,legwelds,c0s,c1s,sine,mov,walk,inc=unpack(data) local head0,torso0,rleg0,rarm0,lleg0,larm0=unpack(c0s) local head1,torso1,rleg1,rarm1,lleg1,larm1=unpack(c1s) legAnims=legwelds NeutralAnims=neut if(not neut)then NK.C0=head0 RJ.C0=torso0 RH.C0=rleg0 RS.C0=rarm0 LH.C0=lleg0 LS.C0=larm0 NK.C1=head1 RJ.C1=torso1 RH.C1=rleg1 RS.C1=rarm1 LH.C1=lleg1 LS.C1=larm1 end movement=mov walking=walk Change=inc if(Sine-sine>.8 or Sine-sine<-.8)then Sine=sine end end if(req:Pull("sync"))then syncStuff(req:Pull("sync")) end req:AddReciever("sync",function(syncdata)if(data.User~=data.Local)then syncStuff(syncdata) end end) req:AddReciever("stop",function() script:destroy() script.Disabled=false error("done") end) function Intro() if IntroCheck == false then if data.Local == data.User then IntroCheckRemote:FireServer("Yes") end Attack = true NeutralAnims = false legAnims = false end end game:service'UserInputService'.InputBegan:connect(function(io,gpe) if(gpe or Attack or data.User~=data.Local)then return end if(io.KeyCode==Enum.KeyCode.LeftAlt)then walking = not walking WalkSpeed=(walking and 16 or 36) movement=(walking and 8 or 14) end end) local footstepSounds = { [Enum.Material.Grass]=510933218; [Enum.Material.Metal]=1263161138; [Enum.Material.CorrodedMetal]=1263161138; [Enum.Material.DiamondPlate]=1263161138; [Enum.Material.Wood]=2452053757; [Enum.Material.WoodPlanks]=2452053757; [Enum.Material.Sand]=134456884; [Enum.Material.Snow]=2452051182; } while true do swait() Sine=Sine+Change local hitfloor,posfloor = workspace:FindPartOnRayWithIgnoreList(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4)), {Effects,Char}) local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and "Walk" or hitfloor and "Idle") Hum.WalkSpeed = WalkSpeed local sidevec = math.clamp((Root.Velocity*Root.CFrame.rightVector).X+(Root.Velocity*Root.CFrame.rightVector).Z,-Hum.WalkSpeed,Hum.WalkSpeed) local forwardvec = math.clamp((Root.Velocity*Root.CFrame.lookVector).X+(Root.Velocity*Root.CFrame.lookVector).Z,-Hum.WalkSpeed,Hum.WalkSpeed) local sidevelocity = sidevec/Hum.WalkSpeed local forwardvelocity = forwardvec/Hum.WalkSpeed local lhit,lpos = workspace:FindPartOnRayWithIgnoreList(Ray.new(LLeg.CFrame.p,((CFrame.new(LLeg.Position,LLeg.Position - Vector3.new(0,1,0))).lookVector).unit * (2)), {Effects,Char}) local rhit,rpos = workspace:FindPartOnRayWithIgnoreList(Ray.new(RLeg.CFrame.p,((CFrame.new(RLeg.Position,RLeg.Position - Vector3.new(0,1,0))).lookVector).unit * (2)), {Effects,Char}) SetTween(RJ,{C0 = RJC0 * CF.N(-0.650614857673645,-0.41455164551734924,-0.05614577233791351,0.7432668209075928,0.6681113243103027,-0.03437662497162819,-0.6603600978851318,0.7244743704795837,-0.19764000177383423,-0.10714052617549896,0.1696002185344696,0.9796717166900635)},"Back","Out",0.001) SetTween(NK,{C0 = NKC0 * CF.N(0.002390665700659156,0.0011954158544540405,-0.0000749826431274414,0.9943301677703857,-0.10633677244186401,7.450580596923828e-09,0.10515499114990234,0.9832791686058044,-0.1486760675907135,0.015809740871191025,0.14783309400081635,0.9888859391212463)},"Back","Out",0.001) SetTween(LS,{C0 = LSC0 * CF.N(-0.13054883480072021,-0.00006961822509765625,-0.0009336471557617188,0.3680625557899475,0.23367160558700562,-0.8999596834182739,-0.24932736158370972,0.9572617411613464,0.1465808004140854,0.8957487940788269,0.17043370008468628,0.4105929136276245)},"Back","Out",0.001) SetTween(RS,{C0 = RSC0 * CF.N(0.45592838525772095,0.026889264583587646,-0.14086169004440308,-0.8165836334228516,-0.10692444443702698,0.567237377166748,0.2203747183084488,-0.966006338596344,0.13515447080135345,0.5335036516189575,0.23536981642246246,0.81238853931427)},"Back","Out",0.001) SetTween(LH,{C0 = LHC0 * CF.N(-0.16401100158691406,0.2348530888557434,0.13639003038406372,0.9392836093902588,0.053364455699920654,0.33896684646606445,-0.09224215894937515,0.990739643573761,0.09962998330593109,-0.3305113613605499,-0.12484781444072723,0.9355080723762512)},"Back","Out",0.001) SetTween(RH,{C0 = RHC0 * CF.N(0.09915895015001297,0.032881081104278564,0.00668761134147644,0.984106183052063,0.0711885392665863,-0.16268908977508545,-0.06909125298261642,0.9974384903907776,0.018520399928092957,0.1635909080505371,-0.006985582411289215,0.9865034222602844)},"Back","Out",0.001) swait() SetTween(RJ,{C0 = RJC0 * CF.N(0,-0.6632230281829834,-0.15996895730495453,1,0,0,0,0.9724659323692322,-0.23304487764835358,0,0.23304487764835358,0.9724659323692322)},"Back","Out",0.001) SetTween(NK,{C0 = NKC0 * CF.N(0,-0.059746742248535156,-0.022235125303268433,1,0,0,0,0.937201201915741,-0.3487893342971802,0,0.3487893342971802,0.937201201915741)},"Back","Out",0.001) SetTween(LS,{C0 = LSC0 * CF.N(-0.5107297897338867,0.053823426365852356,0.5339252948760986,0.288625568151474,0,0.957442045211792,-0.9573427438735962,-0.01440739631652832,0.28859567642211914,0.013794247061014175,-0.9998962879180908,-0.004158343188464642)},"Back","Out",0.001) SetTween(RS,{C0 = RSC0 * CF.N(0.5740207433700562,-0.11009965091943741,0.47235989570617676,0.3798903226852417,-0.0426817312836647,-0.9240462779998779,0.9247229695320129,0.043322205543518066,0.37816745042800903,0.02389087900519371,-0.9981489777565002,0.05592646449804306)},"Back","Out",0.001) SetTween(LH,{C0 = LHC0 * CF.N(0.2522463798522949,-0.08732527494430542,-0.01593780517578125,0.9339451789855957,-0.356749027967453,-0.021830594167113304,0.3524976968765259,0.929470956325531,-0.10876169055700302,0.05909152328968048,0.09388221800327301,0.9938281178474426)},"Back","Out",0.001) SetTween(RH,{C0 = RHC0 * CF.N(-0.024863064289093018,-0.09448039531707764,-0.04200810194015503,0.8967447280883789,-0.43983957171440125,-0.04888487607240677,0.42850279808044434,0.8905795216560364,-0.1524898111820221,0.11060694605112076,0.11579716950654984,0.987095296382904)},"Back","Out",0.001) swait() SetTween(RJ,{C0 = RJC0 * CF.N(0.128361314535141,-0.21015684306621552,0.03714155778288841,0.8648533225059509,-0.4871572256088257,-0.12127062678337097,0.5012532472610474,0.8245654702186584,0.26236793398857117,-0.02781885862350464,-0.28769710659980774,0.9573173522949219)},"Back","Out",0.001) SetTween(NK,{C0 = NKC0 * CF.N(0,-1.4901161193847656e-07,3.2782554626464844e-07,1,0,0,0,0.852770209312439,-0.5222863554954529,0,0.5222863554954529,0.852770209312439)},"Back","Out",0.001) SetTween(LS,{C0 = LSC0 * CF.N(-0.12647241353988647,-1.2223258018493652,-0.12809327244758606,-0.813661515712738,0.43180346488952637,-0.3892308175563812,-0.5467076301574707,-0.7960023880004883,0.2597901225090027,-0.19765040278434753,0.4241766333580017,0.883746862411499)},"Back","Out",0.001) SetTween(RS,{C0 = RSC0 * CF.N(0.1264362335205078,-1.2223217487335205,0.12810394167900085,-0.8171124458312988,-0.43920964002609253,0.37339261174201965,0.5444042682647705,-0.8009456396102905,0.24921905994415283,0.18960785865783691,0.40691643953323364,0.8935701847076416)},"Back","Out",0.001) SetTween(LH,{C0 = LHC0 * CF.N(-0.12884032726287842,-0.05833035707473755,-0.0004950463771820068,0.9177454710006714,-0.39705416560173035,-0.009553402662277222,0.397113561630249,0.9169498682022095,0.038778893649578094,-0.006637305021286011,-0.0393829308450222,0.9992020726203918)},"Back","Out",0.001) SetTween(RH,{C0 = RHC0 * CF.N(0.10318832099437714,-0.1464276909828186,0.03080850839614868,0.9106330871582031,0.3643592894077301,-0.1949097365140915,-0.3537108898162842,0.9311891794204712,0.08817727863788605,0.21362604200839996,-0.011355450376868248,0.9768494963645935)},"Back","Out",0.001) swait() SetTween(RJ,{C0 = RJC0 * CF.N(0,-0.6632230281829834,-0.15996895730495453,1,0,0,0,0.9724659323692322,-0.23304487764835358,0,0.23304487764835358,0.9724659323692322)},"Back","Out",0.001) SetTween(NK,{C0 = NKC0 * CF.N(0,-0.059746742248535156,-0.022235125303268433,1,0,0,0,0.937201201915741,-0.3487893342971802,0,0.3487893342971802,0.937201201915741)},"Back","Out",0.001) SetTween(LS,{C0 = LSC0 * CF.N(-0.5107297897338867,0.053823426365852356,0.5339252948760986,0.288625568151474,0,0.957442045211792,-0.9573427438735962,-0.01440739631652832,0.28859567642211914,0.013794247061014175,-0.9998962879180908,-0.004158343188464642)},"Back","Out",0.001) SetTween(RS,{C0 = RSC0 * CF.N(0.5740207433700562,-0.11009965091943741,0.47235989570617676,0.3798903226852417,-0.0426817312836647,-0.9240462779998779,0.9247229695320129,0.043322205543518066,0.37816745042800903,0.02389087900519371,-0.9981489777565002,0.05592646449804306)},"Back","Out",0.001) SetTween(LH,{C0 = LHC0 * CF.N(0.2522463798522949,-0.08732527494430542,-0.01593780517578125,0.9339451789855957,-0.356749027967453,-0.021830594167113304,0.3524976968765259,0.929470956325531,-0.10876169055700302,0.05909152328968048,0.09388221800327301,0.9938281178474426)},"Back","Out",0.001) SetTween(RH,{C0 = RHC0 * CF.N(-0.024863064289093018,-0.09448039531707764,-0.04200810194015503,0.8967447280883789,-0.43983957171440125,-0.04888487607240677,0.42850279808044434,0.8905795216560364,-0.1524898111820221,0.11060694605112076,0.11579716950654984,0.987095296382904)},"Back","Out",0.001) swait() if(data.User==data.Local)then local syncStuff={ NeutralAnims; legAnims; {NK.C0,RJ.C0,RH.C0,RS.C0,LH.C0,LS.C0}; {NK.C1,RJ.C1,RH.C1,RS.C1,LH.C1,LS.C1}; Sine; movement; walking; Change } req:Push("SetVariableAndBroadcast","sync",syncStuff) end end the delay is set to 0.5 and make it that the settween actually tweens to the next settween section
Updated files
v1
make it that the delay of the last swait isnt longer and still is the 0.5 delay
Updated files
v2
make it that the last swait does not have any other delay other than 0.5 since it appears to be linger longer when it is the last frame of the animation.
Updated files
v3
make it that there is no delay on the loop and perfectly loops.
Updated files
v4
actually bring back the delay but it perfectly loops
Updated files
v5
remove the delay on the end of the frame
Updated files
v6