Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //HAM
- //ham model by valve (Team Fortress 2), using 360 image from: TF2 Wiki: http://wiki.teamfortress.com/w/images/5/5a/Ham_Shank_3D.jpg
- /*
- To add to a webpage:
- Either add this script to the html:
- <script language="http://pastebin.com/raw.php?i=y5jddGdR"></script>
- Or add to any webpage with the javascript console line by line:
- var HAM = document.createElement('script')
- HAM.language="javascript"
- HAM.src="http://pastebin.com/raw.php?i=y5jddGdR"
- document.head.appendChild(HAM)
- */
- var ham = new Image();
- ham.source = 'http://i.imgur.com/8Rngbqb.png' //cloud for easy access or change to local dir
- var hamwall = {l:0,t:0,r:window.innerWidth-140,b:window.innerHeight-280}
- //hampoo is an alternative hair-greasing product for manlier men, liberally stolen from the tf2 wiki
- var hampoo = [{l: 93, w: 93, fx: 0}, {l: 82, w: 94, fx: -296}, {l: 74, w: 97, fx: -588}, {l: 66, w: 105, fx: -885} , {l: 57, w: 117, fx: -1202} , {l: 51, w: 125, fx: -1549} , {l: 50, w: 126, fx: -1909} , {l: 50, w: 125, fx: -2271} , {l: 51, w: 120, fx: -2626} , {l: 57, w: 109, fx: -2971} , {l: 66, w: 105, fx: -3292} , {l: 78, w: 102, fx: -3604} , {l: 90, w: 101, fx: -3906} , {l: 100, w: 102, fx: -4198} , {l: 106, w: 103, fx: -4487} , {l: 110, w: 110, fx: -4782} , {l: 106, w: 122, fx: -5100} , {l: 104, w: 125, fx: -5447} , {l: 103, w: 126, fx: -5804} , {l: 104, w: 125, fx: -6163} , {l: 107, w: 118, fx: -6519} , {l: 112, w: 103, fx: -6864} , {l: 110, w: 96, fx: -7182} , {l: 102, w: 92, fx: -7496}, ];
- //hamshoes increase crit rate from 100% to 110%
- var hamshoe = {x:0,y:0,f:0,xD:3, yD:3}
- //Ham-Foo is a rare martial arts form indistinguishible from magic or sufficiently advanced technology
- var hamfoo = document.createElement('div');
- hamfoo.setAttribute('style',"height:280px; width:93px; left:0px; top:0px; position:fixed; z-index:9000; background-image:url('"+ham.source+"'); pointer-events:none;");
- hamfoo.setAttribute('id','OneHamToRuleThemAll');
- document.getElementsByTagName('body')[0].appendChild(hamfoo);
- var hamtoo = document.getElementById('OneHamToRuleThemAll');
- //a hambush is the act of moving slowly towards your opponent in wide open, holding ham in a threatening fashion (and hopefully spinning)
- var hambush = self.setInterval(function(){with(hamshoe){
- (f >= hampoo.length-1) ? f = 0 : f += 1;
- hamwall = {l:0,t:0,r:window.innerWidth-140,b:window.innerHeight-280}
- x += xD;
- y += yD;
- if(x >= hamwall.r || x <= hamwall.l){xD *= -1}
- if(y >= hamwall.b || y <= hamwall.t){yD *= -1}
- hamtoo.style.backgroundPosition = hampoo[f].fx +'px 0px';
- hamtoo.style.width = hampoo[f].w + 'px';
- hamtoo.style.left = x+ hampoo[f].l +'px';
- hamtoo.style.top = y+'px';
- }},50);
- console.log("HAMMIFIED!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement