Advertisement
HuskyLover269

Untitled

Jun 2nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.84 KB | None | 0 0
  1. attacknum = 0
  2. textnum = 0
  3. music = "MegalovaniaRe"
  4. encountertext = "Stop C H A R A"
  5. wavetimer = 4
  6. arenasize = {155, 130}
  7. SetGlobal("hurtTime",-10)
  8. CanAttack = 1
  9. kill = 1
  10. SetGlobal('damage', 15)
  11. can = 1
  12. Skin = 15
  13. Button = 0
  14. Lol =1
  15. SetPPCollision(true)
  16. transformationTimer = 0
  17. Def = 1
  18. TheAudio = 0
  19. ending = 0
  20.  
  21. function EnteringState(newstate, oldstate)
  22. if newstate == "ENEMYDIALOGUE" then
  23. elseif newstate!= "ENEMYDIALOGUE" and oldstate == "ENEMYDIALOGUE" then
  24. if Def == 2 then
  25. State("ACTIONSELECT")
  26. Def = 3
  27. end
  28. elseif newstate!= "DEFENDING" and oldstate == "DEFENDING" then
  29. if Def == 1 then
  30. Def = 2
  31. State("ENEMYDIALOGUE")
  32. end
  33. if ending == 1 then
  34. attacknum = 13
  35. State("Defending")
  36. ending = 0
  37. end
  38. elseif newstate != "ATTACKING" and oldstate == "ENEMYSELECT" then
  39. end
  40. end
  41.  
  42. function DefenseEnding()
  43. if Def == 1 then
  44. State("ENEMYDIALOGUE")
  45. enemies[1].SetVar('currentdialogue',("You Have Stood\n In My Way Long\n Enough!"))
  46. end
  47. end
  48.  
  49.  
  50. NewAudio.CreateChannel("1")
  51. NewAudio.PlaySound( "1","Bird",true,0.65)
  52. enemies = {
  53. "End Sans"
  54. }
  55.  
  56. fliktimer = 0
  57. flik = false
  58.  
  59. enemypositions = {
  60. {0, 0}
  61. }
  62. thetimer = 0
  63. spawntimer = 0
  64. lol = 1
  65. Can = 1
  66. right = 0
  67. Animate = false
  68. atking = 0
  69. atkingx = 0
  70.  
  71. function Update()
  72.  
  73. if PlayerHP == 1 then
  74. Player.hp = 1
  75. end
  76.  
  77. if atking == 1 then
  78. if atkingx == 0 then
  79. atkingx = 1
  80. State("ACTIONSELECT")
  81. end
  82. end
  83.  
  84. if Animate == true then
  85. AnimateSans()
  86. AnimateSans()
  87. AnimateSans()
  88. AnimateSans()
  89. AnimateSans()
  90. AnimateSans()
  91. end
  92. if Animate2 == true then
  93. AnimateSans2()
  94. end
  95. if TheAudio == 1 then
  96. TheAudio = 0
  97. Audio.Play()
  98. end
  99.  
  100. if flik == true then
  101. fliktimer = fliktimer + 1
  102. if fliktimer == 10 then
  103. Audio.PlaySound("flicker")
  104. fliktimer = 0
  105. end
  106. end
  107.  
  108. if (GetGlobal("transforming") == true) then
  109. thetimer = thetimer + 1
  110. if lol == 1 then
  111. lol =2
  112. whitebullet = CreateProjectileAbs("screenfade/white",320,240)
  113. whitebullet.sprite.alpha = 1
  114. whitebullet.SetVar('tile', 1)
  115. Audio.PlaySound("flicker")
  116. transformationTimer = Time.time
  117. Audio.StopAll()
  118. Audio.PlaySound("flicker")
  119. end
  120. if thetimer == 30 then
  121. Audio.PlaySound("flicker")
  122. whitebullet.Remove()
  123. Can=2
  124. end
  125. end
  126.  
  127.  
  128.  
  129. if Hi == 1 then
  130. spawntimer = spawntimer + 1
  131. end
  132. if Lol == 1 then
  133. SetButtonLayer("Top")
  134. else
  135. SetButtonLayer("BelowArena")
  136. end
  137. end
  138.  
  139. possible_attacks = {"Husky/blue_H","Husky/at2"}
  140.  
  141. spawntimer7 = 0
  142.  
  143. function EncounterStarting()
  144. require "Animations/Sans"
  145. State("ENEMYDIALOGUE")
  146. Player.name = "Frisk"
  147. Player.lv = 1
  148. SetGlobal("hurtTime",false)
  149. Inventory.AddCustomItems({"Thin Air"}, {0})
  150. Inventory.SetInventory({"Thin Air"})
  151. end
  152.  
  153. function Husky1()
  154.  
  155. end
  156.  
  157.  
  158. function EnemyDialogueStarting()
  159.  
  160. local intro = GetGlobal("intro")
  161. if intro == true then
  162. enemies[1].SetVar('currentdialogue',("You Have Stood\n In My Way Long\n Enough!"))
  163. SetGlobal("intro",false)
  164. end
  165. textnum = textnum + 1
  166. attacknum = attacknum + 1
  167.  
  168. if can == 1 then
  169. if textnum == 1 then
  170. enemies[1].SetVar('currentdialogue', {
  171. "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]so you \nfinaly made\nit",
  172. "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]the end of\nyour journey\nis at hand",
  173. "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]in a few\nmoments,\nyou will meet\nthe king",
  174. "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]together...",
  175. "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]you will determine \nthe future \nof this world",
  176. "[func:SetSprite,AAASans/Normal/SansHap2][effect:twitch][font:sans][voice:sans]that's then",
  177. "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]now",
  178. "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]you will be\njudged",
  179. "[func:SetSprite,AAASans/Normal/SansHap2][effect:twitch][font:sans][voice:sans]you will be\njudged for\nyour every\naction",
  180. "[func:SetSprite,AAASans/Normal/SansHap][effect:twitch][font:sans][voice:sans]you will be\njudged for\nevery EXP\nyou've earned",
  181. "[func:SetSprite,AAASans/Normal/SansDoubleBlink][effect:twitch][font:sans][voice:sans]...",
  182. "[func:SetSprite,AAASans/Normal/SansWink][effect:twitch][font:sans][voice:sans]but you\nyou never gained\nany LOVE",
  183. "[func:SetSprite,AAASans/Normal/SansHap2][effect:twitch][font:sans][voice:sans]'course, that...",
  184. "[func:SetSprite,AAASans/Normal/SansSockets][effect:twitch][font:sans][voice:sans]what",
  185. "[noskip][func:SetSprite,AAASans/Normal/SansSockets][effect:twitch][font:sans][voice:sans][func:tut][w:5]aaaaah[w:50][next]",
  186. "[func:SetSprite,AAASans/Normal/SansSockets][effect:twitch][voice:sans][func:tutend]Heh",
  187. "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]You thought\nthat you\ncould ignore\nme",
  188. "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]No one can\nignore me",
  189. "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]And now\nI have sans's\nbody and\nsoul",
  190. "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]It's not human\nbut I am strong \nmyself and\nwill channel his\npower",
  191. "[func:SetSprite,AAASans/Tut1][effect:twitch][voice:sans]Now you",
  192.  
  193. "[func:StartTransformation][func:SetSprite,AAASans/Emote/Sockets][func:Button1][voice:None][noskip][effect:twitch][w:20]should be\nburning\nin hell",
  194. })
  195.  
  196.  
  197. Audio.Pause()
  198.  
  199. elseif textnum == 2 then
  200. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Emote/Wink2][voice:sans]Yes",
  201. "[noskip][func:SetSprite,AAASans/Emote/Wink3][voice:sans]This will\ndo fine[w:10][func:TheAudio][next]"})
  202. elseif textnum == 3 then
  203. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]You are\nweak",
  204. "[voice:sans]But I know sans\nwill fix that",
  205. "[voice:sans]He will\nincrease your\nLOVE",
  206. "[func:SetSprite,AAASans/Na][voice:sans]So I must\nstop you\nbefore you reach\nmaximum power"})
  207.  
  208. elseif textnum == 4 then
  209. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]You wished to\ngain the\nending",
  210. "[func:SetSprite,AAASans/Na][voice:sans]That involves\nthe most\nlove",})
  211. elseif textnum == 5 then
  212. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]To do that\nyou had to\nsacrifice LOVE"})
  213. elseif textnum == 6 then
  214. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]Yet i\nknow for\nthe sake of\n all",
  215. "[func:SetSprite,AAASans/Na][voice:sans]You will\nnever QUIT",
  216. "[func:SetSprite,AAASans/Na][voice:sans]But maby\nI can crush\nyour \nDETERMINATION"})
  217. elseif textnum == 7 then
  218. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]You're still\nalive","[func:SetSprite,AAASans/Na][voice:sans]Not\nfor long"})
  219. elseif textnum == 8 then
  220. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]Look\nyou killed\nno one",
  221. "[func:SetSprite,AAASans/Na][voice:sans]This power\nwas just\nignored"})
  222. elseif textnum == 9 then
  223. enemies[1].SetVar('currentdialogue',{"[voice:sans]And you\ncan not\neven hit","[voice:sans]a stationary\nskeleton"})
  224. elseif textnum == 10 then
  225. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]Is that\nyour idea\nof love","[func:SetSprite,AAASans/Na][voice:sans]Ha"})
  226. elseif textnum == 11 then
  227. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]No","[func:SetSprite,AAASans/Na][voice:sans]But You're getting\nTo strong","[func:SetSprite,AAASans/Na][voice:sans]I must\ndestroy you","[func:SetSprite,AAASans/Na][voice:sans]Suvive 2 more attacks\nand I'll use\nmy special\nattack","Tip for this Move: \nUse Space"}) --Pre Special Attack
  228. elseif textnum == 12 then
  229. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/Na][voice:sans]No No","[func:SetSprite,AAASans/Na][voice:sans]You Can not\nbe doing this","[func:SetSprite,AAASans/Na][voice:sans]Ah!","[func:SetSprite,AAASans/Normal/SansHap][voice:sans]human","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]you must\nkill me","[func:SetSprite,AAASans/Na][voice:sans]Yes yes\nkill you're\nlittle freind.","[func:SetSprite,AAASans/Na][voice:sans]I Dare you"})
  230. elseif textnum == 13 then
  231. enemies[1].SetVar('currentdialogue',{"[func:SetSprite,AAASans/NA][voice:sans]Ha","[func:SetSprite,AAASans/Na][voice:sans]You're to\nweak","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]no","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]this human\nis many things","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]but weak\nis most\ndefinatly\nnot one\nof them","[func:SetSprite,AAASans/Normal/SansHap2][voice:sans]and neither\nam I","[func:SetSprite,AAASans/Na][voice:sans]AH","[func:ending][func:attack]"})
  232. end
  233. end
  234. end
  235.  
  236. function EnemyDialogueEnding()
  237. if CanAttack == 1 then
  238. if attacknum == 1 then
  239. nextwaves = {"Sans/S1"}
  240. Player.lv = 1
  241. elseif attacknum == 2 then
  242. nextwaves = {""}
  243. elseif attacknum == 3 then
  244. nextwaves = {"Sans/S2"}
  245. Player.lv = 2
  246. elseif attacknum == 4 then
  247. nextwaves = {"Sans/S3"}
  248. Player.lv = 4
  249. elseif attacknum == 5 then
  250. nextwaves = {"Sans/S4"}
  251. Player.lv = 6
  252. elseif attacknum == 6 then
  253. nextwaves = {"Sans/S5"}
  254. Player.lv = 8
  255. elseif attacknum == 7 then
  256. nextwaves = {"Sans/S6"}
  257. elseif attacknum == 8 then
  258. nextwaves = {"Sans/S7"}
  259. Player.lv = 10
  260. elseif attacknum == 9 then
  261. nextwaves = {"Sans/S8"}
  262. Player.lv = 12
  263. elseif attacknum == 10 then
  264. nextwaves = {"Sans/S10"}
  265. elseif attacknum == 11 then
  266. nextwaves = {"Sans/S12"} --Pre Special Attack
  267. elseif attacknum == 12 then
  268. nextwaves = {"Sans/S11"}
  269. elseif attacknum == 13 then
  270. nextwaves = {"As/Ha"} --Final
  271. elseif attacknum == 14 then
  272. nextwaves = {"Sans/10"}
  273. elseif attacknum == 15 then
  274. nextwaves = {"As/15"}
  275. elseif attacknum == 16 then
  276. nextwaves = {"As/16"}
  277. elseif attacknum == 17 then
  278. nextwaves = {"Husky/Blank"}
  279. elseif attacknum == 18 then
  280. nextwaves = {"Husky/Blank"}
  281. elseif attacknum == 19 then
  282. nextwaves = {"Husky/Blank"}
  283. elseif attacknum == 20 then
  284. nextwaves = {"Husky/Blank"}
  285. elseif attacknum == 21 then
  286. nextwaves = {"As/Ha"}
  287. attacknum = 0
  288. end
  289. end
  290. if CanAttack == 0 then
  291. nextwaves = {"Husky/Blank"}
  292. end
  293. end
  294.  
  295. function DefenseEnding()
  296. encountertext = RandomEncounterText()
  297. end
  298.  
  299. function HandleSpare()
  300. State("ENEMYDIALOGUE")
  301. end
  302. function HandleItem(ItemID)
  303. if ItemID == "THIN AIR" then
  304. Player.Heal(0)
  305. BattleDialog({"You ate the Thin air\nIt was tasty\nYou gained 0 Hp"})
  306. end
  307. end
  308.  
  309. function OnHit(bullet)
  310. if(bullet.GetVar('tile')) == 0 then
  311. Player.Hurt(1)
  312. end
  313. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement