Advertisement
Guest User

source

a guest
Jan 29th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.46 KB | None | 0 0
  1.  
  2. local damageindicators = require(game.ServerScriptService.Damagehandler)
  3. local serverdb = {}
  4.  
  5. damageindicators.Ready()
  6.  
  7. game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, mouse, typew)
  8.     if typew == 1 then
  9.         --blood orb
  10.         if not serverdb[player] then
  11.         serverdb[player] = true
  12.         coroutine.wrap(function()
  13.             wait(5)
  14.             serverdb[player] = false
  15.         end)()
  16.        
  17.         local borb = game.ServerStorage.Blood.BloodOrb:Clone()
  18.         local bcyc = game.ServerStorage.Blood.BloodCylinder:Clone()
  19.         local char = player.Character
  20.            
  21.         borb.Position = Vector3.new(char.LeftHand.Position.X + 2.5, char.LeftHand.Position.Y, char.LeftHand.Position.Z)
  22.         borb.Parent = workspace
  23.         borb:SetNetworkOwner(nil)
  24.        
  25.         local bv = Instance.new("BodyVelocity")
  26.         bv.Parent = borb
  27.         bv.Velocity = (mouse.p - borb.Position).Unit * 80
  28.         bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  29.        
  30.         local hitdb = {}
  31.         borb.Touched:Connect(function(obj)
  32.             if obj and obj.Parent and obj.Parent:FindFirstChild("Humanoid") and not hitdb[obj.Parent] and obj.Parent ~= player.Character then
  33.                 hitdb[obj.Parent] = true
  34.                 damageindicators.DealDamage(obj.Parent, math.random(30,50), Color3.fromRGB(189,0,0), Color3.fromRGB(89,0,0))
  35.                 coroutine.wrap(function()
  36.                     wait(1)
  37.                     hitdb[obj.Parent] = false
  38.                 end)()
  39.             end
  40.         end)
  41.         game:GetService("Debris"):AddItem(borb, 10)
  42.     end
  43.     end
  44.     if typew == 2 then
  45.         if not serverdb[player] then
  46.         serverdb[player] = true
  47.         coroutine.wrap(function()
  48.             wait(5)
  49.             serverdb[player] = false
  50.         end)()
  51.        
  52.         local borb = game.ServerStorage.Blood.BloodOrb:Clone()
  53.         local bcyc = game.ServerStorage.Blood.BloodCylinder:Clone()
  54.         local char = player.Character
  55.            
  56.         borb.Position = mouse.p
  57.         borb.Anchored = true
  58.         borb.CanCollide = false
  59.         borb.Parent = workspace
  60.        
  61.         coroutine.wrap(function()
  62.             local hitdb = {}
  63.             local b1 = borb:Clone()
  64.             local b2 = borb:Clone()
  65.             local b3 = borb:Clone()
  66.             local b4 = borb:Clone()
  67.             local hittables = {b1,b2,b3,b4, borb, bcyc}
  68.             local bdamage1 = math.random(5,10)
  69.             local bdamage2 = math.random(10,20)
  70.             local bdamage3 = math.random(20,30)
  71.             local bdamage4 = math.random(40,45)
  72.             local cycdamage = math.random(80,160)
  73.             for i,hit in pairs(hittables) do
  74.                 game:GetService("Debris"):AddItem(hit, 1 * i)
  75.                 hit.Touched:Connect(function(obj)
  76.                     if obj and obj.Parent and obj.Parent:FindFirstChild("Humanoid") and not hitdb[obj.Parent] and obj.Parent ~= player.Character then
  77.                         hitdb[obj.Parent] = true
  78.                         if not obj.Parent.PrimaryPart:FindFirstChild("BodyPosition") then
  79.                             local bv = Instance.new("BodyPosition")
  80.                             bv.Parent = obj.Parent.PrimaryPart
  81.                             bv.P = 1000
  82.                             bv.Position = hit.Position
  83.                             bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  84.                         end
  85.                         damageindicators.DealDamage(obj.Parent,  math.random(game.ServerStorage.Blood.DamageDataType2["min"..i].Value, game.ServerStorage.Blood.DamageDataType2["max"..i].Value), Color3.fromRGB(189,0,0), Color3.fromRGB(89,0,0))
  86.                         coroutine.wrap(function()
  87.                             wait(0.3)
  88.                             hitdb[obj.Parent] = false
  89.                         end)()
  90.                     end
  91.                 end)
  92.             end
  93.             game:GetService("TweenService"):Create(borb, TweenInfo.new(0.6, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Transparency = 1, Size = Vector3.new(12,12,12)}):Play()
  94.             wait(0.6)
  95.             b1.Parent = workspace
  96.             game:GetService("TweenService"):Create(b1, TweenInfo.new(0.6, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Transparency = 1, Size = Vector3.new(15,15,15)}):Play()
  97.             wait(0.6)
  98.             b2.Parent = workspace
  99.             game:GetService("TweenService"):Create(b2, TweenInfo.new(0.6, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Transparency = 1, Size = Vector3.new(18,18,18)}):Play()
  100.             wait(0.6)
  101.             b3.Parent = workspace
  102.             game:GetService("TweenService"):Create(b3, TweenInfo.new(0.6, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Transparency = 1, Size = Vector3.new(21,21,21)}):Play()
  103.             wait(0.6)
  104.             b4.Parent = workspace
  105.             game:GetService("TweenService"):Create(b4, TweenInfo.new(0.6, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Transparency = 1, Size = Vector3.new(24,24,24)}):Play()
  106.             wait(1)
  107.             bcyc.Position = mouse.p
  108.             bcyc.Anchored = true
  109.             bcyc.CanCollide = false
  110.             bcyc.Parent = workspace
  111.             game:GetService("TweenService"):Create(bcyc, TweenInfo.new(1, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Transparency = 1, Size = Vector3.new(500,200,200)}):Play()
  112.         end)()
  113.        
  114.    
  115.     end
  116.     end
  117. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement