Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plr = owner
- Character = plr.Character
- RootPart = Character.HumanoidRootPart
- Torso = Character.Torso
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- local Effects = IT("Folder", Character)
- Effects.Name = "Effects"
- local UNANCHOR = true
- local SHOCKSOUND = 1544280726
- local RINGSOUND = 340505360
- local ULTHIT = 412831137
- function Swait(num)
- if num == 0 or num == nil then
- game:service("RunService").Stepped:wait(0)
- else
- for i = 0, num do
- game:service("RunService").Stepped:wait(0)
- end
- end
- end
- local CreateMesh = function(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- local CreatePart = function(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- local weldBetween = function(a, b)
- local weldd = Instance.new("ManualWeld")
- weldd.Part0 = a
- weldd.Part1 = b
- weldd.C0 = CFrame.new()
- weldd.C1 = b.CFrame:inverse() * a.CFrame
- weldd.Parent = a
- return weldd
- end
- local smooth = function(obj)
- local sides = {"Left", "Right", "Top", "Bottom", "Front", "Back"}
- for i,v in pairs(sides) do
- obj[v.."Surface"] = "SmoothNoOutlines"
- end
- end
- local S = IT("Sound")
- local CreateSound = function(ID, PARENT, VOLUME, PITCH, DOESLOOP)
- local NEWSOUND = nil
- coroutine.resume(coroutine.create(function()
- NEWSOUND = S:Clone()
- NEWSOUND.Parent = PARENT
- NEWSOUND.Volume = VOLUME
- NEWSOUND.Pitch = PITCH
- NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
- NEWSOUND:play()
- if DOESLOOP == true then
- NEWSOUND.Looped = true
- else
- repeat wait(1) until NEWSOUND.Playing == false
- NEWSOUND:remove()
- end
- end))
- return NEWSOUND
- end
- local MakeForm = function(PART,TYPE)
- if TYPE == "Cyl" then
- local MSH = IT("CylinderMesh",PART)
- elseif TYPE == "Ball" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Sphere"
- elseif TYPE == "Wedge" then
- local MSH = IT("SpecialMesh",PART)
- MSH.MeshType = "Wedge"
- end
- end
- local Debris = game:GetService("Debris")
- local Raycast = function(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- local CastProperRay = function(StartPos, EndPos, Distance, Ignore)
- local DIRECTION = CF(StartPos,EndPos).lookVector
- return Raycast(StartPos, DIRECTION, Distance, Ignore)
- end
- local turnto = function(position)
- RootPart = owner.Character.HumanoidRootPart
- RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
- end
- --Lightning({Color = C3(1,1,1), Color2 = C3(0,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
- local Lightning = function(Table)
- local Color = Table.Color or C3(1,1,1)
- local Color2 = Table.Color2 or C3(0,1,1)
- local StartPos = Table.Start or Torso.Position
- local EndPos = Table.End or Mouse.Hit.p
- local SegmentLength = Table.SegmentL or 2
- local Thickness = Table.Thickness or 0.1
- local Dissapear = Table.DoesFade or false
- local Parent = Table.Ignore or Character
- local MaxDist = Table.MaxDist or 400
- local Branches = Table.Branches or false
- local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
- local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
- local LIGHTNINGMODEL = IT("Model",script)
- LIGHTNINGMODEL.Name = "Lightning"
- local LastBolt = nil
- for E = 1, DISTANCE do
- local ExtraSize = (DISTANCE-E)/25
- local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "LightningPart"..E, VT(Thickness,SegmentLength,Thickness))
- PART.Color = Color
- PART.Transparency = 1
- MakeForm(PART,"Cyl")
- if LastBolt == nil then
- PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
- else
- PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
- end
- LastBolt = PART
- if Branches == true then
- local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
- if CHOICE == 1 then
- local LASTBRANCH = nil
- for i = 1, MRANDOM(2,5) do
- local ExtraSize2 = ((DISTANCE-E)/35)/i
- local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "Branch"..E.."-"..i, VT(Thickness,SegmentLength,Thickness))
- PART.Color = Color
- MakeForm(PART,"Cyl")
- if LASTBRANCH == nil then
- PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
- else
- PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
- end
- LASTBRANCH = PART
- end
- end
- end
- end
- if Dissapear == true then
- coroutine.resume(coroutine.create(function()
- for i = 1, 30 do
- Swait()
- for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
- if c.ClassName == "Part" then
- c.Transparency = i/30
- c.Color = c.Color:Lerp(Color2,0.1)
- end
- end
- end
- LIGHTNINGMODEL:remove()
- end))
- elseif Dissapear == false then
- game.Debris:AddItem(LIGHTNINGMODEL,0.1)
- end
- return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
- end
- keypoints = {
- NumberSequenceKeypoint.new(0,1,0);
- NumberSequenceKeypoint.new(1,1,0)}
- keypoints2 = {
- NumberSequenceKeypoint.new(0,1,0);
- NumberSequenceKeypoint.new(0.1,0,0);
- NumberSequenceKeypoint.new(0.9,0,0);
- NumberSequenceKeypoint.new(1,1,0)}
- for _,v in pairs(Character:GetChildren()) do
- if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("BasePart") then
- pt2 = Instance.new("ParticleEmitter", v)
- pt2.Size = NumberSequence.new(keypoints)
- pt2.Transparency = NumberSequence.new(keypoints2)
- pt2.Lifetime = NumberRange.new(2,3)
- pt2.Rate = 500
- pt2.Name = "ptt"
- pt2.ZOffset = -1
- pt2.EmissionDirection = "Back"
- pt2.LockedToPart = false
- pt2.SpreadAngle = Vector2.new(0,0)
- pt2.Speed = NumberRange.new(0)
- pt2.Drag = 0
- pt2.Rotation = NumberRange.new(-180,180)
- pt2.RotSpeed = NumberRange.new(-20)
- pt2.Texture = "rbxassetid://1207853932"
- pt2.LightEmission = 1
- pt2.Color = ColorSequence.new(BrickColor.new("Royal purple").Color, BrickColor.new('Dark indigo').Color, Color3.fromRGB(0,255,100))
- pt2.Enabled = false
- end
- end
- e = Instance.new("Part")
- e.Size = Vector3.new(30,1,30)
- e.Massless = true
- e.Material = "Neon"
- e.Transparency = 1
- e.CanCollide = false
- e2 = Instance.new("SpecialMesh")
- e2.MeshType = "Sphere"
- e2.Parent = e
- wel = Instance.new("Weld")
- wel.Part0 = RootPart
- wel.Part1 = e
- wel.C0 = CFrame.new(0,-5,0)
- e.Parent = Effects
- wel.Parent = e
- keypoints = {
- NumberSequenceKeypoint.new(0,0.1,0);
- NumberSequenceKeypoint.new(1,0.1,0)}
- keypoints2 = {
- NumberSequenceKeypoint.new(0,1,0);
- NumberSequenceKeypoint.new(0.1,0,0);
- NumberSequenceKeypoint.new(0.9,0,0);
- NumberSequenceKeypoint.new(1,1,0)}
- pt2 = Instance.new("ParticleEmitter", e)
- pt2.Size = NumberSequence.new(keypoints)
- pt2.Transparency = NumberSequence.new(keypoints2)
- pt2.Lifetime = NumberRange.new(0.6,0.75)
- pt2.Rate = 500
- pt2.Name = "ptt"
- pt2.ZOffset = -1
- pt2.EmissionDirection = "Top"
- pt2.LockedToPart = false
- pt2.SpreadAngle = Vector2.new(30,30)
- pt2.Speed = NumberRange.new(10,50)
- pt2.Drag = 0
- pt2.Rotation = NumberRange.new(-180,180)
- pt2.RotSpeed = NumberRange.new(-20)
- pt2.Texture = "rbxassetid://1207853932"
- pt2.LightEmission = 1
- pt2.Color = ColorSequence.new(BrickColor.new("Royal purple").Color, BrickColor.new('Dark indigo').Color, Color3.fromRGB(0,255,100))
- pt2.Enabled = false
- local e = Instance.new("Part")
- e.Size = Vector3.new(0.1,0.2,0.1)
- e.Massless = true
- e.Material = "Neon"
- e.CanCollide = false
- e2 = Instance.new("SpecialMesh")
- e2.MeshType = "Sphere"
- e2.Parent = e
- wel = Instance.new("Weld")
- wel.Part0 = Character.Head
- wel.Part1 = e
- wel.C0 = CFrame.new(0.19,0.2,-0.52)
- e.Parent = Effects
- wel.Parent = e
- keypoints = {
- NumberSequenceKeypoint.new(0,0.5,0);
- NumberSequenceKeypoint.new(1,0,0)}
- keypoints2 = {
- NumberSequenceKeypoint.new(0,1,0);
- NumberSequenceKeypoint.new(0.1,0,0);
- NumberSequenceKeypoint.new(1,0,0)}
- local pt2 = Instance.new("ParticleEmitter", e)
- pt2.Size = NumberSequence.new(keypoints)
- pt2.Transparency = NumberSequence.new(keypoints2)
- pt2.Lifetime = NumberRange.new(2)
- pt2.Rate = 500
- pt2.Name = "pt"
- pt2.ZOffset = 0
- pt2.EmissionDirection = "Front"
- pt2.LockedToPart = false
- pt2.SpreadAngle = Vector2.new(0,0)
- pt2.Speed = NumberRange.new(1)
- pt2.Drag = 0.1
- pt2.Rotation = NumberRange.new(-180,180)
- pt2.RotSpeed = NumberRange.new(-20,20)
- pt2.Texture = "rbxassetid://1207853932"
- pt2.LightEmission = 1
- pt2.Color = ColorSequence.new(BrickColor.new("Royal purple").Color, BrickColor.new('Dark indigo').Color, Color3.fromRGB(0,255,100))
- pt2.Enabled = false
- local Humanoid = owner.Character.Humanoid Humanoid.HealthChanged:Connect(function (newHealth) math.clamp(Humanoid.Health, 0.01, math.huge)
- if Humanoid.Health > 1 then
- for _,v in pairs(owner.Character:GetDescendants()) do
- local vv = v spawn(function()
- pcall(function()
- if not vv:IsA("ParticleEmitter") then
- return end
- vv:Emit(20)
- Humanoid.Health = math.huge
- end)
- end)
- end
- end
- end)
- local font = "Fantasy"
- function chatfunc(text)
- done = false
- local chat = coroutine.wrap(function()
- if Character:FindFirstChild("hAhfUNY")~= nil then
- Character:FindFirstChild("hAhfUNY"):destroy()
- end
- local naeeym2 = Instance.new("BillboardGui",Character.Torso)
- naeeym2.Size = UDim2.new(0,100,0,40)
- naeeym2.StudsOffset = Vector3.new(0,5,0)
- naeeym2.Adornee = Character.Torso
- naeeym2.Name = "hAhfUNY"
- local tecks2 = Instance.new("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.BorderSizePixel = 0
- tecks2.Text = ""
- tecks2.Font = font
- tecks2.TextSize = 30
- tecks2.TextStrokeTransparency = 0
- tecks2.TextColor3 = Color3.new(0.5,0,1)
- tecks2.TextStrokeColor3 = Color3.new(0,1,1)
- tecks2.Size = UDim2.new(1,0,0.5,0)
- local tecks3 = Instance.new("TextLabel",naeeym2)
- tecks3.BackgroundTransparency = 1
- tecks3.BorderSizePixel = 0
- tecks3.Text = ""
- tecks3.Font = font
- tecks3.TextSize = 30
- tecks3.TextStrokeTransparency = 0
- tecks3.TextColor3 = Color3.new(0.3,0,1)
- tecks3.TextStrokeColor3 = Color3.new(1,1,1)
- tecks3.Size = UDim2.new(1,0,0.5,0)
- tecks2.Text = text
- tecks3.Text = text
- done = true
- wait(2)
- for i = 1, 50 do
- Swait()
- tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
- tecks2.Rotation = tecks2.Rotation - .8
- tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
- tecks2.TextTransparency = tecks2.TextTransparency + .04
- tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
- tecks3.Rotation = tecks2.Rotation + .8
- tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
- tecks3.TextTransparency = tecks2.TextTransparency + .04
- end
- naeeym2:Destroy()
- end)
- chat()
- end
- function onChatted(msg)
- chatfunc(msg)
- end
- plr.Chatted:connect(onChatted)
- local on = false
- spawn(function()
- while true do
- if on == true then
- p = Character:GetDescendants()
- for i = 1,#p do
- if p[i]:IsA("Part") or p[i]:IsA("MeshPart") or p[i]:IsA("BasePart") then
- if p[i]:FindFirstChild("ptt") then
- p[i].ptt.Acceleration = Vector3.new(math.random(-2,2),math.random(0,2),math.random(0,2))
- end
- if on == true then
- if p[i]:FindFirstChild("pt") then
- p[i].pt.Enabled = true
- elseif p[i]:FindFirstChild("ptt") then
- p[i].ptt.Enabled = true
- end
- else
- if p[i]:FindFirstChild("pt") then
- p[i].pt.Enabled = false
- elseif p[i]:FindFirstChild("ptt") then
- p[i].ptt.Enabled = false
- end
- end
- end
- end
- pt2.Acceleration = Vector3.new(math.random(-5,5),math.random(0,5),math.random(1,2))
- ran = math.random(1,5)
- if ran == 1 or ran == 2 then
- local bolt = Instance.new("Part")
- bolt.Material = "Neon"
- bolt.CanCollide = false
- ran2 = math.random(1,2)
- bolt.Size = Vector3.new(ran2,1,ran2)
- ran1 = math.random(1,2)
- ran3 = nil
- if ran1 == 2 then
- ran3 = Vector3.new(RootPart.Position.X + math.random(5,7), RootPart.Position.Y-3, RootPart.Position.Z + math.random(5,7))
- else
- ran3 = Vector3.new(RootPart.Position.X - math.random(5,7), RootPart.Position.Y-3, RootPart.Position.Z - math.random(5,7))
- end
- bolt.Position = ran3
- bolt.Anchored = true
- bolt.CFrame = bolt.CFrame*CFrame.Angles(math.rad(math.random(-10,10)),math.rad(math.random(1,10)),math.rad(math.random(-10,10)))
- bolt.Color = Color3.new(0.3,0,1)
- bolt.Parent = Effects
- CreateSound(ULTHIT, bolt, 4, 1, false)
- spawn(function()
- for i = 1,30 do
- bolt.Transparency = i/30
- bolt.Size = bolt.Size:Lerp(Vector3.new(bolt.Size.X, 7, bolt.Size.Z), 0.1)
- bolt.Color = bolt.Color:Lerp(Color3.new(0.5,0,1),0.1)
- Swait()
- end
- Debris:AddItem(bolt, 0)
- end)
- end
- rando = math.random(1,15)
- if rando == 10 then
- ran1 = math.random(1,2)
- ran3 = nil
- if ran1 == 2 then
- ran3 = Vector3.new(RootPart.Position.X + math.random(2,5), RootPart.Position.Y+math.random(2,5), RootPart.Position.Z + math.random(2,5))
- else
- ran3 = Vector3.new(RootPart.Position.X - math.random(2,5), RootPart.Position.Y-math.random(2,5), RootPart.Position.Z - math.random(2,5))
- end
- l = Lightning({Color = C3(0.3,0,1), Color2 = C3(0,0,1), Start = e.Position, End = ran3, SegmentL = math.random(3.5,5), Thickness = 0.2, DoesFade = true, Ignore = Character, MaxDist = 10, Branches = false})
- CreateSound(SHOCKSOUND, l.LastBolt, 4, 1, false)
- end
- end
- wait(0.5)
- end
- end)
- chatfunc("The following is based of private lore")
- wait(3)
- chatfunc(". . .")
- wait(2)
- chatfunc("You really wont just leave me be?")
- wait(3.5)
- chatfunc("Fine then.")
- wait(2)
- chatfunc("I dont even have")
- wait(2)
- chatfunc("Much control over this, but..")
- wait(3)
- chatfunc("You're asking for it.")
- wait(2)
- pa = Instance.new("Part")
- pa.Material = "Glass"
- pa.Color = Color3.new(0.4,0,1)
- pa.Transparency = 0.4
- pa.Shape = "Ball"
- pa.Anchored = true
- pa.Size = Vector3.new(10,10,10)
- RootPart.Anchored = true
- pa.Position = RootPart.Position
- pa2 = pa:Clone()
- pa2.Material = "Neon"
- pa2.Size = Vector3.new(10.1,10.1,10.1)
- pa2.Transparency = 0.65
- pa.Parent = Effects
- pa2.Parent = Effects
- on = true
- for i = 1,30 do
- pa.Size = pa.Size:Lerp(Vector3.new(500,500,500),0.1)
- pa2.Size = pa2.Size:Lerp(Vector3.new(500.1,500.1,500.1),0.1)
- pa.Transparency = pa.Transparency + (0.6/30)
- pa2.Transparency = pa2.Transparency + (0.35/30)
- if i > 25 then
- pa.CanCollide = false
- pa2.CanCollide = false
- end
- Swait()
- end
- pa:Remove()
- pa2:Remove()
- RootPart.Anchored = false
- font = "Antique"
- chatfunc("God Core: King's Light.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement