Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Friend removal bot
- v 1.3
- 12/02/2014
- horrible Javascript by AetherKnight
- ROBLOX pls add official fetur kthx
- */
- var ignore = ['namehere'];
- var MyId = 4308133;
- // Any best friends you have automatically get ignored
- function deletePls()
- {
- var friends = $('.friend-container');
- var bestFriends = $('.friend-container .remove-best-friend').parent().parent().parent().parent().parent().parent();
- // Yay, finding the ancestor in the family tree!
- for (i = 0; i < bestFriends.length; i++)
- {
- $(bestFriends[i]).attr('data-ignore-deletion','true');
- }
- for (i = 0; i < friends.length; i++)
- {
- var friend = $(friends[i]);
- var name = friend.children('.friend-name').children('a').text();
- if (friend.attr('data-ignore-deletion') === "true" || ignore.indexOf(name.toLowerCase()) !== -1)
- {
- // Ignore any best friends I have.
- }
- else
- {
- var tehButton = friend[0].children[0].children[0].children[0].children[1].children[1].children[0];
- // An ugly hack to get the delete button
- var targetId = parseInt($(tehButton).attr('data-target-user-id'));
- $.ajax({ // remove each friend, give us ROBLOX's friends back - since he has none.
- type: 'POST',
- url: './friends/removefriend',
- data: {"targetUserID":targetId, "displayedUserID":1,"pageNum":1, "view":'Friends',"invitationID":"undefined"},
- async: true,
- });
- }
- }
- $.ajax({
- type: 'GET',
- url: './friends/Friends?DisplayedUserID=' + MyId + '&PageNum=1',
- success: function(result){ $('#FriendsTab').html(result); } ,
- }); // Load more friends into the list, so we can keep going
- setTimeout(deletePls, 2000); // Works optimal at 2 seconds, no idea why.
- };
- deletePls();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement