Advertisement
Nutgear

[Lua, Roblox] Giygas 3.5.0

Apr 13th, 2023 (edited)
1,882
7
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.92 KB | None | 7 0
  1. --require(13124687790).Owner("xXRedPawnerXx") REQUIRE. IF YOU WANNA EXECUTE THE SOURCE USE H/
  2.  
  3. --RAW version: 3.5.0
  4. --Require version: 3.5.0
  5.  
  6. --BASIC VARIABLES
  7.  
  8. local RunService = game:GetService("RunService")
  9. local player = "xXRedPawnerXx"
  10. local playerbin = game.Players[player]
  11. local character = playerbin.Character
  12.  
  13. local h = Instance.new("Hint") --playerbin.PlayerGui
  14.  
  15.  
  16. --STATS AND SETTINGS
  17. local NoHint = true
  18. local CritsPlz = false
  19.  
  20. local msg = ". . ."
  21.  
  22. local psirate = 128
  23. local phase = 1
  24. local staticphase = 1
  25. local psiMAX = 2000 --6000
  26. local psi = psiMAX
  27.  
  28. local humanoid = character.Humanoid
  29. humanoid.MaxHealth = 4000 --6000
  30. humanoid.Health = humanoid.MaxHealth
  31. humanoid.WalkSpeed = (36/(psiMAX+humanoid.MaxHealth))*(psi+humanoid.Health) -- 36 is the default walkspeed
  32.  
  33. --TEXTURES
  34.  
  35. local tex_jumpscares = {"http://www.roblox.com/asset/?id=4204898333","http://www.roblox.com/asset/?id=15016407","http://www.roblox.com/asset/?id=9118806617","http://www.roblox.com/asset/?id=6337170651"}
  36. local aud_cutout = {"rbxassetid://8724367184","rbxassetid://7224422552","rbxassetid://5171923555"}
  37. local aud_prejump = {"rbxassetid://7229804590","rbxassetid://4883181281","rbxassetid://6932519682"}
  38.  
  39. local tex_hitbox = "http://www.roblox.com/asset/?id=48272732"
  40. local tex_giygas = "http://www.roblox.com/asset/?id=12708018814"
  41. local tex_damage = "http://www.roblox.com/asset/?id=480633900"
  42. local tex_wounded = {"http://www.roblox.com/asset/?id=13769798083","http://www.roblox.com/asset/?id=13769799301"}
  43. local tex_fatal = {"http://www.roblox.com/asset/?id=13769798083","http://www.roblox.com/asset/?id=13769799301","http://www.roblox.com/asset/?id=13769800293","http://www.roblox.com/asset/?id=13769801871","http://www.roblox.com/asset/?id=13769804443","http://www.roblox.com/asset/?id=13769805888"}
  44.  
  45. --MATH FUNCTIONS
  46.  
  47. local X = 0
  48. local fun_BGmovement_XZ = 1
  49. local fun_BGmovement_Y = 2*math.sin(X/20)
  50. local fun_stability = 8
  51. --local fun_color = Vector3.new(1,1,1)
  52.  
  53. local bg = Instance.new("Part",character)
  54. bg.Size = Vector3.new(1,1,1)
  55. bg.Transparency = 1
  56. bg.Anchored = true
  57. bg.CanCollide = false
  58. bg.CanTouch = false
  59.  
  60. local bg_mesh = Instance.new("SpecialMesh",bg)
  61. bg_mesh.MeshId = "rbxassetid://1527559"
  62. bg_mesh.TextureId = tex_wounded[1]
  63. bg_mesh.Scale = Vector3.new(1024, 768, -1024)
  64.  
  65. --SCRIPT PROPER
  66.  
  67. if NoHint == false then
  68.     h.Parent = workspace
  69. end
  70.  
  71. script.Parent= workspace
  72.  
  73. local music = Instance.new("Sound",character)
  74. music.SoundId = "rbxassetid://13048821234"
  75. music.Looped = true
  76. music.Volume = 8
  77.  
  78. local ambience = Instance.new("Sound",character.Head)
  79. ambience.SoundId = "rbxassetid://196346387"
  80. ambience.Volume = 2
  81. ambience.Looped = true
  82. ambience:Play()
  83.  
  84. local shriek = Instance.new("Sound",character.Head)
  85. shriek.SoundId = "rbxassetid://163684930"
  86. shriek.Volume = 3
  87. shriek.PlaybackSpeed = 0.75
  88. shriek.Looped = true
  89. shriek:Play()
  90.  
  91. character.Health:Destroy()
  92. character.Animate:Destroy()
  93. local x1 = character:GetChildren()
  94.  
  95. for i = 1,#x1 do
  96.     if x1[i]:IsA("BasePart") then
  97.         x1[i].Transparency = 1
  98.     elseif x1[i].ClassName == "Accessory" then
  99.         x1[i]:Destroy()
  100.     end
  101. end
  102.  
  103. character.Head.face:Destroy()
  104.  
  105. function playSFX(id, vol, pitch)
  106.     local sound = Instance.new("Sound",character.Head)
  107.     sound.SoundId = id
  108.     sound.Volume = vol
  109.     sound.PlaybackSpeed = pitch
  110.     sound.PlayOnRemove = true
  111.     sound:Destroy()
  112. end
  113. local light = Instance.new("PointLight",character.Head)
  114. light.Range = 12
  115. light.Color = Color3.new(1,0,0)
  116. light.Brightness = 6
  117.  
  118. local fogholder = Instance.new("Part")
  119. fogholder.Locked = true
  120. fogholder.Transparency = 1
  121. fogholder.CanCollide = false
  122. fogholder.Anchored = false
  123.  
  124. local fg_pos = Instance.new("BodyPosition",fogholder)
  125. fg_pos.D = 30
  126. fg_pos.P = 50
  127.  
  128. local BG = function()
  129.     for X = 1,math.huge do
  130.         RunService.Heartbeat:Wait()
  131.         bg.Rotation = bg.Rotation + Vector3.new(fun_BGmovement_XZ,fun_BGmovement_Y,fun_BGmovement_XZ)
  132.  
  133.         if phase >= 2 then
  134.             bg.Transparency = 0.6 + math.sin(X/fun_stability)/6
  135.         end
  136.  
  137.  
  138.         if phase == 4  then
  139.             bg_mesh.VertexColor = Vector3.new(9*math.sin(X/4),6*math.cos(X/4),6*math.cos(X/4))
  140.         else
  141.             bg_mesh.VertexColor = Vector3.new(1,1,1)
  142.         end
  143.  
  144.         fg_pos.Position = character.HumanoidRootPart.Position + Vector3.new(30*math.sin(X/150)*math.cos(X/75),10*math.sin(X/75),30*math.cos(X/150)*math.sin(X/100))
  145.         --fogholder.Position = character.HumanoidRootPart.Position + Vector3.new(20*math.sin(X/150)*math.cos(X/75),10*math.sin(X/75),40*math.cos(X/150)*math.sin(X/100))
  146.     end
  147. end
  148.  
  149. local co_BG = coroutine.create(BG)
  150.  
  151. local BG_anim = function()
  152.     while RunService.Heartbeat:Wait() do
  153.         if phase >= 3 then
  154.             for i = 1,#tex_fatal do
  155.                 bg_mesh.TextureId = tex_fatal[i]
  156.                 RunService.Heartbeat:Wait()
  157.             end
  158.         else
  159.             for i = 1,#tex_wounded do
  160.                 bg_mesh.TextureId = tex_wounded[i]
  161.                 for i = 1,3 do
  162.                     RunService.Heartbeat:Wait()
  163.                 end
  164.             end
  165.         end
  166.     end
  167.  
  168. end
  169.  
  170. local co_BGanim = coroutine.create(BG_anim)
  171.  
  172.  
  173. fogholder.Parent = character
  174.  
  175. local CLK = function()
  176.     while RunService.Heartbeat:Wait() do
  177.         humanoid.WalkSpeed = 36 - (28/(psiMAX+humanoid.MaxHealth))*(psi+humanoid.Health)
  178.         bg.Position = character.HumanoidRootPart.Position
  179.         if NoHint == false then
  180.             h.Text = "HP: " ..humanoid.Health.. "/" ..humanoid.MaxHealth.. " PSI: " .. math.floor(psi+0.5) .. "/" ..psiMAX.. " [ "..msg.." ] "
  181.         end
  182.         light.Brightness = (6/humanoid.MaxHealth)*humanoid.Health
  183.         if psi >= psiMAX then
  184.             psi = psiMAX
  185.         else
  186.             psi = psi + psirate/60
  187.         end
  188.     end
  189. end
  190.  
  191. local co_CLK = coroutine.create(CLK)
  192. coroutine.resume(co_CLK)
  193. --coroutine.resume(co_BG)
  194.  
  195. local Hitbox_FX = Instance.new("ParticleEmitter",character.Head)
  196. Hitbox_FX.Speed = NumberRange.new(0.05,0.05)
  197. Hitbox_FX.Color = ColorSequence.new(Color3.new(0.16,0.16,0.16),Color3.new(.33,0.08,0.08))
  198. Hitbox_FX.Transparency = NumberSequence.new{
  199.     NumberSequenceKeypoint.new(0,1),
  200.     NumberSequenceKeypoint.new(0.5,0),
  201.     NumberSequenceKeypoint.new(1,1),
  202. }
  203. Hitbox_FX.Size = NumberSequence.new(5,5)
  204. Hitbox_FX.LightEmission = 1
  205. Hitbox_FX.LightInfluence = 1
  206. Hitbox_FX.Texture = tex_hitbox
  207. Hitbox_FX.Lifetime = NumberRange.new(4,4)
  208. Hitbox_FX.RotSpeed = NumberRange.new(-2.5,2.5)
  209. Hitbox_FX.LockedToPart = true
  210. Hitbox_FX.Orientation = Enum.ParticleOrientation.FacingCameraWorldUp
  211. Hitbox_FX.Rate = 0.25
  212.  
  213.  
  214. local Giygas_Fog = Instance.new("ParticleEmitter")
  215. Giygas_Fog.Name = "Fog"
  216. Giygas_Fog.Parent = fogholder
  217. Giygas_Fog.Speed = NumberRange.new(1, 1)
  218. Giygas_Fog.Orientation = Enum.ParticleOrientation.VelocityParallel
  219. Giygas_Fog.Color = ColorSequence.new(Color3.new(1, 0.25, 0.25),Color3.new(1, 0.25, 0.25))
  220. Giygas_Fog.LightEmission = 1
  221. Giygas_Fog.LightInfluence = 1
  222. Giygas_Fog.RotSpeed = NumberRange.new(0,6)
  223. Giygas_Fog.LockedToPart = true
  224. Giygas_Fog.Squash = NumberSequence.new{
  225.     NumberSequenceKeypoint.new(0,-0.4),
  226.     NumberSequenceKeypoint.new(0.7,0),
  227.     NumberSequenceKeypoint.new(1,-1.5),
  228. }
  229. Giygas_Fog.Texture = tex_giygas
  230. Giygas_Fog.Transparency = NumberSequence.new{
  231.     NumberSequenceKeypoint.new(0,1),
  232.     NumberSequenceKeypoint.new(0.5,0),
  233.     NumberSequenceKeypoint.new(1,1),
  234. }
  235. Giygas_Fog.ZOffset = 50
  236. Giygas_Fog.Size = NumberSequence.new(20,20)
  237. Giygas_Fog.Brightness = 0
  238. Giygas_Fog.Lifetime = NumberRange.new(6, 6)
  239. Giygas_Fog.Rate = 1
  240. Giygas_Fog.SpreadAngle = Vector2.new(180, -180)
  241. Giygas_Fog.VelocitySpread = 180
  242.  
  243. local DamageFX = Instance.new("ParticleEmitter")
  244. Script1 = Instance.new("Script")
  245. DamageFX.Parent = character.HumanoidRootPart
  246. DamageFX.Speed = NumberRange.new(300, 300)
  247. DamageFX.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
  248. DamageFX.Enabled = false
  249. DamageFX.LightEmission = 1
  250. DamageFX.LightInfluence = 1
  251. DamageFX.Texture = "http://www.roblox.com/asset/?id=480633900"
  252. Giygas_Fog.Transparency = NumberSequence.new{
  253.     NumberSequenceKeypoint.new(0,1),
  254.     NumberSequenceKeypoint.new(0.5,0),
  255.     NumberSequenceKeypoint.new(1,1),
  256. }
  257. DamageFX.ZOffset = 0
  258. DamageFX.Size = NumberSequence.new(100,100)
  259. DamageFX.Brightness = 0
  260. DamageFX.Lifetime = NumberRange.new(0.125, 0.125)
  261. DamageFX.Rate = 400
  262. DamageFX.SpreadAngle = Vector2.new(0, 360)
  263.  
  264. function static(length)
  265.     local players = game:GetService("Players"):GetChildren()
  266.     for x = 1,#players do
  267.         local h = players[x]
  268.         local drop = h.PlayerGui
  269.         local static = Instance.new("ScreenGui")
  270.         static.Name = "Static"
  271.         local prex = drop:FindFirstChild("Static")
  272.         if prex == nil then
  273.             static.Parent = drop
  274.         elseif prex ~= static and humanoid.Health >= 1 then
  275.             prex:Destroy()
  276.         end
  277.  
  278.         local image = Instance.new("ImageLabel",static)
  279.         local sound = Instance.new("Sound",static)
  280.         sound.SoundId = "rbxassetid://170092034"
  281.         sound.Looped = true
  282.         sound.Volume = 0.5
  283.         sound.PlaybackSpeed = 0.2
  284.         image.ImageColor3 = Color3.new(1,0,0)
  285.         sound:Play()
  286.         image.BackgroundTransparency = 1
  287.         image.Transparency = 0.8
  288.         image.Size = UDim2.new(1,0,1,0)
  289.         for i = 1,1*length do
  290.             image.Image = "http://www.roblox.com/asset/?id=10218289720"
  291.             RunService.Heartbeat:Wait()
  292.             image.Image = "http://www.roblox.com/asset/?id=10218295778"
  293.             RunService.Heartbeat:Wait()
  294.             image.Image = "http://www.roblox.com/asset/?id=10218298795"
  295.             RunService.Heartbeat:Wait()
  296.             image.Image = "http://www.roblox.com/asset/?id=10218303689"
  297.             RunService.Heartbeat:Wait()
  298.             image.Image = "http://www.roblox.com/asset/?id=10218307266"
  299.             RunService.Heartbeat:Wait()
  300.             image.Image = "http://www.roblox.com/asset/?id=10218303689"
  301.             RunService.Heartbeat:Wait()
  302.             image.Image = "http://www.roblox.com/asset/?id=10218298795"
  303.             RunService.Heartbeat:Wait()
  304.             image.Image = "http://www.roblox.com/asset/?id=10218295778"
  305.             RunService.Heartbeat:Wait()
  306.         end
  307.         static:Destroy()
  308.     end
  309. end
  310.  
  311. humanoid.HealthChanged:connect(function()
  312.     DamageFX.Enabled = true
  313.     playSFX("rbxassetid://7074143771", 0.25, 1)
  314.     for i = 1,2 do
  315.         RunService.Heartbeat:Wait()
  316.     end
  317.     playSFX("rbxassetid://1097541069", 1, math.random(80,120)/100)
  318.     DamageFX.Enabled = false
  319. end)
  320.  
  321. humanoid.HealthChanged:connect(function()
  322.     if math.random(1,1000) <= (250*staticphase-250) and humanoid.Health >= 0 then
  323.         static(math.random(1,15))
  324.     end  
  325. end)
  326.  
  327. humanoid.Died:connect(function()
  328.  
  329.     music:Destroy()
  330.     ambience:Destroy()
  331.     shriek:Destroy()
  332.     bg:Destroy()
  333.     Giygas_Fog.Enabled = false
  334.     Hitbox_FX.Enabled = false
  335.  
  336.     local death = Instance.new("Sound",workspace)
  337.     death.SoundId = "rbxassetid://5385069016"
  338.     death.PlayOnRemove = true
  339.     death:Destroy()
  340.     static(40)
  341.  
  342. end)
  343.  
  344. --PHASES
  345.  
  346. coroutine.resume(co_BG)
  347. coroutine.resume(co_BGanim)
  348.  
  349. humanoid.HealthChanged:connect(function()
  350.     if humanoid.Health <= humanoid.MaxHealth*(75/100) then
  351.         phase = 2
  352.         staticphase = 2
  353.         X = 0
  354.         fun_stability = 8
  355.         fun_BGmovement_Y = 40*math.sin(X/60)
  356.         fun_BGmovement_XZ = 1
  357.         ambience.PlaybackSpeed = 1.25
  358.         psirate = 192
  359.         music.SoundId = "rbxassetid://13048821234"
  360.         Giygas_Fog.Lifetime = NumberRange.new(3,3)
  361.         Giygas_Fog.Rate = 2
  362.         if music.Playing ~= true then
  363.             music:Play()
  364.         end
  365.     end
  366.  
  367.     if humanoid.Health <= humanoid.MaxHealth*(50/100) then
  368.         phase = 3
  369.         ambience.PlaybackSpeed = 1.75
  370.         staticphase = 4
  371.         psirate = 512
  372.         Giygas_Fog.Lifetime = NumberRange.new(2,2)
  373.         fun_stability = 4
  374.         fun_BGmovement_Y = 0.5 --math.sin(X*50)
  375.         fun_BGmovement_XZ = 4
  376.         Giygas_Fog.Rate = 3
  377.         --      bg_mesh.TextureId = tex_fatal
  378.         music.SoundId = "rbxassetid://13048824379"
  379.     end
  380.  
  381.     if humanoid.Health <= humanoid.MaxHealth*(25/100) then
  382.         ambience.PlaybackSpeed = 2
  383.         staticphase = 6
  384.         phase = 4
  385.         psirate = 1024
  386.         fun_BGmovement_Y = 0
  387.         fun_BGmovement_XZ = 12
  388.         Giygas_Fog.Lifetime = NumberRange.new(1,1)
  389.         Giygas_Fog.Rate = 4
  390.         fun_stability = 2
  391.         music.SoundId = "rbxassetid://13048827883"
  392.     end
  393.  
  394. end)
  395.  
  396. --PSI and ATTACKS
  397.  
  398. function crit(probability)
  399.     if math.random(0,1000) <= probability and CritsPlz == true then
  400.         return true
  401.     else
  402.         return false
  403.     end
  404. end
  405.  
  406. local doing_magic = false
  407.  
  408. --humanoid.Touched:connect(function(y)
  409. --  local enemy = y.Parent:FindFirstChildOfClass("Humanoid")
  410. --  if enemy ~= nil and enemy.Parent.Name ~= player then
  411. --      enemy:TakeDamage(2)
  412. --  end
  413. --end)
  414.  
  415. local t_Lifeup = Instance.new("Tool",playerbin.Backpack)
  416. t_Lifeup.Name = "PK Lifeup (800 PSI)"
  417. t_Lifeup.RequiresHandle = false
  418.  
  419. t_Lifeup.Activated:Connect(function()
  420.     if doing_magic == false and psi >= 600  then
  421.         doing_magic = true
  422.         msg = "Giygas tries PK Lifeup!"
  423.         playSFX("rbxassetid://13048879322",10,1)
  424.         wait(1)
  425.         msg = ". . ."
  426.         psi = psi - 800
  427.         humanoid.Health = humanoid.Health + humanoid.MaxHealth*(4/100)
  428.         playSFX("rbxassetid://2226293507",3,1)
  429.         wait(4)
  430.         doing_magic = false
  431.     end
  432. end)
  433.  
  434. local t_Freeze = Instance.new("Tool",playerbin.Backpack)
  435.  
  436. t_Freeze.Name = "PK Freeze (150 PSI)"
  437. t_Freeze.RequiresHandle = false
  438. t_Freeze.Activated:Connect(function()
  439.     if doing_magic == false and psi >= 150 then
  440.         doing_magic = true
  441.         msg = "Giygas tries PK Freeze!"
  442.         playSFX("rbxassetid://13048879322",10,1)
  443.         wait(1)
  444.         msg = ". . ."
  445.         psi = psi - 150
  446.         playSFX("rbxassetid://13049208249",10,1)
  447.         local e = Instance.new("Explosion",workspace)
  448.         e.BlastRadius = 48
  449.         e.Visible = false
  450.         e.Position = character.Head.Position
  451.         e.BlastPressure = 0
  452.         e.Hit:Connect(function(part,distance)
  453.             if distance <= 64 and part.Parent ~= character then
  454.                 local hum = part.Parent:FindFirstChildOfClass("Humanoid")
  455.                 if hum ~= nil then
  456.                     local ice = Instance.new("Part")
  457.                     ice.Name = "Ice"
  458.                     ice.Anchored = true
  459.                     part.Anchored = true
  460.                     ice.BrickColor = BrickColor.Blue()
  461.                     ice.Transparency = 0.5
  462.                     ice.Material = Enum.Material.Ice
  463.                     ice.CFrame = part.CFrame
  464.                     ice.Size = Vector3.new(6,8,6)
  465.                     ice.Parent = workspace
  466.                     wait(1.5)
  467.                     part.Anchored = false
  468.                     ice.Material = Enum.Material.Neon
  469.                     ice.Shape = 0
  470.                     ice.CanCollide = false
  471.                     if crit(4) == true then
  472.                         playSFX("rbxassetid://8789851536",5,1)
  473.                         hum:TakeDamage(math.huge) --instakill
  474.                     end
  475.                     for i = 1,15 do
  476.                         RunService.Heartbeat:Wait()
  477.                         ice.Transparency = ice.Transparency + 0.5/15
  478.                         ice.Size = ice.Size + Vector3.new(2,2,2)
  479.                     end
  480.                     ice:Destroy()
  481.                     hum.PlatformStand = true
  482.                     hum:TakeDamage(45)
  483.                     wait(3)
  484.                     hum.PlatformStand = false
  485.                 end            
  486.             end
  487.         end)
  488.         wait(1/phase)
  489.         doing_magic = false
  490.     end
  491. end)
  492.  
  493. function DamageHumanoids(range, damage, chance, part)
  494.     local x = workspace:GetChildren()
  495.     for i = 1,#x do
  496.         if x[i]:IsA("Model") and x[i].Name ~= player then
  497.             local hum = x[i]:FindFirstChildOfClass("Humanoid")
  498.             if hum~= nil and hum.Parent:FindFirstChild("Head") ~= nil then
  499.                 if math.abs((hum.Parent.Head.Position - character.HumanoidRootPart.Position).Magnitude) <= range then
  500.                     hum:TakeDamage(damage)
  501.                     if math.random(0,6) == 0 then
  502.                         hum.Sit = true
  503.                     end
  504.                     local velocity = math.random(50,200)
  505.                     local primary = nil
  506.                     if hum.Parent.PrimaryPart ~= nil then
  507.                         primary = hum.Parent.PrimaryPart
  508.                         primary.Velocity = CFrame.new(primary.Position,part.Position):vectorToWorldSpace(Vector3.new(0,velocity*0.66,velocity))
  509.                     else
  510.                         primary = hum.Parent.Head
  511.                         primary.Velocity = CFrame.new(primary.Position,character.Head.Position):vectorToWorldSpace(Vector3.new(0,velocity*0.66,velocity))
  512.                     end
  513.  
  514.                     if crit(chance) == true then
  515.                         playSFX("rbxassetid://8789851536",5,1)
  516.                         if hum.Parent:FindFirstChild("Head") ~= nil then
  517.                             hum:TakeDamage(math.huge)
  518.                         end
  519.                     end
  520.                 end
  521.             end
  522.         end
  523.     end
  524. end
  525.  
  526. t_GiygasAtk = Instance.new("Tool",playerbin.Backpack)
  527. t_GiygasAtk.Name = "Giygas' Attack (1050 PSI)"
  528. t_GiygasAtk.RequiresHandle = false
  529. t_GiygasAtk.Activated:Connect(function()
  530.     if doing_magic == false and psi >= 1050 then
  531.         doing_magic = true
  532.         psi = psi - 1050
  533.         msg = "You cannot grasp the true form of Giygas' attack!"
  534.         playSFX("rbxassetid://13048879322",10,1)
  535.         wait(1)
  536.         msg = ". . ."
  537.         for i = 1,4 do
  538.             playSFX("rbxassetid://13048892034",10,1.2)
  539.             local ring = Instance.new("Part",workspace)
  540.             ring.Position = character.HumanoidRootPart.Position
  541.             ring.Anchored = true
  542.             ring.CastShadow = false
  543.             ring.CanCollide = false
  544.             ring.Material = Enum.Material.Neon
  545.             ring.Transparency = 0
  546.             ring.Orientation = Vector3.new(90,0,0)
  547.             ring.Size = Vector3.new(10,10,1)
  548.             ring.BrickColor = BrickColor.new("Hot pink")
  549.             local mesh = Instance.new("FileMesh",ring)
  550.             mesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  551.             DamageHumanoids(90, math.random(400,700), 9, ring)
  552.             for i = 1,30 do
  553.                 RunService.Heartbeat:Wait()
  554.                 ring.Size = ring.Size + Vector3.new(3,3,3)
  555.                 mesh.Scale = mesh.Scale + Vector3.new(12,12,8)
  556.                 ring.Transparency = (1/30)*i
  557.             end
  558.             ring:Destroy()
  559.         end
  560.         wait(2/phase)
  561.         doing_magic = false
  562.     end
  563. end)
  564.  
  565. local jumped = false
  566. local secret = false
  567. local secret_chance = 69 --69 by default
  568.  
  569. function KinderSurprise(hit)
  570.     local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  571.     if hum ~= nil and hit.Parent.Name ~= player and jumped == false then --and hit.Parent.Name ~= player
  572.         jumped = true
  573.         playSFX("rbxassetid://7322622109",5,1)
  574.         msg = "You cannot comprehend the true form of PK Trap!"
  575.         wait(1)
  576.         playSFX("rbxassetid://8789851536",5,1.3)
  577.         hum.PlatformStand = true
  578.         hum.Parent.PrimaryPart.Velocity = hum.Parent.PrimaryPart.CFrame.LookVector*100
  579.         local unfortunate = game.Players:GetPlayerFromCharacter(hum.Parent)
  580.         if game.Players:GetPlayerFromCharacter(hum.Parent) ~= nil then --Surprise jumpscare!
  581.             local vox = Instance.new("Sound",unfortunate.PlayerGui)
  582.             local jumpscare = Instance.new("ScreenGui",unfortunate.PlayerGui)
  583.  
  584.             jumpscare.Name = "HERE"
  585.             jumpscare.Enabled = true
  586.  
  587.             local image = Instance.new("ImageLabel",jumpscare)
  588.             print(image.Name .. " PRESENT! KENICHI!")
  589.             image.Active = true
  590.             image.Size = UDim2.new(1,0,1,0)
  591.  
  592.             local click = Instance.new("Sound",unfortunate.PlayerGui)
  593.             click.SoundId = "rbxassetid://7811669782"
  594.             click.Volume = 10
  595.             click:Play()
  596.  
  597.             image.Image = "http://www.roblox.com/asset/?id=7188341508"
  598.             image.ImageColor3 = Color3.new(0,0,0)
  599.             wait(0.03)
  600.             image.ImageColor3 = Color3.new(1,1,1)
  601.             wait(0.03)
  602.             image.ImageColor3 = Color3.new(0,0,0)
  603.             wait(0.03)
  604.             image.ImageColor3 = Color3.new(1,1,1)
  605.  
  606.             image.Image = "http://www.roblox.com/asset/?id=9468576413"
  607.  
  608.             vox.SoundId = aud_cutout[math.random(1,#aud_cutout)]
  609.             vox.Volume = 3
  610.             vox:Play()
  611.  
  612.             wait(vox.TimeLength)
  613.  
  614.             click:Play()
  615.  
  616.             image.Image = "http://www.roblox.com/asset/?id=7188341508"
  617.             image.ImageColor3 = Color3.new(0,0,0)
  618.             wait(0.03)
  619.             image.ImageColor3 = Color3.new(1,1,1)
  620.             wait(0.03)
  621.             image.ImageColor3 = Color3.new(0,0,0)
  622.             wait(0.03)
  623.             image.ImageColor3 = Color3.new(1,1,1)
  624.  
  625.  
  626.             image.Image = "http://www.roblox.com/asset/?id=78918078"
  627.             vox:Stop()
  628.             vox.SoundId = aud_prejump[math.random(1,#aud_prejump)]
  629.             vox.Volume = 5
  630.             vox:Play()
  631.  
  632.  
  633.             wait(vox.TimeLength)
  634.  
  635.  
  636.             local screech = Instance.new("Sound",unfortunate.PlayerGui)
  637.  
  638.             screech.Volume = 2
  639.             screech.Looped = true
  640.             screech.SoundId = "rbxassetid://9078619391"
  641.  
  642.             if math.random(0,1000) <= secret_chance then
  643.                 secret = true
  644.                 image.Image = "http://www.roblox.com/asset/?id=10840742363"
  645.             else
  646.                 image.Image = tex_jumpscares[ math.random(1,#tex_jumpscares) ]
  647.                 screech.SoundId = "rbxassetid://6555091799" --rbxassetid://8280196339
  648.                 screech.PlaybackSpeed = 4
  649.             end
  650.  
  651.             screech:Play()
  652.  
  653.             for i = 1,(screech.TimeLength*8) do
  654.                 wait(0.125)
  655.                 image.ImageColor3 = Color3.new(1,0,0)
  656.                 wait(0.125)
  657.                 image.ImageColor3 = Color3.new(1,1,1)
  658.             end
  659.  
  660.             click:Play()
  661.             image.Image = "http://www.roblox.com/asset/?id=7188341508"
  662.             image.ImageColor3 = Color3.new(0,0,0)
  663.             wait(0.03)
  664.             image.ImageColor3 = Color3.new(1,1,1)
  665.             wait(0.03)
  666.             image.ImageColor3 = Color3.new(0,0,0)
  667.             wait(0.03)
  668.             image.ImageColor3 = Color3.new(1,1,1)
  669.  
  670.             screech:Destroy()
  671.             jumpscare.Enabled = false
  672.         end
  673.         if secret == false then
  674.             hum:TakeDamage(math.random(0,2400))
  675.             hum.MaxHealth = hum.MaxHealth*0.66
  676.         else
  677.             msg = "Suddenly, you have been saved by Whisper the Wolf!"
  678.             hum.Health = hum.Health + 500
  679.         end
  680.         hum.PlatformStand = false
  681.         playSFX("rbxassetid://4520789398",6,1)
  682.         jumped = false
  683.     end
  684. end
  685.  
  686. local con_cool = false
  687.  
  688. t_Confusion = Instance.new("Tool",playerbin.Backpack)
  689. t_Confusion.Name = "PK Trap (650 PSI)"
  690. t_Confusion.RequiresHandle = false
  691. t_Confusion.Activated:Connect(function()
  692.     if doing_magic == false and psi >= 650 and con_cool == false then
  693.         doing_magic = true
  694.         con_cool = true
  695.         psi = psi - 650
  696.         msg = "Giygas tries PK Trap!"
  697.         playSFX("rbxassetid://13048879322",10,1)
  698.         wait(1)
  699.         msg = ". . ."
  700.         game.Lighting.FogColor = Color3.fromRGB(0,0,0)
  701.         for i = 1,30 do
  702.             game.Lighting.FogEnd = (100000/2000)*(29-i) --100000 default
  703.             RunService.Heartbeat:Wait()
  704.         end
  705.         local jumptrap = Instance.new("Part")
  706.         jumptrap.Anchored = true
  707.         jumptrap.CanCollide = false
  708.         jumptrap.CastShadow = false
  709.         jumptrap.Transparency = 0.9
  710.         jumptrap.Size = Vector3.new(8,8,8)
  711.         Instance.new("Sparkles",jumptrap).Color = Color3.new(0,0,0)
  712.         playSFX("http://www.roblox.com/asset/?id=11956590",3,0.95)
  713.         jumptrap.Material = Enum.Material.ForceField
  714.         jumptrap.Shape = 0
  715.         jumptrap.BrickColor = BrickColor.Black()
  716.         jumptrap.Position = character.Head.Position
  717.         jumptrap.Parent = workspace
  718.         jumptrap.Touched:Connect(KinderSurprise)
  719.         for i = 1,30 do
  720.             game.Lighting.FogEnd = (100000/2000)*(i*5)  --100000 default
  721.             RunService.Heartbeat:Wait()
  722.         end
  723.         doing_magic = false
  724.         for i = 1,180*phase do
  725.             RunService.Heartbeat:Wait()
  726.             jumptrap.Transparency = math.cos(i/20)
  727.             jumptrap.Position = character.Head.Position + Vector3.new(10*math.sin(i/40),0,10*math.cos(i/40))
  728.         end
  729.         for i = 1,15 do
  730.             RunService.Heartbeat:Wait()
  731.             jumptrap.Transparency = jumptrap.Transparency/i
  732.             jumptrap.Size = jumptrap.Size - Vector3.new(0.4,0.4,0.4)
  733.         end
  734.         con_cool = false
  735.         jumptrap:Destroy()
  736.     end
  737. end)
  738.  
  739. local savedpos = Vector3.new(0,0,0)
  740.  
  741. function strike(pos)
  742.     local thunder = Instance.new("Part",workspace)
  743.     thunder.Material = Enum.Material.Neon
  744.     thunder.Size = Vector3.new(4,2000,4)
  745.     Instance.new("CylinderMesh",thunder).Scale = Vector3.new(1,2,1)
  746.     thunder.CanCollide = false
  747.     thunder.CastShadow = false
  748.     thunder.Anchored = true
  749.     thunder.Position = pos
  750.  
  751.     local e = Instance.new("Explosion")
  752.     e.BlastRadius = math.random(1,4)
  753.     e.BlastPressure = 0
  754.     e.Position = pos
  755.     e.Visible = true
  756.     e.Hit:Connect(function(hit)
  757.         local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  758.         if hum ~= nil and hit.Parent.Name ~= player then
  759.             hum:TakeDamage(math.random(5,50))
  760.             if crit(1) == true and hit.Parent.Name ~= player then
  761.                 playSFX("rbxassetid://8789851536",5,1)
  762.                 hum:TakeDamage(math.huge)
  763.             end
  764.         end
  765.     end)
  766.     e.Parent = workspace
  767.  
  768.     local sound = Instance.new("Sound",thunder)
  769.     sound.Volume = 10
  770.     sound.SoundId = "rbxassetid://13048892034"
  771.     sound.PlayOnRemove = true
  772.     sound:Destroy()
  773.  
  774.     for i = 1,2 do
  775.         RunService.Heartbeat:Wait()
  776.         if math.random(0,1) == 0 then
  777.             thunder.BrickColor = BrickColor.White()
  778.         else
  779.             thunder.BrickColor = BrickColor.Yellow()           
  780.         end
  781.         thunder.Transparency = i/5
  782.     end
  783.     thunder:Destroy()
  784.  
  785. end
  786.  
  787. t_Thunder = Instance.new("Tool",playerbin.Backpack)
  788. t_Thunder.RequiresHandle = false
  789. t_Thunder.Name = "PK Thunder (450 PSI)"
  790. t_Thunder.Activated:Connect(function()
  791.     if doing_magic == false and psi >= 450  then
  792.         doing_magic = true
  793.         msg = "Giygas tries PK Thunder!"
  794.         playSFX("rbxassetid://13048879322",10,1)
  795.         psi = psi - 450
  796.  
  797.         for i = 1,6 do
  798.  
  799.             local catch = workspace:GetChildren()
  800.             local caught = {}
  801.             for x = 1,#catch do
  802.                 if catch[x]:IsA("Model") and catch[x].Name ~= player then
  803.                     local hum = catch[x]:FindFirstChildOfClass("Humanoid")
  804.                     if hum  ~= nil and hum.Health >= 1 and catch[x] ~= nil then
  805.                         if catch[x]:FindFirstChild("Head") ~= nil and math.abs((catch[x].Head.Position - character.Head.Position).Magnitude) <= 128 then --test
  806.                             --savedpos = catch[x].Head.Position
  807.                             table.insert(caught, catch[x].Head.Position)
  808.                         end
  809.                     end
  810.                 end
  811.             end
  812.             wait(0.3)
  813.             for z = 1,#caught do
  814.                 local rand = math.random(-4,4)
  815.                 local rand2 = math.random(-4,4)
  816.                 strike(caught[z] + Vector3.new(rand,0,rand2))
  817.             end
  818.         end
  819.         msg = ". . ."
  820.         doing_magic = false
  821.     end
  822. end)
  823.  
  824. t_Rockin = Instance.new("Tool",playerbin.Backpack)
  825. t_Rockin.RequiresHandle = false
  826. t_Rockin.Name = "PSI Rockin ω (2000 PSI)"
  827. t_Rockin.Activated:Connect(function()
  828.     if doing_magic == false and psi >= 2000  then
  829.         doing_magic = true
  830.         msg = "Giygas tries PSI Rockin ω!"
  831.         playSFX("rbxassetid://13048879322",10,1)
  832.         psi = psi - 2000
  833.         wait(1)
  834.         msg = ". . ."
  835.         local s = Instance.new("Sound",character.PrimaryPart)
  836.         s.SoundId = "rbxassetid://13048868272"
  837.         s.Volume = 10
  838.         s.PlayOnRemove = true
  839.         s:Destroy()
  840.         local bodyposition = Instance.new("BodyPosition",character.PrimaryPart)
  841.         bodyposition.Position = character.PrimaryPart.Position + Vector3.new(0,60,0)
  842.         --wait(5.5*(40/100))
  843.         for i = 1,3 do
  844.             local colors = {BrickColor.Blue(),BrickColor.Yellow(),BrickColor.Red()}
  845.  
  846.             local fx = Instance.new("Part")
  847.             fx.Shape = 0
  848.             fx.Anchored = true
  849.             fx.CanCollide = false
  850.             fx.CastShadow = false
  851.             fx.Material = Enum.Material.Neon
  852.             fx.Position = character.PrimaryPart.Position
  853.             fx.Parent = workspace
  854.             fx.BrickColor = colors[math.random(1,3)]
  855.             for x = 1,33 do
  856.                 RunService.Heartbeat:Wait()
  857.                 fx.Transparency = x/20
  858.                 fx.Size = fx.Size + Vector3.new(3,3,3)
  859.             end
  860.             fx:Destroy()
  861.         end
  862.         local ball = Instance.new("Part")
  863.         ball.CanCollide = false
  864.         ball.Shape = 0
  865.         ball.Material = Enum.Material.Neon
  866.         ball.Anchored = true
  867.         ball.CastShadow = false
  868.         ball.Position = character.PrimaryPart.Position
  869.         ball.Parent = workspace
  870.         for i = 1,170 do
  871.             RunService.Heartbeat:Wait()
  872.             ball.Size = ball.Size + Vector3.new(5,5,5)
  873.             if math.random(0,2) == 1 then
  874.                 ball.BrickColor = BrickColor.Red()
  875.             elseif math.random(0,2) == 2 then
  876.                 ball.BrickColor = BrickColor.Blue()
  877.             else
  878.                 ball.BrickColor = BrickColor.Yellow()
  879.             end
  880.             ball.Transparency = i/200
  881.             DamageHumanoids(i*5,math.random(5,25),3,ball)
  882.         end
  883.         ball:Destroy()
  884.         bodyposition:Destroy()
  885.         wait(4/phase)
  886.         doing_magic = false
  887.     end
  888. end)
  889.  
  890. t_Teleport = Instance.new("Tool",playerbin.Backpack)
  891. t_Teleport.RequiresHandle = false
  892. t_Teleport.Name = "PK Teleport β (100 PSI)"
  893. t_Teleport.Activated:Connect(function()
  894.     if doing_magic == false and psi >= 150 then
  895.         doing_magic = true
  896.         msg = "Giygas tries PK Teleport β!"
  897.         playSFX("rbxassetid://13048879322",10,1)
  898.         psi = psi - 100
  899.         wait(1)
  900.         msg = ". . ."
  901.         playSFX("rbxassetid://5909720414",4,0.9)
  902.         character.PrimaryPart.CFrame = character.PrimaryPart.CFrame + character.PrimaryPart.CFrame.LookVector*math.random(0,128) --.new(math.random(0,196),30,math.random(0,196))
  903.         wait(1/phase)
  904.         doing_magic = false
  905.     end
  906. end)
  907.  
  908. local s_cooldown = false
  909.  
  910. t_Shield = Instance.new("Tool",playerbin.Backpack)
  911. t_Shield.RequiresHandle = false
  912. t_Shield.Name = "PK Shield (150 PSI)"
  913. t_Shield.Activated:Connect(function()
  914.     if doing_magic == false and psi >= 150 and s_cooldown == false then
  915.         doing_magic = true
  916.         msg = "Giygas tries PK Shield!"
  917.         playSFX("rbxassetid://13048879322",10,1)
  918.         psi = psi - 150
  919.         wait(1)
  920.         doing_magic = false
  921.         s_cooldown = true
  922.         msg = ". . ."
  923.         local f = Instance.new("ForceField",character)
  924.         f.Visible = false
  925.         local fx = Instance.new("Part",character.PrimaryPart)
  926.         fx.Position = character.PrimaryPart.Position
  927.         fx.CanTouch = false
  928.         fx.BrickColor = BrickColor.Red()
  929.         fx.Size = Vector3.new(0.5,0.5,0.5)     
  930.         fx.CanCollide = false
  931.         fx.Massless = true
  932.         local weld = Instance.new("WeldConstraint",fx)
  933.         weld.Part1 = character.PrimaryPart
  934.         weld.Part0 = fx
  935.         fx.Shape = 0
  936.         playSFX("rbxassetid://1158234981",10,1)
  937.         fx.Material = Enum.Material.ForceField
  938.         for i = 1,15 do
  939.             RunService.Heartbeat:Wait()
  940.             fx.Size = fx.Size + Vector3.new(1.5,1.5,1.5)
  941.         end
  942.         wait(2.5*phase)
  943.         for i = 1,15 do
  944.             RunService.Heartbeat:Wait()
  945.             fx.Size = fx.Size - Vector3.new(1.5,1.5,1.5)
  946.         end
  947.         s_cooldown = false
  948.         msg = "Giygas' shield wore off!"
  949.         fx:Destroy()
  950.         f:Destroy()
  951.     end
  952. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement