Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Base = Instance.new("Part")
- Base.Color = Color3.new(1,1,1)
- Base.Anchored = true
- Base.Transparency = 1
- function dot(c1,c2)
- local m = CFrame.Angles(math.pi/2,0,0)
- return (c1*m).lookVector:Dot((c2*m).lookVector)
- end
- function Branch(base,c,par,mode)
- if c <= 0 then
- local vol = base.Size.x+base.Size.y+base.Size.z
- else
- local pos = base.CFrame*CFrame.new(0,base.Size/2,0)
- local height = base.Size.y
- local width = base.Size.x
- local nb = 1
- local r = math.random(3,25)
- local da = math.random(20+55/c,40+40/c)
- local ba = math.random(-da/3,da/3)
- for i=0,nb-1 do
- local branch = base:Clone()
- branch.Name = "Branch"
- branch.Parent = par
- branch.CanCollide = false
- local size = 0
- if mode == 1 then
- size = 1
- else
- size = 2
- end
- local trans = .2
- for i = 0,3,1 do
- local semi_bolt = branch:Clone()
- semi_bolt.Parent = par
- semi_bolt.Size = Vector3.new(size,height,size)
- semi_bolt.Transparency = trans
- semi_bolt.CanCollide = false
- if mode == 1 then
- size = size + 1
- else
- size = size + 2
- end
- trans = trans + .2
- game:GetService("Debris"):AddItem(semi_bolt,1.3)
- end
- branch.Size = Vector3.new(width,height,width)
- branch.Transparency = .8
- game:GetService("Debris"):AddItem(branch,1.3)
- local h = height*math.random(95,115)/100
- local new = branch.CFrame * CFrame.new(0,height/2,0) * CFrame.Angles(0,0,math.rad(ba))
- new = new * CFrame.Angles(0,i*(math.pi*2/nb)+r,math.rad(da/2)) * CFrame.new(0,h/2,0)
- local w = dot(new,branch.CFrame)*width*0.9
- branch.Size = Vector3.new(width,h,width)
- branch.CFrame = new
- branch.Parent = base.Parent
- Branch(branch,c-1,par,mode)
- end
- end
- end
- local rain_s = Instance.new("Sound")
- function rain(amount)
- local Part0 = Instance.new("Part")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- local Part3 = Instance.new("Part")
- local ParticleEmitter4 = Instance.new("ParticleEmitter")
- Part0.Name = "Rain_Fall"
- Part0.Parent = script
- Part0.CFrame = CFrame.new(0, 45.5, 0, 1, 4.99569069e-07, 7.38666245e-07, 4.99569012e-07, -0.999999702, -5.96046448e-08, 7.38666131e-07, 5.96046448e-08, -0.999999702)
- Part0.Orientation = Vector3.new(0, 180, 180)
- Part0.Position = Vector3.new(0, 45.5, 0)
- Part0.Rotation = Vector3.new(180, 0, 0)
- Part0.Transparency = 123123120
- Part0.Size = Vector3.new(512, 1, 512)
- Part0.Anchored = true
- Part0.CanCollide = false
- Part0.FormFactor = Enum.FormFactor.Symmetric
- Part0.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter1.Parent = Part0
- ParticleEmitter1.Speed = NumberRange.new(100, 100)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.356863, 0.407843, 0.486275),Color3.new(0.47451, 0.552941, 0.694118))
- ParticleEmitter1.LightEmission = 0.80000001192093
- ParticleEmitter1.LightInfluence = 0.85000002384186
- ParticleEmitter1.Texture = "rbxassetid://1890057258"
- ParticleEmitter1.Transparency = NumberSequence.new(0,0.27607363462448,0)
- ParticleEmitter1.Size = NumberSequence.new(2,2)
- ParticleEmitter1.Lifetime = NumberRange.new(0.40000000596046, 0.40000000596046)
- ParticleEmitter1.Rate = 2000
- if not rain_s then
- rain_s = Instance.new("Sound")
- end
- rain_s.Parent = script
- rain_s.Looped = true
- rain_s.SoundId = "rbxassetid://111816866"
- rain_s.Volume = 5
- rain_s:Play()
- Part3.Name = "Rain_Splash"
- Part3.Parent = script
- Part3.CFrame = CFrame.new(0, 0.0500000007, 0, -0.999999702, -3.72529001e-07, 5.5381912e-07, -3.57627869e-07, 0.999999404, -5.79595905e-07, -5.53818722e-07, -5.79595905e-07, -0.999999702)
- Part3.Orientation = Vector3.new(0, 180, 0)
- Part3.Position = Vector3.new(0, 0.0500000007, 0)
- Part3.Rotation = Vector3.new(180, 0, 180)
- Part3.Transparency = 123123120
- Part3.Size = Vector3.new(512, 0.100000001, 512)
- Part3.Anchored = true
- Part3.CanCollide = false
- Part3.FormFactor = Enum.FormFactor.Symmetric
- Part3.formFactor = Enum.FormFactor.Symmetric
- ParticleEmitter4.Parent = Part3
- ParticleEmitter4.Speed = NumberRange.new(1, 1)
- ParticleEmitter4.Rotation = NumberRange.new(-360, -360)
- ParticleEmitter4.Color = ColorSequence.new(Color3.new(0.803922, 0.909804, 1),Color3.new(0.486275, 0.545098, 0.615686))
- ParticleEmitter4.LightEmission = 1
- ParticleEmitter4.LightInfluence = 1
- ParticleEmitter4.Texture = "rbxassetid://1890069725"
- ParticleEmitter4.Transparency = NumberSequence.new(0,0.44171780347824,0.32515341043472,0.35582822561264,0.33742332458496,0.41104292869568,0.4355828166008,0.86503064632416,0.74846625328064,1)
- ParticleEmitter4.Size = NumberSequence.new(0,1.4210522174835,0)
- ParticleEmitter4.Lifetime = NumberRange.new(0.20000000298023, 0.20000000298023)
- ParticleEmitter4.Rate = 2000
- ParticleEmitter4.RotSpeed = NumberRange.new(-170, -170)
- task.wait(amount)
- Part3:Destroy()
- Part0:Destroy()
- coroutine.wrap(function()
- for i = 0,5,0.1 do
- task.wait()
- rain_s.Volume = rain_s.Volume - .1
- end
- end)()
- end
- local lightning = Instance.new("Sound")
- lightning.Parent = script
- function hurt(mode,obj)
- if obj and obj.Parent then else return end
- for _,v in pairs(obj.Parent:GetDescendants()) do
- local hum
- if v:IsA("Humanoid") then
- hum = v
- end
- if hum then
- if mode == 1 then
- coroutine.wrap(function()
- local fire = Instance.new("Fire")
- fire.Parent = obj
- local fire_s = obj:FindFirstChild("fire_s_hurt") or Instance.new("Sound")
- fire_s.Name = 'fire_s_hurt'
- fire_s.SoundId = 'rbxassetid://8766809464'
- fire_s.Volume = 0.5
- fire_s.Parent = obj
- game:GetService("Debris"):AddItem(fire,15)
- local t = 0
- while fire and fire.Parent do
- t += 1
- if t > 3 then
- if math.random(1,4) == 1 then
- fire:Destroy()
- break
- end
- end
- if fire_s then
- fire_s:Play()
- end
- hum:TakeDamage(5)
- task.wait(1)
- end
- end)()
- hum:TakeDamage(hum.MaxHealth / 4)
- else
- hum.Health = 0
- --hum.Parent:BreakJoints()
- end
- end
- end
- end
- function CreateSmite(tchar,location,complexity,width,height,mode)
- local troot = tchar:FindFirstChild("HumanoidRootPart") or tchar:FindFirstChild("Torso")
- local old_br = game:GetService("Lighting").Brightness
- local old_am = game:GetService("Lighting").OutdoorAmbient
- local old_time = game:GetService("Lighting").ClockTime
- old_time = (old_time-old_time % 0.1)
- coroutine.wrap(function()
- rain(2)
- end)()
- local chosen_ct = 0.1
- game:GetService("Lighting").ClockTime = chosen_ct
- if not lightning then
- lightning = Instance.new("Sound")
- lightning.Parent = script
- end
- if math.random(1,2) == 1 then
- lightning.SoundId = "rbxassetid://178090362"
- else
- lightning.SoundId = "rbxassetid://446876721"
- end
- lightning.Volume = 5
- lightning:Play()
- local size = 1
- local trans = .2
- local tree = Instance.new("Model")
- tree.Parent = script
- local bolt = Base:Clone()
- bolt.Parent = tree
- bolt.Transparency = 1
- bolt.Size = Vector3.new(width,1000,width)
- bolt.Transparency = .8
- bolt.CanCollide = false
- bolt.CFrame = CFrame.new(location) * CFrame.new(0,4,0) * CFrame.Angles(math.rad(math.random(-20,20)),0,math.rad(math.random(-20,20)))
- game:GetService("Debris"):AddItem(bolt,1.3)
- local size = 0
- if mode == 1 then
- size = 1
- else
- size = 2
- end
- local trans = .2
- for i = 0,3,1 do
- local semi_bolt = bolt:Clone()
- semi_bolt.Parent = tree
- semi_bolt.Size = Vector3.new(size,1000,size)
- semi_bolt.Transparency = trans
- semi_bolt.CanCollide = false
- game:GetService("Debris"):AddItem(semi_bolt,1.3)
- if mode == 1 then
- size = size + 1
- else
- size = size + 2
- end
- trans = trans + .2
- end
- --[[
- coroutine.wrap(function()
- Branch(bolt,complexity,tree,mode)
- end)()
- ]]
- coroutine.wrap(function()
- hurt(mode,troot)
- end)()
- local strike = Instance.new("Part")
- local SpotLight1 = Instance.new("SpotLight")
- strike.Name = "strike"
- strike.Anchored = true
- strike.CanCollide = false
- strike.Parent = tree
- strike.Position = location + Vector3.new(0,5,0)
- strike.Transparency = 1
- strike.Size = Vector3.new(10, 10, 10)
- strike.BottomSurface = Enum.SurfaceType.Smooth
- strike.TopSurface = Enum.SurfaceType.Smooth
- SpotLight1.Parent = strike
- SpotLight1.Face = Enum.NormalId.Top
- SpotLight1.Range = 60
- SpotLight1.Brightness = 10
- SpotLight1.Shadows = true
- game:GetService("Debris"):AddItem(strike,1)
- local con
- con = strike.Touched:Connect(function(obj)
- --hurt(mode,obj)
- end)
- for i = 1,2 do
- local nct = (game:GetService("Lighting").ClockTime-game:GetService("Lighting").ClockTime % 0.1)
- if nct == chosen_ct and old_time ~= chosen_ct then else
- return
- end
- game:GetService("Lighting").Brightness = 10
- game:GetService("Lighting").OutdoorAmbient = Color3.new(1,1,1)
- task.wait(0.1)
- game:GetService("Lighting").Brightness = old_br
- game:GetService("Lighting").OutdoorAmbient = old_am
- task.wait(0.1)
- end
- task.wait(0.2)
- local nct = (game:GetService("Lighting").ClockTime-game:GetService("Lighting").ClockTime % 0.1)
- if nct == chosen_ct and old_time ~= chosen_ct then
- game:GetService("Lighting").ClockTime = old_time
- elseif old_time == chosen_ct then
- game:GetService("Lighting").ClockTime = 14
- end
- task.wait(0.5)
- game:GetService("Debris"):AddItem(tree,0.1)
- end
- function GenerateBolt(...)
- local t = {...}
- coroutine.wrap(function()
- CreateSmite(unpack(t))
- end)()
- end
- function GetPlr(plr, str)
- local plrz = {} str = str:lower()
- if str == "all" then plrz = game:GetService("Players"):children()
- elseif str == "others" then for i, v in pairs(game:GetService("Players"):children()) do if v ~= plr then table.insert(plrz, v) end end
- else
- local sn = {1} local en = {}
- for i = 1, #str do if str:sub(i,i) == "," then table.insert(sn, i+1) table.insert(en,i-1) end end
- for x = 1, #sn do
- if (sn[x] and en[x] and str:sub(sn[x],en[x]) == "me") or (sn[x] and str:sub(sn[x]) == "me") then table.insert(plrz, plr)
- if game:findFirstChild("Teams") then for a, v in pairs(game:GetService("Teams"):children()) do if v:IsA("Team") and str:sub(sn[x],en[x]):sub(6) ~= "" and v.Name:lower():find(str:sub(sn[x],en[x]):sub(6)) == 1 then
- for q, p in pairs(game:GetService("Players"):children()) do if p.TeamColor == v.TeamColor then table.insert(plrz, p) end end break
- end end end
- elseif (sn[x] and str:sub(sn[x]):sub(1,4):lower() == "team") then
- if game:findFirstChild("Teams") then for a, v in pairs(game:GetService("Teams"):children()) do if v:IsA("Team") and str:sub(sn[x],en[x]):sub(6) ~= "" and v.Name:lower():find(str:sub(sn[x]):sub(6)) == 1 then
- for q, p in pairs(game:GetService("Players"):children()) do if p.TeamColor == v.TeamColor then table.insert(plrz, p) end end break
- end end end
- else
- for a, plyr in pairs(game:GetService("Players"):children()) do
- if (sn[x] and en[x] and str:sub(sn[x],en[x]) ~= "" and plyr.Name:lower():find(str:sub(sn[x],en[x])) == 1) or (sn[x] and str:sub(sn[x]) ~= "" and plyr.Name:lower():find(str:sub(sn[x])) == 1) or (str ~= "" and plyr.Name:lower():find(str) == 1) then
- table.insert(plrz, plyr) break
- end
- end
- end
- end
- end
- return plrz
- end
- local plr = owner
- plr.Chatted:Connect(function(msg)
- if msg:lower():sub(1,6) == 'smite/' then
- local choice = GetPlr(plr, msg:lower():sub(7))
- if choice ~= nil then
- for i, v in pairs(choice) do
- if v then
- if v.Character:FindFirstChild("Torso") then
- GenerateBolt(v.Character,v.Character['Torso'].Position - Vector3.new(0,5,0), 20, 4, 50, 1)
- elseif v.Character:FindFirstChild("UpperTorso") then
- GenerateBolt(v.Character,v.Character['UpperTorso'].Position - Vector3.new(0,5,0), 20, 4, 50, 1)
- elseif v.Character:FindFirstChild("HumanoidRootPart") then
- GenerateBolt(v.Character,v.Character['HumanoidRootPart'].Position - Vector3.new(0,5,0), 20, 4, 50, 1)
- end
- end
- end
- end
- end
- if msg:lower():sub(1,9) == '/e smite/' then
- local choice = GetPlr(plr, msg:lower():sub(10))
- if choice ~= nil then
- for i, v in pairs(choice) do
- if v then
- if v.Character:FindFirstChild("Torso") then
- GenerateBolt(v.Character,v.Character['Torso'].Position - Vector3.new(0,5,0), 20, 4, 50, 1)
- elseif v.Character:FindFirstChild("UpperTorso") then
- GenerateBolt(v.Character,v.Character['UpperTorso'].Position - Vector3.new(0,5,0), 20, 4, 50, 1)
- elseif v.Character:FindFirstChild("HumanoidRootPart") then
- GenerateBolt(v.Character,v.Character['HumanoidRootPart'].Position - Vector3.new(0,5,0), 20, 4, 50, 1)
- end
- end
- end
- end
- end
- if msg:lower():sub(1,7) == 'lsmite/' then
- local choice = GetPlr(plr, msg:lower():sub(8))
- if choice ~= nil then
- for i, v in pairs(choice) do
- if v then
- if v.Character:FindFirstChild("Torso") then
- GenerateBolt(v.Character,v.Character['Torso'].Position - Vector3.new(0,6,0), 20, 8, 50, 2)
- elseif v.Character:FindFirstChild("UpperTorso") then
- GenerateBolt(v.Character,v.Character['UpperTorso'].Position - Vector3.new(0,6,0), 20, 8, 50, 2)
- elseif v.Character:FindFirstChild("HumanoidRootPart") then
- GenerateBolt(v.Character,v.Character['HumanoidRootPart'].Position - Vector3.new(0,6,0), 20, 8, 50, 2)
- end
- end
- end
- end
- end
- if msg:lower():sub(1,10) == '/e lsmite/' then
- local choice = GetPlr(plr, msg:lower():sub(11))
- if choice ~= nil then
- for i, v in pairs(choice) do
- if v then
- if v.Character:FindFirstChild("Torso") then
- GenerateBolt(v.Character,v.Character['Torso'].Position - Vector3.new(0,6,0), 20, 8, 50, 2)
- elseif v.Character:FindFirstChild("UpperTorso") then
- GenerateBolt(v.Character,v.Character['UpperTorso'].Position - Vector3.new(0,6,0), 20, 8, 50, 2)
- elseif v.Character:FindFirstChild("HumanoidRootPart") then
- GenerateBolt(v.Character,v.Character['HumanoidRootPart'].Position - Vector3.new(0,6,0), 20, 8, 50, 2)
- end
- end
- end
- end
- end
- end)
- warn([[
- smite/plr
- /e smite/plr
- lsmite/plr
- /e lsmite/plr
- ]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement