Advertisement
Guest User

SniperScript Modified

a guest
Feb 16th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1.  
  2. var config = {
  3.  
  4. target: { value: 'lovejapan', type: 'text', label: 'User to follow' },
  5.  
  6. betMulti: { value: 0.15, type: 'number', label: 'Bet Adjustment' },
  7.  
  8. payMod: { value: 0, type: 'number', label: 'Payout (+/-)' },
  9.  
  10. minTarget: { value: 1.9, type: 'multiplier', label: 'Payout Minimum' }
  11.  
  12. };
  13.  
  14. log('Script is running..');
  15.  
  16.  
  17. engine.on('BET_PLACED', (bet) => {
  18.  
  19. if (bet.uname == config.target.value) {
  20.  
  21. if (bet.payout < config.minTarget.value){
  22.  
  23. log('Ignored bet with low target payout');
  24.  
  25. return;
  26.  
  27. }
  28.  
  29. let paySize = (bet.payout + config.payMod.value);
  30.  
  31. let betSize = userInfo.balance;
  32.  
  33. if (userInfo.balance < betSize) {
  34.  
  35. log('You have a balance is too low, you can not bet');
  36.  
  37. return;
  38.  
  39. }
  40.  
  41. engine.bet(betSize, paySize); // aim at same payout as target..
  42.  
  43. log(`Placed bet ${betSize/100} bits @ ${paySize}x`);
  44.  
  45. }
  46.  
  47. });
  48.  
  49.  
  50. engine.on('CASHED_OUT', (cashOut) => {
  51.  
  52.  
  53. if (cashOut.uname === config.target.value) {
  54.  
  55. if (engine.currentlyPlaying()) {
  56.  
  57. engine.cashOut();
  58.  
  59. log(`Spotted ${cashOut.uname} cashing out at ${cashOut.cashedAt}x`);
  60.  
  61. }
  62.  
  63. }
  64.  
  65. });
  66.  
  67.  
  68. function roundBit(bet){
  69.  
  70. return Math.round(bet / 100) * 100;
  71.  
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement