My friend is making the archer pull up animation and I’m on the dips and basically it’s doing my friend’s animation at the same time so it feels like the animation get copied on me when my friends is on the workout sometimes it does this and it’s quite irritating and I can do the animation outside of the workout
Dips code
ClickDetector.MouseClick:Connect(function(player)
if Owner.Value == nil then
Owner.Value = player
local healthValue = player:WaitForChild("CharStats"):WaitForChild("Health").Value
local health = player:WaitForChild("CharStats"):WaitForChild("Health")
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Active = true
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Visible = true
ClickDetector.MaxActivationDistance = 0
if health.Value < 1000 then
isOnDips = true
local PullupAnim = {false, false, false, false, false, false, false, false, false}
CurrentPlayer = game.Workspace:FindFirstChild(tostring(player))
CurrentPlayer.Punch.Disabled = true
CurrentPlayer.Block.Disabled = true
CurrentPlayer.Dips.Disabled = false
player:WaitForChild("IsWorkingOut").Value = true
WorkoutModule:ClickDetectorPullUpWorkout(PullupFolder, player, ShowClickDetector, false)
WorkoutModule:ClickDetectorDipsWorkout(DipsFolder, player, ShowClickDetector, false)
local weld = Instance.new("Weld")
weld.Part0 = CurrentPlayer["HumanoidRootPart"]
weld.Part1 = script.Parent.DipLeft
weld.C0 = CFrame.new(-1.7, -0.8, 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(90), math.rad(0))
weld.Parent = CurrentPlayer["HumanoidRootPart"]
local animation = Instance.new("Animation")
--animation.AnimationId = "http://www.roblox.com/Asset?ID=16534667629"
if isOnDips == true then
if healthValue == 0 then
PullupAnim = {false, false, false, false, false, false, false, false, false}
end
if healthValue >= 0 and healthValue < 200 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728742689"
PullupAnim[1] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[1]:Play()
PullupAnim[1]:AdjustSpeed(0)
elseif healthValue >= 200 and healthValue < 300 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728738676"
if PullupAnim[1] ~= false then
PullupAnim[1].TimePosition = 0
PullupAnim[1]:Stop(0)
end
PullupAnim[2] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[2]:Play()
PullupAnim[2]:AdjustSpeed(0)
elseif healthValue >= 300 and healthValue < 400 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728731508"
for i = 1, 2 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[3] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[3]:Play()
PullupAnim[3]:AdjustSpeed(0)
elseif healthValue >= 400 and healthValue < 500 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728721793"
for i = 1, 3 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[4] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[4]:Play()
PullupAnim[4]:AdjustSpeed(0)
elseif healthValue >= 500 and healthValue < 600 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728719294"
for i = 1, 4 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[5] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[5]:Play()
PullupAnim[5]:AdjustSpeed(0)
elseif healthValue >= 600 and healthValue < 700 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728716246"
for i = 1, 5 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[6] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[6]:Play()
PullupAnim[6]:AdjustSpeed(0)
elseif healthValue >= 700 and healthValue < 800 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728710563"
for i = 1, 6 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[7] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[7]:Play()
PullupAnim[7]:AdjustSpeed(0)
elseif healthValue >= 800 and healthValue < 900 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728707754"
for i = 1, 7 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[8] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[8]:Play()
PullupAnim[8]:AdjustSpeed(0)
elseif healthValue >= 900 and healthValue < 1000 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728703892"
for i = 1, 8 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[9] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[9]:Play()
PullupAnim[9]:AdjustSpeed(0)
elseif healthValue >= 1000 then
PreventMessageModule:SendMessage(player, SendMessage, PreventMessageModule.PreventDips)
end
end
health.Changed:Connect(function()
local healthValue = player:WaitForChild("CharStats"):WaitForChild("Health").Value
if isOnDips == true then
if healthValue >= 0 and healthValue < 200 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728742689"
if PullupAnim[1] == false then
PullupAnim[1] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[1]:Play()
PullupAnim[1]:AdjustSpeed(0)
end
print("ANIMATION 1 IS STILL HERE")
elseif healthValue >= 200 and healthValue < 300 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728738676"
if PullupAnim[2] == false then
if PullupAnim[1] ~= false then
PullupAnim[1].TimePosition = 0
PullupAnim[1]:Stop(0)
print("ANIMATION 1 IS DESTROYED")
end
PullupAnim[2] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[2]:Play()
PullupAnim[2]:AdjustSpeed(0)
end
elseif healthValue >= 300 and healthValue < 400 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728731508"
if PullupAnim[3] == false then
for i = 1, 2 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[3] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[3]:Play()
PullupAnim[3]:AdjustSpeed(0)
end
elseif healthValue >= 400 and healthValue < 500 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728721793"
if PullupAnim[4] == false then
for i = 1, 3 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[4] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[4]:Play()
PullupAnim[4]:AdjustSpeed(0)
end
elseif healthValue >= 500 and healthValue < 600 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728719294"
if PullupAnim[5] == false then
for i = 1, 4 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[5] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[5]:Play()
PullupAnim[5]:AdjustSpeed(0)
end
elseif healthValue >= 600 and healthValue < 700 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728716246"
if PullupAnim[6] == false then
for i = 1, 5 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[6] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[6]:Play()
PullupAnim[6]:AdjustSpeed(0)
end
elseif healthValue >= 700 and healthValue < 800 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728710563"
if PullupAnim[7] == false then
for i = 1, 6 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[7] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[7]:Play()
PullupAnim[7]:AdjustSpeed(0)
end
elseif healthValue >= 800 and healthValue < 900 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728707754"
if PullupAnim[8] == false then
for i = 1, 7 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[8] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[8]:Play()
PullupAnim[8]:AdjustSpeed(0)
end
elseif healthValue >= 900 and healthValue < 1000 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16728703892"
if PullupAnim[9] == false then
for i = 1, 8 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[9] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[9]:Play()
PullupAnim[9]:AdjustSpeed(0)
end
end
if healthValue < 1000 then
game.ReplicatedStorage.CharacterAction.Dips:FireClient(player, player, animation.AnimationId)
end
if healthValue >= 1000 then
player:WaitForChild("IsWorkingOut").Value = false
for i = 1, 9 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
player:WaitForChild("IsWorkingOut").Value = false
player:WaitForChild("CharStats"):WaitForChild("Health").Value = 1000
player:WaitForChild("DisciplineCharStats"):WaitForChild("Calisthenic").Value = 1000
player:WaitForChild("HealthDiscipline").HealthExp.Value = 0
PreventMessageModule:SendMessage(player, SendMessage, PreventMessageModule.PreventDips)
KickOutOfDips(player)
end
end
end)
game.ReplicatedStorage.CharacterAction.Dips:FireClient(player, player, animation.AnimationId)
CallbackHandler = CurrentPlayer.Humanoid.Changed:Connect(function(property)
if CurrentPlayer ~= nil and property == 'Jump' then
print("RIG JUMPED OUT OF BED")
isOnDips = false
player:WaitForChild("IsWorkingOut").Value = false
WorkoutModule:ClickDetectorPullUpWorkout(PullupFolder, player, ShowClickDetector, true)
WorkoutModule:ClickDetectorDipsWorkout(DipsFolder, player, ShowClickDetector, true)
game.ReplicatedStorage.UnbindAction.UnbindDips:FireClient(player, player)
LeaveDips(CurrentPlayer)
CurrentPlayer.HumanoidRootPart.Weld:Remove()
--CurrentPlayer.RightHand.Weld:Remove()
local CloneDips = CurrentPlayer.Dips:Clone()
CurrentPlayer.Dips:Destroy()
local ClonePunch = CurrentPlayer.Punch:Clone()
CurrentPlayer.Punch:Destroy()
local CloneBlock = CurrentPlayer.Block:Clone()
CurrentPlayer.Block:Destroy()
CloneDips.Parent = CurrentPlayer
CloneDips.Disabled = false
ClonePunch.Parent = CurrentPlayer
ClonePunch.Disabled = false
CloneBlock.Parent = CurrentPlayer
CloneBlock.Disabled = false
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Active = false
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Visible = false
ClickDetector.MaxActivationDistance = 15
--YourAnimationTrack.TimePosition = 0
--YourAnimationTrack:Stop(0)
end
end)
CurrentPlayer.Humanoid.Died:Connect(function()
print("PLAYER HUMANOID DIED")
isOnDips = false
player:WaitForChild("IsWorkingOut").Value = false
Owner.Value = nil
WorkoutModule:ClickDetectorPullUpWorkout(PullupFolder, player, ShowClickDetector, true)
WorkoutModule:ClickDetectorDipsWorkout(DipsFolder, player, ShowClickDetector, true)
game.ReplicatedStorage.UnbindAction.UnbindDips:FireClient(player, player)
--YourAnimationTrack.TimePosition = 0
--YourAnimationTrack:Stop(0)
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Active = false
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Visible = false
ClickDetector.MaxActivationDistance = 15
end)
else
PreventMessageModule:SendMessage(player, SendMessage, PreventMessageModule.PreventDips)
Owner.Value = nil
end
end
end)
Pull up code
ClickDetector.MouseClick:Connect(function(player)
if Owner.Value == nil then
Owner.Value = player
local muscleValue = player:WaitForChild("CharStats"):WaitForChild("MuscleMass").Value
local healthValue = player:WaitForChild("CharStats"):WaitForChild("Health").Value
local health = player:WaitForChild("CharStats"):WaitForChild("Health")
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Active = true
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Visible = true
ClickDetector.MaxActivationDistance = 0
if health.Value < 1000 then
isOnPullup = true
local PullupAnim = {false, false, false, false, false, false, false, false, false}
CurrentPlayer = game.Workspace:FindFirstChild(tostring(player))
CurrentPlayer.Punch.Disabled = true
CurrentPlayer.Block.Disabled = true
CurrentPlayer.PullUp.Disabled = false
player:WaitForChild("IsWorkingOut").Value = true
WorkoutModule:ClickDetectorPullUpWorkout(PullupFolder, player, ShowClickDetector, false)
WorkoutModule:ClickDetectorDipsWorkout(DipsFolder, player, ShowClickDetector, false)
--CurrentPlayer.Humanoid.PlatformStand = false
local weld = Instance.new("Weld")
weld.Part0 = CurrentPlayer["HumanoidRootPart"]
weld.Part1 = script.Parent.Parent["Left Grip"]
weld.C0 = CFrame.new(-1.6, (3.9 + (muscleValue * 0.0035)), 0) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(-180), math.rad(0))
weld.Parent = CurrentPlayer["HumanoidRootPart"]
local animation = Instance.new("Animation")
--animation.AnimationId = "http://www.roblox.com/Asset?ID=16718241915"
if isOnPullup == true then
if healthValue == 0 then
PullupAnim = {false, false, false, false, false, false, false, false, false}
end
if healthValue >= 0 and healthValue < 200 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16718241915"
PullupAnim[1] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[1]:Play()
PullupAnim[1]:AdjustSpeed(0)
elseif healthValue >= 200 and healthValue < 300 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726480404"
if PullupAnim[1] ~= false then
PullupAnim[1].TimePosition = 0
PullupAnim[1]:Stop(0)
end
PullupAnim[2] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[2]:Play()
PullupAnim[2]:AdjustSpeed(0)
elseif healthValue >= 300 and healthValue < 400 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726561033"
for i = 1, 2 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[3] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[3]:Play()
PullupAnim[3]:AdjustSpeed(0)
elseif healthValue >= 400 and healthValue < 500 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726564154"
for i = 1, 3 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[4] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[4]:Play()
PullupAnim[4]:AdjustSpeed(0)
elseif healthValue >= 500 and healthValue < 600 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726568897"
for i = 1, 4 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[5] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[5]:Play()
PullupAnim[5]:AdjustSpeed(0)
elseif healthValue >= 600 and healthValue < 700 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726576956"
for i = 1, 5 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[6] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[6]:Play()
PullupAnim[6]:AdjustSpeed(0)
elseif healthValue >= 700 and healthValue < 800 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726583141"
for i = 1, 6 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[7] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[7]:Play()
PullupAnim[7]:AdjustSpeed(0)
elseif healthValue >= 800 and healthValue < 900 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726587242"
for i = 1, 7 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[8] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[8]:Play()
PullupAnim[8]:AdjustSpeed(0)
elseif healthValue >= 900 and healthValue < 1000 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726602913"
for i = 1, 8 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[9] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
PullupAnim[9]:Play()
PullupAnim[9]:AdjustSpeed(0)
elseif healthValue >= 1000 then
PreventMessageModule:SendMessage(player, SendMessage, PreventMessageModule.PreventPullup)
end
end
health.Changed:Connect(function()
local healthValue = player:WaitForChild("CharStats"):WaitForChild("Health").Value
if isOnPullup == true then
if healthValue >= 0 and healthValue < 200 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16718241915"
if PullupAnim[1] == false then
PullupAnim[1] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[1]:Play()
PullupAnim[1]:AdjustSpeed(0)
end
elseif healthValue >= 200 and healthValue < 300 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726480404"
if PullupAnim[2] == false then
if PullupAnim[1] ~= false then
PullupAnim[1].TimePosition = 0
PullupAnim[1]:Stop(0)
print("ANIMATION 1 IS DESTROYED")
end
PullupAnim[2] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[2]:Play()
PullupAnim[2]:AdjustSpeed(0)
end
elseif healthValue >= 300 and healthValue < 400 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726561033"
if PullupAnim[3] == false then
for i = 1, 2 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[3] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[3]:Play()
PullupAnim[3]:AdjustSpeed(0)
end
elseif healthValue >= 400 and healthValue < 500 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726564154"
if PullupAnim[4] == false then
for i = 1, 3 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[4] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[4]:Play()
PullupAnim[4]:AdjustSpeed(0)
end
elseif healthValue >= 500 and healthValue < 600 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726568897"
if PullupAnim[5] == false then
for i = 1, 4 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[5] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[5]:Play()
PullupAnim[5]:AdjustSpeed(0)
end
elseif healthValue >= 600 and healthValue < 700 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726576956"
if PullupAnim[6] == false then
for i = 1, 5 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[6] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[6]:Play()
PullupAnim[6]:AdjustSpeed(0)
end
elseif healthValue >= 700 and healthValue < 800 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726583141"
if PullupAnim[7] == false then
for i = 1, 6 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[7] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[7]:Play()
PullupAnim[7]:AdjustSpeed(0)
end
elseif healthValue >= 800 and healthValue < 900 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726587242"
if PullupAnim[8] == false then
for i = 1, 7 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[8] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[8]:Play()
PullupAnim[8]:AdjustSpeed(0)
end
elseif healthValue >= 900 and healthValue < 1000 then
animation.AnimationId = "http://www.roblox.com/Asset?ID=16726602913"
if PullupAnim[9] == false then
for i = 1, 8 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
PullupAnim[9] = CurrentPlayer:FindFirstChild("Humanoid").Animator:LoadAnimation(animation)
else
PullupAnim[9]:Play()
PullupAnim[9]:AdjustSpeed(0)
end
end
if healthValue < 1000 then
game.ReplicatedStorage.CharacterAction.PullUp:FireClient(player, player, animation.AnimationId)
end
if healthValue >= 1000 then
player:WaitForChild("IsWorkingOut").Value = false
for i = 1, 9 do
if PullupAnim[i] ~= false then
PullupAnim[i].TimePosition = 0
PullupAnim[i]:Stop(0)
end
end
player:WaitForChild("IsWorkingOut").Value = false
player:WaitForChild("CharStats"):WaitForChild("Health").Value = 1000
player:WaitForChild("DisciplineCharStats"):WaitForChild("Calisthenic").Value = 1000
player:WaitForChild("HealthDiscipline").HealthExp.Value = 0
PreventMessageModule:SendMessage(player, SendMessage, PreventMessageModule.PreventPullup)
KickOutOfPull(player)
end
end
end)
game.ReplicatedStorage.CharacterAction.PullUp:FireClient(player, player, animation.AnimationId)
CallbackHandler = CurrentPlayer.Humanoid.Changed:Connect(function(property)
if CurrentPlayer ~= nil and property == 'Jump' then
print("RIG JUMPED OUT OF BED")
isOnPullup = false
player:WaitForChild("IsWorkingOut").Value = false
WorkoutModule:ClickDetectorPullUpWorkout(PullupFolder, player, ShowClickDetector, true)
WorkoutModule:ClickDetectorDipsWorkout(DipsFolder, player, ShowClickDetector, true)
game.ReplicatedStorage.UnbindAction.UnbindPullup:FireClient(player, player)
LeavePullUp(CurrentPlayer)
CurrentPlayer.HumanoidRootPart.Weld:Remove()
local ClonePullup = CurrentPlayer.PullUp:Clone()
CurrentPlayer.PullUp:Destroy()
local ClonePunch = CurrentPlayer.Punch:Clone()
CurrentPlayer.Punch:Destroy()
local CloneBlock = CurrentPlayer.Block:Clone()
CurrentPlayer.Block:Destroy()
ClonePullup.Parent = CurrentPlayer
ClonePullup.Disabled = false
ClonePunch.Parent = CurrentPlayer
ClonePunch.Disabled = false
CloneBlock.Parent = CurrentPlayer
CloneBlock.Disabled = false
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Active = false
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Visible = false
ClickDetector.MaxActivationDistance = 15
end
end)
CurrentPlayer.Humanoid.Died:Connect(function()
print("PLAYER HUMANOID DIED")
isOnPullup = false
player:WaitForChild("IsWorkingOut").Value = false
Owner.Value = nil
WorkoutModule:ClickDetectorPullUpWorkout(PullupFolder, player, ShowClickDetector, true)
WorkoutModule:ClickDetectorDipsWorkout(DipsFolder, player, ShowClickDetector, true)
game.ReplicatedStorage.UnbindAction.UnbindPullup:FireClient(player, player)
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Active = false
player.PlayerGui.StatGUI.HealthFrame.ExpCalisthenics.Visible = false
ClickDetector.MaxActivationDistance = 15
end)
else
PreventMessageModule:SendMessage(player, SendMessage, PreventMessageModule.PreventPullup)
Owner.Value = nil
end
end
end)