Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.77 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local PureBlaster = ReplicatedStorage.Skills.Pure.PureBlaster.Remotes.PureBlaster
  3. local Meshes = script.Meshes
  4. local TweenService = game:GetService("TweenService")
  5. local Debris = game:GetService("Debris")
  6. local Players = game:GetService("Players")
  7. local RunService = game:GetService("RunService")
  8. local trainingm = require(game.ServerStorage.TrainingFiles.TrainingModule)
  9.  
  10.  
  11. local function pureBlasterF(player)
  12. if player.Character.HumanoidRootPart.Anchored == false then
  13.  if not workspace:FindFirstChild(player.Name.." Blaster")then
  14.    
  15.    
  16.     local MindDamage = player.Stats.Mind.Value.Value
  17.     local MindSecondD = player.Stats.Mind.Value.Value * 0.10
  18.    
  19.     local damageSecond = false
  20.    
  21.     local n = math.floor(100 * 10)
  22.    
  23.     local BlasterP = Meshes:WaitForChild("BlasterP"):Clone()
  24.    
  25.     BlasterP.Touched:Connect(function(hit)
  26.         if damageSecond == false then
  27.             if hit.parent:FindFirstChild("Humanoid") then
  28.                 local Players = game.Players[hit.Parent.Name]
  29.                 if Players == player then
  30.                     print("tHE SAME")
  31.                 else
  32.                     local humanoidp = Players.Character:WaitForChild("Humanoid")
  33.                     if not humanoidp:FindFirstChild("pureHitF")then
  34.                       local pureHitF = Instance.new("BoolValue",humanoidp)
  35.                       pureHitF.Name = "pureHitF"
  36.                       humanoidp:TakeDamage(MindDamage)
  37.                     end
  38.                 end
  39.             end
  40.         else
  41.             for _,p in pairs(Players:GetChildren()) do
  42.                if p:FindFirstChild("pureHitF") then
  43.                    p.pureHitF:Destroy()
  44.                end
  45.            end
  46.         end
  47.     end)
  48.    
  49.     local damage = player.Stats.Mind.Value
  50.     local usingSkill = Instance.new("BoolValue")
  51.     usingSkill.Name = "usingSkill"
  52.     usingSkill.Value = true
  53.     usingSkill.Parent = player
  54.     print("BLASTER ")
  55.     local Character = player.Character
  56.     local Humanoid = Character:WaitForChild("Humanoid")
  57.     local HumanoidRP = Character:WaitForChild("HumanoidRootPart")
  58.     wait(0.2)
  59.    
  60.     HumanoidRP.Anchored = true
  61.    
  62.    
  63.  
  64.     local Track =  Humanoid:LoadAnimation(script.Animation)
  65.     Track:Play()
  66.  
  67.     coroutine.wrap(function()
  68.         wait(2)
  69.         HumanoidRP.Anchored = false
  70.     end)()
  71.  
  72.    
  73.     --Hold
  74.     local Folder = Instance.new("Folder",workspace)
  75.     Folder.Name = player.Name.." Blaster"
  76.     Folder.Parent = workspace
  77.    
  78.     Debris:AddItem(Folder,4.5)
  79.    
  80.    
  81.     local PureB = Meshes:WaitForChild("PureB"):Clone()
  82.     PureB.CFrame = Character:WaitForChild("LeftHand").CFrame
  83.     PureB.Size = Vector3.new(2,2,2)
  84.     PureB.Parent = Folder
  85.    
  86.     local PureB2 = Meshes:WaitForChild("PureB"):Clone()
  87.     PureB2.CFrame = Character:WaitForChild("RightHand").CFrame
  88.     PureB2.Size = Vector3.new(2,2,2)
  89.     PureB2.Parent = Folder
  90.    
  91.     local weld = Instance.new("WeldConstraint")
  92.     weld.Parent = Folder
  93.     weld.Part0 = PureB
  94.     weld.Part1 = Character:WaitForChild("LeftHand")
  95.    
  96.     local weld2 = Instance.new("WeldConstraint")
  97.     weld2.Parent = Folder
  98.     weld2.Part0 = PureB2
  99.     weld2.Part1 = Character:WaitForChild("RightHand")
  100.    
  101.     Debris:AddItem(PureB,1.25)
  102.     Debris:AddItem(PureB2,1.25)
  103.    
  104.    
  105.     wait(0.75)
  106.    
  107.    
  108.     local goal = {}
  109.     goal.Size = PureB.Size + Vector3.new(9,0,0)
  110.     local info = TweenInfo.new(0.2)
  111.     local tween = TweenService:Create(PureB,info,goal)
  112.     tween:Play()
  113.    
  114.     local goal = {}
  115.     goal.Size = PureB2.Size + Vector3.new(9,0,0)
  116.     local info = TweenInfo.new(0.2)
  117.     local tween = TweenService:Create(PureB2,info,goal)
  118.     tween:Play()
  119.  
  120.     if player:FindFirstChild("shield") then
  121.       if player.shield.Value < 3 then
  122.          player.shield.Value = player.Shield.Value + 1
  123.       end  
  124.     else
  125.        local shield = Instance.new("IntValue")
  126.        shield.Name = "shield"
  127.        shield.Value = 1
  128.        shield.Parent = player
  129.     end
  130.  
  131.     coroutine.wrap(function()
  132.           print("Entrei no shield")
  133.           while workspace:FindFirstChild(player.Name.." Blaster"):FindFirstChild("PureB") do
  134.             print("Entrei no shield 2")
  135.             wait(0.5)
  136.           end
  137.           print("Entrei no shield 3")
  138.           player.shield.Value = player.shield.Value - 1
  139.           if player:FindFirstChild("shield").Value == 0 then
  140.              player.shield:Destroy()
  141.           end
  142.        end)()
  143.  
  144.    
  145.      
  146.      
  147.       BlasterP.Parent = Folder
  148.       BlasterP.CFrame = Character:WaitForChild("Head").CFrame * CFrame.new(0,3,-2)
  149.       BlasterP.ParticleEmitter.Rate = n
  150.       BlasterP.Orientation = BlasterP.Orientation + Vector3.new(0,-90,0)
  151.       BlasterP.Size = Vector3.new(1,15,15)
  152.       BlasterP.Anchored = true
  153.  
  154.      
  155.      coroutine.wrap(function()
  156.        
  157.         while BlasterP.Parent do
  158.           if damageSecond == true then
  159.           for _, part in ipairs(BlasterP:GetTouchingParts()) do
  160.               local characterP = part.Parent
  161.               local humanoidP = characterP:FindFirstChild("Humanoid")
  162.               if humanoidP ~= Humanoid then
  163.               if humanoidP and not humanoidP:FindFirstChild("pureHit") then
  164.                  local pureHit = Instance.new("BoolValue",humanoidP)
  165.                  pureHit.Name = "pureHit"
  166.                  
  167.                  Debris:AddItem(pureHit,0.4)
  168.               end  
  169.               end  
  170.           end
  171.           end
  172.           wait(0.5)
  173.         end
  174.      end)()
  175.        
  176.     local goal = {}
  177.     goal.Size = BlasterP.Size + Vector3.new(100,0,0)
  178.     goal.CFrame = BlasterP.CFrame * CFrame.new(-50,0,0)
  179.     local info = TweenInfo.new(0.1)  
  180.     local tween = TweenService:Create(BlasterP,info,goal)
  181.     tween:Play()
  182.    
  183.     damageSecond = true
  184.    
  185.    
  186.    
  187.     tween.Completed:Wait()
  188.     print("TIME TO TRANSPARENCU")
  189.        
  190.    
  191.     local transp = 0.1
  192.          BlasterP.ParticleEmitter.EmissionDirection = Enum.NormalId.Front
  193.          BlasterP.ParticleEmitter.Speed = NumberRange.new(3, 3)
  194.       for count = 1,20,1 do
  195.          BlasterP.ParticleEmitter.LightEmission = BlasterP.ParticleEmitter.LightEmission - 0.2
  196.          BlasterP.ParticleEmitter.Transparency = NumberSequence.new(transp,transp)
  197.          wait(0.1)
  198.          transp = transp + 0.05
  199.       end
  200.  
  201.  
  202.     Debris:AddItem(usingSkill,1.0)
  203.  
  204.  end   
  205. end
  206. end
  207.  
  208.  
  209. PureBlaster.OnServerEvent:Connect(pureBlasterF)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement