Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.shepcraft.adventure;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args){
- System.out.println("Welcome To Shepcraft!!");
- Scanner s = new Scanner(System.in);
- int Health=10;
- double money = 19.99;
- String name;
- System.out.println("What is your name?");
- name = s.nextLine();
- System.out.println("Nice to meet you, " + name + "! You have " + Health + "!" );
- System.out.println("[1] Go To Red Sheep");
- System.out.println("[1] Go To Yellow Sheep");
- System.out.println("[1] Go To Purple Sheep");
- int input = s.nextInt();
- if (input == 1){
- System.out.println("You payed 2 dollars for health potion");
- money -= 1;
- Health += 1;
- }
- else if (input == 2){
- System.out.println("You discovered a Goblin in the forest and you get ambushed by Goblins and kill them! You gain 5 Money at the cost of 3 health");
- money += 5;
- Health -= 3;
- }
- else if (input == 3){
- System.out.println("lel hi there" + name);
- }
- else {
- System.out.println("Invalid input!");
- }
Advertisement
Add Comment
Please, Sign In to add comment