Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for a, b in pairs(plr.PlayerGui[name].GameplayFrame.Tracks:GetChildren()) do
- if b and b:IsA("Frame") then
- local key
- if b.Name == "Track1" then
- key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane1.Text
- elseif b.Name == "Track2" then
- key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane2.Text
- elseif b.Name == "Track3" then
- key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane3.Text
- elseif b.Name == "Track4" then
- key = plr.PlayerGui[name].MENUS.OptionsFrame.Input.Keyboard.Lane4.Text
- end
- local con = b.ChildAdded:Connect(function(child)
- if state == true then
- if child:IsA("Frame") then
- local hit = false
- while state == true and child and not hit do
- game:GetService('RunService').Stepped:wait()
- if child.Position.Y.Scale >= .98 then
- hit = true
- pressKey(key)
- task.wait(offset)
- releaseKey(key)
- end
- if not child then
- hit = true
- end
- end
- elseif child:IsA("Folder") then
- local hit = false
- while state == true and child and not hit do
- game:GetService('RunService').Stepped:wait()
- if child.Head.Position.Y.Scale >= .98 then
- pressKey(key)
- end
- if child.Tail.Position.Y.Scale >= .98 then
- releaseKey(key)
- hit = true
- end
- if not child then
- hit = true
- end
- end
- end
- end
- end)
- table.insert(_G.connections, con)
- end
- end
- game:GetService('RunService').Stepped:wait()
- end
- end
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement