Advertisement
Capybara_ele

Untitled

Sep 22nd, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. for a, b in pairs(plr.PlayerGui[name].GameplayFrame.Tracks:GetChildren()) do
  2. if b and b:IsA("Frame") then
  3. local key
  4. if b.Name == "Track1" then
  5. key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane1.Text
  6. elseif b.Name == "Track2" then
  7. key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane2.Text
  8. elseif b.Name == "Track3" then
  9. key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane3.Text
  10. elseif b.Name == "Track4" then
  11. key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane4.Text
  12. end
  13. local con = b.ChildAdded:Connect(function(child)
  14. if state == true then
  15. if child:IsA("Frame") then
  16. local hit = false
  17. while state == true and child and not hit do
  18. game:GetService('RunService').Stepped:wait()
  19. if child.Position.Y.Scale >= .98 then
  20. hit = true
  21. pressKey(key)
  22. task.wait(offset)
  23. releaseKey(key)
  24. end
  25. if not child then
  26. hit = true
  27. end
  28. end
  29. elseif child:IsA("Folder") then
  30. local hit = false
  31. while state == true and child and not hit do
  32. game:GetService('RunService').Stepped:wait()
  33. if child.Head.Position.Y.Scale >= .98 then
  34. pressKey(key)
  35. end
  36. if child.Tail.Position.Y.Scale >= .98 then
  37. releaseKey(key)
  38. hit = true
  39. end
  40. if not child then
  41. hit = true
  42. end
  43. end
  44. end
  45. end
  46. end)
  47. table.insert(_G.connections, con)
  48. end
  49. end
  50. game:GetService('RunService').Stepped:wait()
  51. end
  52. end
  53. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement