Sc4pterR0bl0x

Infecto Main

Sep 27th, 2020 (edited)
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.28 KB | None | 0 0
  1. -- Gui
  2. -- Version: 1.0
  3.  
  4. -- Instances:
  5.  
  6. local title = Instance.new("TextLabel")
  7. local Frame = Instance.new("Frame")
  8. local esp = Instance.new("TextButton")
  9. local fly = Instance.new("TextButton")
  10.  
  11. --Properties:
  12.  
  13. title.Name = "title"
  14. title.Parent = game.StarterGui.ScreenGui
  15. title.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  16. title.Position = UDim2.new(0.184451222, 0, 0.137044966, 0)
  17. title.Size = UDim2.new(0, 427, 0, 50)
  18. title.Font = Enum.Font.GothamBold
  19. title.Text = "Infecto 1.0"
  20. title.TextColor3 = Color3.fromRGB(255, 255, 255)
  21. title.TextScaled = true
  22. title.TextSize = 14.000
  23. title.TextWrapped = true
  24.  
  25. Frame.Parent = title
  26. Frame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  27. Frame.Position = UDim2.new(-0.000560492277, 0, 0.997044981, 0)
  28. Frame.Size = UDim2.new(0, 427, 0, 244)
  29.  
  30. esp.Name = "esp"
  31. esp.Parent = title
  32. esp.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  33. esp.Position = UDim2.new(0.0804784968, 0, 1.50766599, 0)
  34. esp.Size = UDim2.new(0, 145, 0, 44)
  35. esp.Font = Enum.Font.GothamBold
  36. esp.Text = "ESP"
  37. esp.TextColor3 = Color3.fromRGB(255, 255, 255)
  38. esp.TextSize = 14.000
  39.  
  40. fly.Name = "fly"
  41. fly.Parent = title
  42. fly.BackgroundColor3 = Color3.fromRGB(27, 27, 27)
  43. fly.Position = UDim2.new(0.0804784968, 0, 2.92000008, 0)
  44. fly.Size = UDim2.new(0, 144, 0, 40)
  45. fly.Font = Enum.Font.GothamBold
  46. fly.Text = "Fly"
  47. fly.TextColor3 = Color3.fromRGB(255, 255, 255)
  48. fly.TextSize = 14.000
  49.  
  50. -- Scripts:
  51.  
  52. local function GSIILLU_fake_script() -- title.drag
  53.     local script = Instance.new('LocalScript', title)
  54.  
  55.     script.Parent.Selectable = true
  56.     script.Parent.Active = true
  57.     script.Parent.Draggable = true
  58.    
  59.     -- DRAG
  60. end
  61. coroutine.wrap(GSIILLU_fake_script)()
  62. local function HBIGJJ_fake_script() -- esp.LocalScript
  63.     local script = Instance.new('LocalScript', esp)
  64.  
  65.     function esp()
  66.         local gplrs = game.Players:GetPlayers()
  67.         local plr = game.Players.LocalPlayer
  68.         local TorsoEsp = Instance.new("Part")
  69.         TorsoEsp.Anchored = true
  70.         TorsoEsp.BottomSurface = Enum.SurfaceType.Smooth
  71.         TorsoEsp.CFrame = CFrame.new(-153.01, 3, -34.152)
  72.         TorsoEsp.Name = "TorsoEsp"
  73.         TorsoEsp.Reflectance = 1
  74.         TorsoEsp.Size = Vector3.new(0.05, 1.66, 0.05)
  75.         TorsoEsp.TopSurface = Enum.SurfaceType.Smooth
  76.         TorsoEsp.Transparency = 1
  77.         TorsoEsp.Parent = game:GetService("Workspace")
  78.         TorsoEsp.CanCollide = false
  79.        
  80.         local BoxHandleAdornment = Instance.new("BoxHandleAdornment")
  81.         BoxHandleAdornment.Adornee = nil
  82.         BoxHandleAdornment.AlwaysOnTop = true
  83.         BoxHandleAdornment.Color3 = Color3.fromRGB(255, 255, 255)
  84.         BoxHandleAdornment.Size = Vector3.new(2, 2, 1)
  85.         BoxHandleAdornment.Transparency = 0.5
  86.         BoxHandleAdornment.ZIndex = 2
  87.         BoxHandleAdornment.Parent = TorsoEsp
  88.        
  89.        
  90.        
  91.         game.Players.PlayerAdded:Connect(function(plr)
  92.             TorsoEsp:Clone()
  93.             TorsoEsp.Parent = game.Workspace:WaitForChild(plr.Name)
  94.             TorsoEsp.BoxHandleAdornment.Adornee = game.Workspace:WaitForChild(plr.Name).HumanoidRootPart
  95.         end)
  96.        
  97.        
  98.         for i, v in pairs(gplrs) do
  99.             local BoxHandleAdornment = Instance.new("BoxHandleAdornment")
  100.             BoxHandleAdornment.Adornee = v.Character.HumanoidRootPart
  101.             BoxHandleAdornment.AlwaysOnTop = true
  102.             BoxHandleAdornment.Color3 = Color3.fromRGB(255, 255, 255)
  103.             BoxHandleAdornment.Size = Vector3.new(2, 2, 1)
  104.             BoxHandleAdornment.Transparency = 0.5
  105.             BoxHandleAdornment.ZIndex = 2
  106.             BoxHandleAdornment.Parent = v.Character
  107.         end
  108.        
  109.         wait()
  110.         local plr = game.Players.LocalPlayer
  111.         game.Workspace:WaitForChild(plr.Name).BoxHandleAdornment:Destroy()
  112.     end
  113.     script.Parent.MouseButton1Click:Connect(esp)
  114. end
  115. coroutine.wrap(HBIGJJ_fake_script)()
  116. local function WRXCK_fake_script() -- fly.LocalScript
  117.     local script = Instance.new('LocalScript', fly)
  118.  
  119.     script.Parent.MouseButton1Click:Connect(function()
  120.         local part = script.Parent.Parent.Fly:Clone()
  121.         part.Parent = game.Players.LocalPlayer.Backpack
  122.     end)
  123. end
  124. coroutine.wrap(WRXCK_fake_script)()
  125. local function WVBYNE_fake_script() -- title.Script
  126.     local script = Instance.new('Script', title)
  127.  
  128.     function oof()
  129.         game:GetObjects("rbxassetid://1561389244")[1].Parent=game.Workspace.Terrain
  130.         local c = game.Workspace.Terrain:FindFirstChildOfClass("Model"):Clone()
  131.         c.Parent = game.Workspace
  132.         c:MoveTo(game.Players.LocalPlayer.Character.HumanoidRootPart.Position)
  133.         game.Workspace.Terrain:FindFirstChildOfClass("Model"):remove()
  134.         c.Name = game.Players.LocalPlayer.Name
  135.         game.Players.LocalPlayer.Character = c
  136.         game.Workspace.CurrentCamera.CameraSubject = c:FindFirstChildOfClass("Humanoid")
  137.        
  138.         local Figure = game.Players.LocalPlayer.Character
  139.         local Torso = Figure:WaitForChild("Torso")
  140.         local RightShoulder = Torso:WaitForChild("Right Shoulder")
  141.         local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  142.         local RightHip = Torso:WaitForChild("Right Hip")
  143.         local LeftHip = Torso:WaitForChild("Left Hip")
  144.         local Neck = Torso:WaitForChild("Neck")
  145.         local Humanoid = Figure:WaitForChild("Humanoid")
  146.         local pose = "Standing"
  147.        
  148.         local currentAnim = ""
  149.         local currentAnimInstance = nil
  150.         local currentAnimTrack = nil
  151.         local currentAnimKeyframeHandler = nil
  152.         local currentAnimSpeed = 1.0
  153.         local animTable = {}
  154.         local animNames = {
  155.             idle = {
  156.                 { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  157.                 { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  158.             },
  159.             walk = {
  160.                 { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  161.             },
  162.             run = {
  163.                 { id = "run.xml", weight = 10 }
  164.             },
  165.             jump = {
  166.                 { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  167.             },
  168.             fall = {
  169.                 { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  170.             },
  171.             climb = {
  172.                 { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  173.             },
  174.             sit = {
  175.                 { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  176.             },
  177.             toolnone = {
  178.                 { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  179.             },
  180.             toolslash = {
  181.                 { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  182.                 -- { id = "slash.xml", weight = 10 }
  183.             },
  184.             toollunge = {
  185.                 { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  186.             },
  187.             wave = {
  188.                 { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  189.             },
  190.             point = {
  191.                 { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  192.             },
  193.             dance1 = {
  194.                 { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  195.                 { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  196.                 { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  197.             },
  198.             dance2 = {
  199.                 { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  200.                 { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  201.                 { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  202.             },
  203.             dance3 = {
  204.                 { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  205.                 { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  206.                 { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  207.             },
  208.             laugh = {
  209.                 { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  210.             },
  211.             cheer = {
  212.                 { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  213.             },
  214.         }
  215.         local dances = {"dance1", "dance2", "dance3"}
  216.        
  217.         -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  218.         local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  219.        
  220.         function configureAnimationSet(name, fileList)
  221.             if (animTable[name] ~= nil) then
  222.                 for _, connection in pairs(animTable[name].connections) do
  223.                     connection:disconnect()
  224.                 end
  225.             end
  226.             animTable[name] = {}
  227.             animTable[name].count = 0
  228.             animTable[name].totalWeight = 0
  229.             animTable[name].connections = {}
  230.            
  231.             -- check for config values
  232.             local config = game.Players.LocalPlayer.Character.Animate:FindFirstChild(name)
  233.             if (config ~= nil) then
  234.                 -- print("Loading anims " .. name)
  235.                 table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  236.                 table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  237.                 local idx = 1
  238.                 for _, childPart in pairs(config:GetChildren()) do
  239.                     if (childPart:IsA("Animation")) then
  240.                         table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  241.                         animTable[name][idx] = {}
  242.                         animTable[name][idx].anim = childPart
  243.                         local weightObject = childPart:FindFirstChild("Weight")
  244.                         if (weightObject == nil) then
  245.                             animTable[name][idx].weight = 1
  246.                         else
  247.                             animTable[name][idx].weight = weightObject.Value
  248.                         end
  249.                         animTable[name].count = animTable[name].count + 1
  250.                         animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  251.                         -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  252.                         idx = idx + 1
  253.                     end
  254.                 end
  255.             end
  256.            
  257.             -- fallback to defaults
  258.             if (animTable[name].count <= 0) then
  259.                 for idx, anim in pairs(fileList) do
  260.                     animTable[name][idx] = {}
  261.                     animTable[name][idx].anim = Instance.new("Animation")
  262.                     animTable[name][idx].anim.Name = name
  263.                     animTable[name][idx].anim.AnimationId = anim.id
  264.                     animTable[name][idx].weight = anim.weight
  265.                     animTable[name].count = animTable[name].count + 1
  266.                     animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  267.                     -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  268.                 end
  269.             end
  270.         end
  271.        
  272.         -- Setup animation objects
  273.         function scriptChildModified(child)
  274.             local fileList = animNames[child.Name]
  275.             if (fileList ~= nil) then
  276.                 configureAnimationSet(child.Name, fileList)
  277.             end
  278.         end
  279.        
  280.         game.Players.LocalPlayer.Character.Animate.ChildAdded:connect(scriptChildModified)
  281.         game.Players.LocalPlayer.Character.Animate.ChildRemoved:connect(scriptChildModified)
  282.        
  283.        
  284.         for name, fileList in pairs(animNames) do
  285.             configureAnimationSet(name, fileList)
  286.         end
  287.        
  288.         -- ANIMATION
  289.        
  290.         -- declarations
  291.         local toolAnim = "None"
  292.         local toolAnimTime = 0
  293.        
  294.         local jumpAnimTime = 0
  295.         local jumpAnimDuration = 0.3
  296.        
  297.         local toolTransitionTime = 0.1
  298.         local fallTransitionTime = 0.3
  299.         local jumpMaxLimbVelocity = 0.75
  300.        
  301.         -- functions
  302.        
  303.         function stopAllAnimations()
  304.             local oldAnim = currentAnim
  305.            
  306.             -- return to idle if finishing an emote
  307.             if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  308.                 oldAnim = "idle"
  309.             end
  310.            
  311.             currentAnim = ""
  312.             currentAnimInstance = nil
  313.             if (currentAnimKeyframeHandler ~= nil) then
  314.                 currentAnimKeyframeHandler:disconnect()
  315.             end
  316.            
  317.             if (currentAnimTrack ~= nil) then
  318.                 currentAnimTrack:Stop()
  319.                 currentAnimTrack:Destroy()
  320.                 currentAnimTrack = nil
  321.             end
  322.             return oldAnim
  323.         end
  324.        
  325.         function setAnimationSpeed(speed)
  326.             if speed ~= currentAnimSpeed then
  327.                 currentAnimSpeed = speed
  328.                 currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  329.             end
  330.         end
  331.        
  332.         function keyFrameReachedFunc(frameName)
  333.             if (frameName == "End") then
  334.                
  335.                 local repeatAnim = currentAnim
  336.                 -- return to idle if finishing an emote
  337.                 if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  338.                     repeatAnim = "idle"
  339.                 end
  340.                
  341.                 local animSpeed = currentAnimSpeed
  342.                 playAnimation(repeatAnim, 0.0, Humanoid)
  343.                 setAnimationSpeed(animSpeed)
  344.             end
  345.         end
  346.        
  347.         -- Preload animations
  348.         function playAnimation(animName, transitionTime, humanoid)
  349.            
  350.             local roll = math.random(1, animTable[animName].totalWeight)
  351.             local origRoll = roll
  352.             local idx = 1
  353.             while (roll > animTable[animName][idx].weight) do
  354.                 roll = roll - animTable[animName][idx].weight
  355.                 idx = idx + 1
  356.             end
  357.             -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  358.             local anim = animTable[animName][idx].anim
  359.            
  360.             -- switch animation
  361.             if (anim ~= currentAnimInstance) then
  362.                
  363.                 if (currentAnimTrack ~= nil) then
  364.                     currentAnimTrack:Stop(transitionTime)
  365.                     currentAnimTrack:Destroy()
  366.                 end
  367.                
  368.                 currentAnimSpeed = 1.0
  369.                
  370.                 -- load it to the humanoid; get AnimationTrack
  371.                 currentAnimTrack = humanoid:LoadAnimation(anim)
  372.                 currentAnimTrack.Priority = Enum.AnimationPriority.Core
  373.                
  374.                 -- play the animation
  375.                 currentAnimTrack:Play(transitionTime)
  376.                 currentAnim = animName
  377.                 currentAnimInstance = anim
  378.                
  379.                 -- set up keyframe name triggers
  380.                 if (currentAnimKeyframeHandler ~= nil) then
  381.                     currentAnimKeyframeHandler:disconnect()
  382.                 end
  383.                 currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  384.                
  385.             end
  386.            
  387.         end
  388.        
  389.         -------------------------------------------------------------------------------------------
  390.         -------------------------------------------------------------------------------------------
  391.        
  392.         local toolAnimName = ""
  393.         local toolAnimTrack = nil
  394.         local toolAnimInstance = nil
  395.         local currentToolAnimKeyframeHandler = nil
  396.        
  397.         function toolKeyFrameReachedFunc(frameName)
  398.             if (frameName == "End") then
  399.                 -- print("Keyframe : ".. frameName)
  400.                 playToolAnimation(toolAnimName, 0.0, Humanoid)
  401.             end
  402.         end
  403.        
  404.        
  405.         function playToolAnimation(animName, transitionTime, humanoid, priority)
  406.            
  407.             local roll = math.random(1, animTable[animName].totalWeight)
  408.             local origRoll = roll
  409.             local idx = 1
  410.             while (roll > animTable[animName][idx].weight) do
  411.                 roll = roll - animTable[animName][idx].weight
  412.                 idx = idx + 1
  413.             end
  414.             -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  415.             local anim = animTable[animName][idx].anim
  416.            
  417.             if (toolAnimInstance ~= anim) then
  418.                
  419.                 if (toolAnimTrack ~= nil) then
  420.                     toolAnimTrack:Stop()
  421.                     toolAnimTrack:Destroy()
  422.                     transitionTime = 0
  423.                 end
  424.                
  425.                 -- load it to the humanoid; get AnimationTrack
  426.                 toolAnimTrack = humanoid:LoadAnimation(anim)
  427.                 if priority then
  428.                     toolAnimTrack.Priority = priority
  429.                 end
  430.                
  431.                 -- play the animation
  432.                 toolAnimTrack:Play(transitionTime)
  433.                 toolAnimName = animName
  434.                 toolAnimInstance = anim
  435.                
  436.                 currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  437.             end
  438.         end
  439.        
  440.         function stopToolAnimations()
  441.             local oldAnim = toolAnimName
  442.            
  443.             if (currentToolAnimKeyframeHandler ~= nil) then
  444.                 currentToolAnimKeyframeHandler:disconnect()
  445.             end
  446.            
  447.             toolAnimName = ""
  448.             toolAnimInstance = nil
  449.             if (toolAnimTrack ~= nil) then
  450.                 toolAnimTrack:Stop()
  451.                 toolAnimTrack:Destroy()
  452.                 toolAnimTrack = nil
  453.             end
  454.            
  455.            
  456.             return oldAnim
  457.         end
  458.        
  459.         -------------------------------------------------------------------------------------------
  460.         -------------------------------------------------------------------------------------------
  461.        
  462.        
  463.         function onRunning(speed)
  464.             if speed > 0.01 then
  465.                 playAnimation("walk", 0.1, Humanoid)
  466.                 if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  467.                     setAnimationSpeed(speed / 14.5)
  468.                 end
  469.                 pose = "Running"
  470.             else
  471.                 if emoteNames[currentAnim] == nil then
  472.                     playAnimation("idle", 0.1, Humanoid)
  473.                     pose = "Standing"
  474.                 end
  475.             end
  476.         end
  477.        
  478.         function onDied()
  479.             pose = "Dead"
  480.         end
  481.        
  482.         function onJumping()
  483.             playAnimation("jump", 0.1, Humanoid)
  484.             jumpAnimTime = jumpAnimDuration
  485.             pose = "Jumping"
  486.         end
  487.        
  488.         function onClimbing(speed)
  489.             playAnimation("climb", 0.1, Humanoid)
  490.             setAnimationSpeed(speed / 12.0)
  491.             pose = "Climbing"
  492.         end
  493.        
  494.         function onGettingUp()
  495.             pose = "GettingUp"
  496.         end
  497.        
  498.         function onFreeFall()
  499.             if (jumpAnimTime <= 0) then
  500.                 playAnimation("fall", fallTransitionTime, Humanoid)
  501.             end
  502.             pose = "FreeFall"
  503.         end
  504.        
  505.         function onFallingDown()
  506.             pose = "FallingDown"
  507.         end
  508.        
  509.         function onSeated()
  510.             pose = "Seated"
  511.         end
  512.        
  513.         function onPlatformStanding()
  514.             pose = "PlatformStanding"
  515.         end
  516.        
  517.         function onSwimming(speed)
  518.             if speed > 0 then
  519.                 pose = "Running"
  520.             else
  521.                 pose = "Standing"
  522.             end
  523.         end
  524.        
  525.         function getTool()
  526.             for _, kid in ipairs(Figure:GetChildren()) do
  527.                 if kid.className == "Tool" then return kid end
  528.             end
  529.             return nil
  530.         end
  531.        
  532.         function getToolAnim(tool)
  533.             for _, c in ipairs(tool:GetChildren()) do
  534.                 if c.Name == "toolanim" and c.className == "StringValue" then
  535.                     return c
  536.                 end
  537.             end
  538.             return nil
  539.         end
  540.        
  541.         function animateTool()
  542.            
  543.             if (toolAnim == "None") then
  544.                 playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  545.                 return
  546.             end
  547.            
  548.             if (toolAnim == "Slash") then
  549.                 playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  550.                 return
  551.             end
  552.            
  553.             if (toolAnim == "Lunge") then
  554.                 playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  555.                 return
  556.             end
  557.         end
  558.        
  559.         function moveSit()
  560.             RightShoulder.MaxVelocity = 0.15
  561.             LeftShoulder.MaxVelocity = 0.15
  562.             RightShoulder:SetDesiredAngle(3.14 /2)
  563.             LeftShoulder:SetDesiredAngle(-3.14 /2)
  564.             RightHip:SetDesiredAngle(3.14 /2)
  565.             LeftHip:SetDesiredAngle(-3.14 /2)
  566.         end
  567.        
  568.         local lastTick = 0
  569.        
  570.         function move(time)
  571.             local amplitude = 1
  572.             local frequency = 1
  573.             local deltaTime = time - lastTick
  574.             lastTick = time
  575.            
  576.             local climbFudge = 0
  577.             local setAngles = false
  578.            
  579.             if (jumpAnimTime > 0) then
  580.                 jumpAnimTime = jumpAnimTime - deltaTime
  581.             end
  582.            
  583.             if (pose == "FreeFall" and jumpAnimTime <= 0) then
  584.                 playAnimation("fall", fallTransitionTime, Humanoid)
  585.             elseif (pose == "Seated") then
  586.                 playAnimation("sit", 0.5, Humanoid)
  587.                 return
  588.             elseif (pose == "Running") then
  589.                 playAnimation("walk", 0.1, Humanoid)
  590.             elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  591.                 -- print("Wha " .. pose)
  592.                 stopAllAnimations()
  593.                 amplitude = 0.1
  594.                 frequency = 1
  595.                 setAngles = true
  596.             end
  597.            
  598.             if (setAngles) then
  599.                 local desiredAngle = amplitude * math.sin(time * frequency)
  600.                
  601.                 RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  602.                 LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  603.                 RightHip:SetDesiredAngle(-desiredAngle)
  604.                 LeftHip:SetDesiredAngle(-desiredAngle)
  605.             end
  606.            
  607.             -- Tool Animation handling
  608.             local tool = getTool()
  609.             if tool and tool:FindFirstChild("Handle") then
  610.                
  611.                 local animStringValueObject = getToolAnim(tool)
  612.                
  613.                 if animStringValueObject then
  614.                     toolAnim = animStringValueObject.Value
  615.                     -- message recieved, delete StringValue
  616.                     animStringValueObject.Parent = nil
  617.                     toolAnimTime = time + .3
  618.                 end
  619.                
  620.                 if time > toolAnimTime then
  621.                     toolAnimTime = 0
  622.                     toolAnim = "None"
  623.                 end
  624.                
  625.                 animateTool()
  626.             else
  627.                 stopToolAnimations()
  628.                 toolAnim = "None"
  629.                 toolAnimInstance = nil
  630.                 toolAnimTime = 0
  631.             end
  632.         end
  633.        
  634.         -- connect events
  635.         Humanoid.Died:connect(onDied)
  636.         Humanoid.Running:connect(onRunning)
  637.         Humanoid.Jumping:connect(onJumping)
  638.         Humanoid.Climbing:connect(onClimbing)
  639.         Humanoid.GettingUp:connect(onGettingUp)
  640.         Humanoid.FreeFalling:connect(onFreeFall)
  641.         Humanoid.FallingDown:connect(onFallingDown)
  642.         Humanoid.Seated:connect(onSeated)
  643.         Humanoid.PlatformStanding:connect(onPlatformStanding)
  644.         Humanoid.Swimming:connect(onSwimming)
  645.        
  646.         -- setup emote chat hook
  647.         game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
  648.             local emote = ""
  649.             if msg == "/e dance" then
  650.                 emote = dances[math.random(1, #dances)]
  651.             elseif (string.sub(msg, 1, 3) == "/e ") then
  652.                 emote = string.sub(msg, 4)
  653.             elseif (string.sub(msg, 1, 7) == "/emote ") then
  654.                 emote = string.sub(msg, 8)
  655.             end
  656.            
  657.             if (pose == "Standing" and emoteNames[emote] ~= nil) then
  658.                 playAnimation(emote, 0.1, Humanoid)
  659.             end
  660.            
  661.         end)
  662.        
  663.        
  664.         -- main program
  665.        
  666.         -- initialize to idle
  667.         playAnimation("idle", 0.1, Humanoid)
  668.         pose = "Standing"
  669.        
  670.         while Figure.Parent ~= nil do
  671.             local _, time = wait(0.1)
  672.             move(time)
  673.         end
  674.        
  675.         if Humanoid.Health == 0
  676.         then
  677.             print("death occured, waiting for respawn")
  678.             Figure:WaitForChild("Humanoid")
  679.             print("making r6 again")
  680.             oof()
  681.         end
  682.     end
  683.     oof()
  684. end
  685. coroutine.wrap(WVBYNE_fake_script)()
  686.  
Add Comment
Please, Sign In to add comment