local v=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local d=game:GetService("\082\117\110\083\101\114\118\105\099\101")local q=v.Source.IKObjectsFolder.LimbChain local R=require(q)local m=workspace.Dummy local B=m.Body.LowerTorso.UpperTorso local s=m.Body.UpperTorso.Head local g=m.Body.HumanoidRootPart.LowerTorso local i=m.Body.LowerTorso.Hip local W=m.Body.Hip.LUpperLeg local L=m.LLeg.LUpperLeg.LLowerLeg local w=m.LLeg.LLowerLeg.LFeet local k=m.Body.Hip.RUpperLeg local c=m.RLeg.RUpperLeg.RLowerLeg local r=m.RLeg.RLowerLeg.RFeet local C={i,W,L;w}local X=R.new(C)local o={k,c;r}local M=R.new(o)local F={i;B,s}local f=R.new(F,false,g)d.Heartbeat:Connect(function()local v=workspace.BigLTarget.Position local d=workspace.BigRTarget.Position local q=workspace.UpTarget.Position X:IterateOnce(v,.1)X:UpdateMotors()f:IterateOnce(q,.1)f:UpdateMotors()M:IterateOnce(d,.1)M:UpdateMotors()end)
--This controls Mr.Flop Man

--Get service
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

--Modules required
local IKControllerPointer = ReplicatedStorage.Source.IKObjectsFolder.LimbChain
local LimbChain = require(IKControllerPointer)

--Left leg chain motors
local dummy = workspace.Dummy

--Now including torso motors and head
local upperTorsoMotor = dummy.Body.LowerTorso.UpperTorso
local headMotor = dummy.Body.UpperTorso.Head

--Dont mess with root motor or else entire body will speeen
local lowerTorsoMotor = dummy.Body.HumanoidRootPart.LowerTorso

--Get the motors of the left leg chain
local hipMotor = dummy.Body.LowerTorso.Hip
local lUpperLegMotor = dummy.Body.Hip.LUpperLeg
local lLowerLegMotor = dummy.LLeg.LUpperLeg.LLowerLeg
local lfoot = dummy.LLeg.LLowerLeg.LFeet

--Get the motors of the right leg chain
local rUpperLegMotor = dummy.Body.Hip.RUpperLeg
local rLowerLegMotor = dummy.RLeg.RUpperLeg.RLowerLeg
local rfoot = dummy.RLeg.RLowerLeg.RFeet

--Create the left leg chain
local leftLegMotorTable = {hipMotor,lUpperLegMotor,lLowerLegMotor,lfoot}
local leftLegChain = LimbChain.new(leftLegMotorTable)

--create the right leg chain
local rightLegMotorTable = {rUpperLegMotor,rLowerLegMotor,rfoot}
local rightLegChain = LimbChain.new(rightLegMotorTable)

--create the spine chain
local spineMotorTable = {hipMotor,upperTorsoMotor,headMotor}
local spineChain = LimbChain.new(spineMotorTable,false,lowerTorsoMotor)

RunService.Heartbeat:Connect(function()
    --targets for left and right leg and spine
    --Oops I think I swapped the perspective of the left and right of the feet, oh well
    local target = workspace.BigLTarget.Position
    local rightTarget = workspace.BigRTarget.Position
    local upTarget = workspace.UpTarget.Position

    leftLegChain:IterateOnce(target,0.1)
    leftLegChain:UpdateMotors()

    spineChain:IterateOnce(upTarget,0.1)
    spineChain:UpdateMotors()

    rightLegChain:IterateOnce(rightTarget,0.1)
    rightLegChain:UpdateMotors()

end)