Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Set names to lowercase for URL injection.
- $ToLower = strtolower($_GET["To"]);
- $BroadcasterLower = strtolower($_GET["Broadcaster"]);
- // Inject lowercase names to get correct capitalization of usernames.
- $ch = curl_init("https://api.twitch.tv/kraken/channels/" . $ToLower);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- $result = curl_exec($ch);
- curl_close($ch);
- // Decode the above JSON data.
- $ToCorrectName = json_decode($result, true);
- // No name was entered after the command.
- if (empty($_GET["To"]))
- {
- echo 'Hey ' . htmlspecialchars($_GET["From"]) . ' if you want to kill someone, you need to tell me who you wish to kill!';
- die();
- }
- // No such Twitch user exists, yet.
- if($ToCorrectName['display_name'] == null)
- {
- echo 'Sorry, ' . htmlspecialchars($_GET["From"]) . ', ' . htmlspecialchars($_GET["To"]) . ' isn\'t a Twitch streamer!';
- die();
- }
- // Tried to kill the broadcaster.
- if ($ToLower == $BroadcasterLower)
- {
- echo htmlspecialchars($_GET["From"]) . ' has just tried to kill ' . $ToCorrectName['display_name'] . '! We can\'t allow that, now can we?';
- die();
- }
- // Tried to commit suicide.
- elseif ($_GET["To"] == $_GET["From"])
- {
- echo 'Well, this is awkward... ' . $ToCorrectName['display_name'] . ' appears to have a suicide wish.';
- die();
- }
- // Tried to kill a bot, I know there's many more, add to suit yourself.
- elseif ($ToLower == 'nightbot' || $ToLower == 'wizebot' || $ToLower == 'moobot')
- {
- echo 'One does not simply kill a bot!';
- die();
- }
- // The kill methods array.
- $Methods = array
- (
- "with a baseball bat!",
- "with a rectal cactus, OUCH!",
- "with a potato!",
- "with a gun, bang bang!",
- "with a knife, stabby stabby!",
- "by putting needles in their eye!",
- "by running them over with a tractor!",
- "by putting them into a baler!",
- "with a laptop smashed across the head!",
- "by burning them alive!",
- "by means of electrocution, zap zap!",
- "by freezing them!",
- "by burying them alive!",
- "by drowning them!",
- "by pulling their limbs apart!",
- "by making them drink acid!",
- "by chopping them into little pieces!",
- "by putting a hit out on them with the Russian mob!",
- "with a candle!",
- "with a frying pan!",
- "with a candle stick!",
- "by hacking their homes power grid and causing an overload!",
- "by putting them on the terrorist watch list!",
- "by causing them to laugh themselves to death!",
- "with a hammer!",
- "with a screwdriver!",
- "with poison!",
- "by choking them!",
- "with a banana!",
- "by pushing them into a snake pit!",
- "by pushing them off a cliff!",
- "by pushing them into a razor filled pit!",
- "by shoving razors down their throat!",
- "by strapping C4 around their neck!",
- "by calling in an airstrike!",
- "by running them over!",
- "with a drug OD!",
- "with a tire iron!",
- "with a hot dog!",
- "by getting them bit by a rabies infected dog!",
- "with a baseball!",
- "by having a robot push them into a meat grinder!",
- "by pushing them into a bear trap and leaving them for a bear",
- "by tying them to a tree in the middle of the woods and leaving them!",
- "by pushing them into an active volcano!",
- "by pushing them into the middle of the ocean!",
- "with their infamous death glare!",
- "by smashing a PS4 controller into their eye!"
- );
- // Count the array size, and return a ranodm entry from the array.
- $KillMethod = $Methods[mt_rand(0, count($Methods) - 1)];
- // Print the output.
- echo htmlspecialchars($_GET["From"]) . ' has just killed ' . $ToCorrectName['display_name'] . ' ' . $KillMethod;
- ?>
- Example: Kill.php?Broadcaster=TwitchBroadcaster&From=Myself&To=TwitchUsername
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement