Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local children = script:GetChildren()
- script = Instance.new("ModuleScript")
- for _, child in pairs(children) do
- child.Parent = script
- end
- local module = {}
- local plrsHave={}
- function module:Load(plr,Type,color)
- --if not game.Workspace:FindFirstChild("WhalerBlink") then
- --script.WhalerBlink:Clone().Parent=game.Workspace
- -- script.WhalerBlink.Disabled=false
- --end
- --if checkVIP(plr) then
- local asda
- asda = game.Players[plr].CharacterAdded:connect(function() game.Players[plr].AetherColor:Destroy() game.Players[plr].AetherType:Destroy() asda:disconnect() end)
- if Type=="Aether" or Type=="Glass" then
- if not game.Players[plr]:FindFirstChild("AetherType") then
- local va=Instance.new("StringValue",game.Players[plr])
- va.Name="AetherColor"
- va.Value=BrickColor.new(color).Name
- local va2=Instance.new("StringValue",game.Players[plr])
- va2.Name="AetherType"
- va2.Value=Type
- script.LocalScript:Clone().Parent=game.Players[plr].Backpack
- else
- game.Players[plr].AetherColor.Value=BrickColor.new(color).Name
- game.Players[plr].AetherType.Value=Type
- end
- elseif Type=="Lucky" then
- if not game.Players[plr]:FindFirstChild("AetherType") then
- local va=Instance.new("StringValue",game.Players[plr])
- va.Name="AetherColor"
- va.Value="White"
- local va2=Instance.new("StringValue",game.Players[plr])
- va2.Name="AetherType"
- va2.Value="Lucky"
- script.LocalScript:Clone().Parent=game.Players[plr].Backpack
- else
- game.Players[plr].AetherType.Value="Lucky"
- end
- elseif Type=="Sand" then
- if not game.Players[plr]:FindFirstChild("AetherType") then
- local va=Instance.new("StringValue",game.Players[plr])
- va.Name="AetherColor"
- va.Value="White"
- local va2=Instance.new("StringValue",game.Players[plr])
- va2.Name="AetherType"
- va2.Value="Sand"
- script.LocalScript:Clone().Parent=game.Players[plr].Backpack
- else
- game.Players[plr].AetherType.Value="Lucky"
- end
- elseif Type=="Mark" then
- if not game.Players[plr]:FindFirstChild("AetherType") then
- local va=Instance.new("StringValue",game.Players[plr])
- va.Name="AetherColor"
- va.Value="White"
- local va2=Instance.new("StringValue",game.Players[plr])
- va2.Name="AetherType"
- va2.Value="Mark"
- script.LocalScript:Clone().Parent=game.Players[plr].Backpack
- else
- game.Players[plr].AetherType.Value="Mark"
- end
- end
- --[[if color~=nil then
- script.Saber.Sheath.Main.BrickColor=BrickColor.new(color)
- else
- script.Saber.Sheath.Main.BrickColor=BrickColor.new("Black")
- end]]
- --[[if givemark then
- giveTattoo(game.Players[plr].Character)
- end]]
- -- script.Book:Clone().Parent=game.Players[plr].Backpack
- --end
- end
- ----------------player chatted system---------------------------------------------------------------
- --[[function Chatted(plr,txt)
- if string.lower(string.sub(txt,1,6)) == "/mark " then
- module:Load(plr,string.sub(txt,7,string.len(txt)),true)
- end
- end
- local players=game.Players:GetChildren()
- for i=1,#players do
- if checkVIP(players[i]) then
- players[i].Chatted:connect(function(txt)
- Chatted(players[i].Name,txt)
- end)
- end
- end
- game.Players.PlayerAdded:connect(function(plr)
- wait(2)
- if checkVIP(game.Players[plr.Name]) then
- players[i].Chatted:connect(function(txt)
- Chatted(players[i].Name,txt)
- end)
- end
- end)]]
- ------------------------------------------------------------------------------------------------------
- --AetherColor-----------------------------------------------------------
- local CSKP=ColorSequenceKeypoint.new
- local BCN=BrickColor.new
- local ABS=math.abs
- local function nearFloat(number1,number2)
- if ABS(number2-number1)>0.01 then return true end
- return false
- end
- local function adjustAetherColor(particle,key)
- local colors=particle.Color
- local newcolor={}
- for i=1,#colors.Keypoints do
- if nearFloat(key[1], colors.Keypoints[i].Time)then
- table.insert(newcolor,CSKP(colors.Keypoints[i].Time,colors.Keypoints[i].Value))
- else
- table.insert(newcolor,CSKP(key[1],key[2]))
- end
- end
- particle.Color=ColorSequence.new(newcolor)
- end
- ---------------------------------------------------------------------------
- local partMem={}
- local plrMem={}
- local soundid="rbxassetid://218410588"
- --[[
- if not game.ReplicatedStorage:FindFirstChild("WhalerMark") then
- local m=Instance.new("RemoteEvent",game.ReplicatedStorage)
- m.Name="WhalerMark"
- end]]
- local re=Instance.new("RemoteEvent",game.ReplicatedStorage)
- re.Name="AetherEvent"
- local res=Instance.new("BindableEvent",game.ReplicatedStorage)
- res.Name="AetherEventServer"
- function giveTattoo(chr)
- if not chr:FindFirstChild("TheMark") then
- local s=script.TheMark:Clone()
- s.Parent=chr
- s.p1.Anchored=false
- local w =Instance.new("Weld")
- w.Part0=s.p1
- w.Part1=chr["Left Arm"]
- w.C0=CFrame.new(0, 0, 0, 1.68614687e-008, -0.963091552, -0.269174099, 1, -1.25006192e-008, 1.07368095e-007, -1.06770152e-007, -0.269174099, 0.963091552)
- w.C1=CFrame.new(-0.506748199, -0.594919682, -0.0331473351, 1, 0, 0, 0, 0.99999994, 0, 0, 0, 1)
- w.Parent=s.p1
- end
- end
- function RecieveMark(p,type)
- if type=="Create" then
- giveTattoo(p.Character)
- elseif type=="Destroy" then
- local x=p.Character:FindFirstChild("TheMark")
- if x then x:Destroy() end
- end
- end
- local function CreateEffect(Part,Type,color)
- local effect="Aether"
- if Type=="Mark" then
- --effects={script:findFirstChild(effect.."1"),script:findFirstChild(effect.."2"),script:findFirstChild(effect.."3"),script:findFirstChild(effect.."4")}
- local effects={script:findFirstChild("Mark1"),script:findFirstChild("Mark2"),script:findFirstChild("Mark3"),script:findFirstChild("Mark4")}
- for b=1,#effects do
- local e=effects[b]:Clone()
- e.Parent=Part
- spawn(function()
- for i=1,10 do
- wait()
- e:Emit(2)
- end
- end)
- game.Debris:AddItem(e,7)
- end
- elseif Type=="Aether" then
- local effects={script:findFirstChild(effect.."1"),script:findFirstChild(effect.."2"),script:findFirstChild(effect.."3"),script:findFirstChild(effect.."4")}
- for b=1,#effects do
- local e=effects[b]:Clone()
- e.Parent=Part
- adjustAetherColor(e,{0.298,BCN(color).Color})
- spawn(function()
- for i=1,10 do
- wait()
- e:Emit(2)
- end
- end)
- game.Debris:AddItem(e,7)
- end
- elseif Type=="Lucky" then
- effect="Lucky"
- local effects={script:findFirstChild(effect.."1"),script:findFirstChild(effect.."2"),script:findFirstChild(effect.."3"),script:findFirstChild(effect.."4")}
- for b=1,#effects do
- local e=effects[b]:Clone()
- e.Parent=Part
- local fxcount=2
- if b==3 then fxcount=5 end
- spawn(function()
- for i=1,10 do
- wait()
- e:Emit(fxcount)
- end
- end)
- game.Debris:AddItem(e,7)
- end
- elseif Type=="Sand" then
- effect="Sand"
- local effects={script:findFirstChild(effect.."1"),script:findFirstChild(effect.."2")}
- for b=1,#effects do
- local e=effects[b]:Clone()
- e.Parent=Part
- local fxcount=5
- spawn(function()
- for i=1,10 do
- wait()
- e:Emit(fxcount)
- end
- end)
- game.Debris:AddItem(e,7)
- end
- elseif Type=="Glass" then
- local effects={script:findFirstChild(effect.."1"),script:findFirstChild(effect.."2"),script:findFirstChild(effect.."3"),script:findFirstChild(effect.."4")}
- local effects2={script:findFirstChild("Mark1"),script:findFirstChild("Mark2"),script:findFirstChild("Mark3"),script:findFirstChild("Mark4")}
- for b=1,#effects do
- local e=effects[b]:Clone()
- local e2=effects2[b]:Clone()
- e.Parent=Part
- e2.Parent=Part
- adjustAetherColor(e,{0.298,BCN(color).Color})
- spawn(function()
- for i=1,10 do
- wait()
- e:Emit(2)
- e2:Emit(1)
- end
- end)
- game.Debris:AddItem(e,7)
- end
- end
- end
- function Hide(m,type,Type,color)
- local x=m:GetChildren()
- for i=1,#x do
- Hide(x[i],type)
- if type then
- if x[i].ClassName=="BillboardGui" or x[i].ClassName=="ParticleEmitter" or x[i].ClassName=="SurfaceGui" or x[i].ClassName=="PointLight" then
- partMem[x[i]]=x[i].Enabled
- x[i].Enabled=false
- end
- if x[i]:IsA'BasePart' and x[i].Transparency~=1 then
- partMem[x[i]]=x[i].Transparency
- x[i].Transparency=1.1
- if x[i]:FindFirstChild("face") then
- x[i].face.Transparency=1.1
- end
- if x[i].Parent:FindFirstChild("HumanoidRootPart") then
- CreateEffect(x[i],Type,color)
- wait(.002)
- end
- end
- else
- if x[i]:IsA'BasePart' and x[i].Name~="HumanoidRootPart" and x[i].Transparency~=1 then x[i].Transparency=partMem[x[i]]
- if x[i].Parent:FindFirstChild("HumanoidRootPart") then
- CreateEffect(x[i],Type,color)
- wait(.002)
- end
- end
- if x[i].ClassName=="BillboardGui" or x[i].ClassName=="ParticleEmitter" then
- x[i].Enabled=partMem[x[i]]
- end
- if x[i]:FindFirstChild("face") then
- x[i].face.Transparency=0
- end
- end
- end
- end
- --local whaler=require(game.ReplicatedStorage.Modules.Whaler)
- function Recieve(p,toggle,Type,asda2)
- local aethercolor
- if p:FindFirstChild("AetherColor") then
- aethercolor=p.AetherColor.Value
- else
- aethercolor="Pastel violet"
- end
- if not p.Character.HumanoidRootPart:FindFirstChild("WhalerBlinkSound1") then
- local s=Instance.new("Sound",p.Character.HumanoidRootPart)
- s.Name="WhalerBlinkSound1"
- s.SoundId=soundid
- local s2=Instance.new("Sound",p.Character.HumanoidRootPart)
- s2.Name="WhalerBlinkSound2"
- s2.SoundId="rbxassetid://416001005"
- local s3=Instance.new("Sound",p.Character.HumanoidRootPart)
- s3.Name="WhalerBlinkSound3"
- s3.SoundId="rbxassetid://418168618"
- end
- --effect=leffect
- p.Character.HumanoidRootPart["WhalerBlinkSound" .. tostring(math.random(1,3))]:Play()
- if toggle then
- Hide(p.Character,true,Type,aethercolor)
- --whaler.Hide(p.Character,true)
- else
- plrMem[p.Name]=nil
- Hide(p.Character,false,Type,aethercolor)
- --whaler.Hide(p.Character,false)
- end
- end
- re.OnServerEvent:connect(Recieve)
- function RecieveServer(p,toggle)
- if p.Parent==game.Players then
- local aethercolor
- local aethertype
- if p:FindFirstChild("AetherColor") then
- aethercolor=p.AetherColor.Value
- else
- aethercolor="Pastel violet"
- end
- if p:FindFirstChild("AetherType") then
- aethertype=p.AetherType.Value
- else
- aethertype="Aether"
- end
- if not p.Character.HumanoidRootPart:FindFirstChild("WhalerBlinkSound1") then
- local s=Instance.new("Sound",p.Character.HumanoidRootPart)
- s.Name="WhalerBlinkSound1"
- s.SoundId=soundid
- local s2=Instance.new("Sound",p.Character.HumanoidRootPart)
- s2.Name="WhalerBlinkSound2"
- s2.SoundId="rbxassetid://416001005"
- local s3=Instance.new("Sound",p.Character.HumanoidRootPart)
- s3.Name="WhalerBlinkSound3"
- s3.SoundId="rbxassetid://418168618"
- end
- --effect=leffect
- p.Character.HumanoidRootPart["WhalerBlinkSound" .. tostring(math.random(1,3))]:Play()
- if toggle then
- Hide(p.Character,true,aethertype,aethercolor)
- --whaler.Hide(p.Character,true)
- else
- plrMem[p.Name]=nil
- Hide(p.Character,false,aethertype,aethercolor)
- --whaler.Hide(p.Character,false)
- end
- else
- local aethercolor="Black"
- local aethertype="Mark"
- if not p.HumanoidRootPart:FindFirstChild("WhalerBlinkSound1") then
- local s=Instance.new("Sound",p.HumanoidRootPart)
- s.Name="WhalerBlinkSound1"
- s.SoundId=soundid
- local s2=Instance.new("Sound",p.HumanoidRootPart)
- s2.Name="WhalerBlinkSound2"
- s2.SoundId="rbxassetid://416001005"
- local s3=Instance.new("Sound",p.HumanoidRootPart)
- s3.Name="WhalerBlinkSound3"
- s3.SoundId="rbxassetid://418168618"
- end
- --effect=leffect
- p.HumanoidRootPart["WhalerBlinkSound" .. tostring(math.random(1,3))]:Play()
- if toggle then
- Hide(p,true,aethertype,aethercolor)
- --whaler.Hide(p.Character,true)
- else
- plrMem[p.Name]=nil
- Hide(p,false,aethertype,aethercolor)
- --whaler.Hide(p.Character,false)
- end
- end
- end
- res.Event:connect(RecieveServer)
- ----------------------------------------------------------------------------------------------------------
- ----------------------------------------------whaler pull
- local GyroEvent=Instance.new("RemoteEvent",game.ReplicatedStorage)
- GyroEvent.Name="Gyro"
- local OwnerStore={}
- local function checkInvisible(chr)
- local part = chr:FindFirstChild("Head") or chr:FindFirstChild("Left Arm")
- if part then
- if part.Transparency>=1 then return true end
- end
- return false
- end
- GyroEvent.OnServerEvent:connect(function(p,Target,parent,toggle)
- if parent.Name=="HumanoidRootPart" then parent.Parent.Humanoid.PlatformStand=toggle end
- if toggle then
- local fx1=script.BaseSphere:Clone()
- local fx2=script.Deb:Clone()
- --local fx3=script.BasePull:Clone()
- OwnerStore[parent]=parent:GetNetworkOwner()
- parent:SetNetworkOwner(p)
- fx1.Parent=parent
- fx2.Parent=parent
- fx1.Enabled=true
- fx2.Enabled=true
- if p.Character:FindFirstChild("TheMark") then if not checkInvisible(p.Character) then p.Character.TheMark.p1.PE.Enabled=true p.Character.TheMark.p1.PE2.Enabled=true end end
- else
- if p.Character:FindFirstChild("TheMark") then p.Character.TheMark.p1.PE.Enabled=false p.Character.TheMark.p1.PE2.Enabled=false end
- parent.Deb.Enabled=false
- parent.BaseSphere.Enabled=false
- game.Debris:AddItem(parent.Deb,10)
- parent.Deb.Acceleration=Vector3.new(0,-3,0)
- parent.Deb.Name="destroying"
- game.Debris:AddItem(parent.BaseSphere,5)
- parent.BaseSphere.Name="destroying"
- parent:SetNetworkOwner(OwnerStore[parent])
- --parent.FXBasePart.BasePull.Enabled=false
- --game.Debris:AddItemparent.FXBasePart,5)
- --[[gyro.Parent.FXBasePart.Name="destroying"
- gyro.Parent:SetNetworkOwner(OwnerStore[gyro.Parent])
- gyro:Destroy()]]
- end
- end)
- -----------------------
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement