Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local starmanPlayers = {}
- local starmanLastColor = nil
- local starmanEvents = {}
- local plr = game:GetService("Players").Hmm465
- local char = game:GetService("Players").Hmm465.Character
- local lastColor = ""
- local newColor = ""
- local powerupSound = Instance.new("Sound",char.HumanoidRootPart)
- powerupSound.Name = "PowerUp"
- powerupSound.Volume = 10
- powerupSound.SoundId = "rbxassetid://182755256"
- wait()
- powerupSound:Play()
- game:GetService("Debris"):AddItem(powerupSound,2)
- while char.HumanoidRootPart:FindFirstChild("Starman") do char.HumanoidRootPart.Starman:Destroy() end
- local starmanMusic = Instance.new("Sound",char.HumanoidRootPart)
- starmanMusic.Name = "Starman"
- starmanMusic.Volume = 5
- starmanMusic.Looped = true
- starmanMusic.SoundId = "rbxassetid://530596723"
- wait()
- starmanMusic:Play()
- if char:FindFirstChild("Shirt") then char.Shirt:Destroy() end
- if char:FindFirstChild("Pants") then char.Pants:Destroy() end
- char:FindFirstChildOfClass('Humanoid').WalkSpeed = 32
- char:FindFirstChildOfClass('Humanoid').MaxHealth = math.huge
- char:FindFirstChildOfClass('Humanoid').Health = math.huge
- local invisff = Instance.new("ForceField", char)
- invisff.Visible = false invisff.Name = 'smff'
- while char.HumanoidRootPart:FindFirstChild("StarmanFlash") do char.HumanoidRootPart.StarmanFlash:Destroy() end
- local light = Instance.new("PointLight",char.HumanoidRootPart)
- light.Name = "StarmanFlash"
- light.Brightness = 100
- light.Range = 20
- light.Shadows = true
- local function stardestroy(part)
- if part.Parent:FindFirstChild("Humanoid") and part.Parent ~= char then
- for i,v in pairs(part.Parent:GetChildren()) do
- if v:IsA("BasePart") then
- local force = Instance.new("BodyForce",v)
- force.Force = char.HumanoidRootPart.CFrame.lookVector * 50
- v:BreakJoints()
- end
- end
- local tadaas = {}
- for i = 1,1 do
- local tadaa = Instance.new("Sound",part.Parent.HumanoidRootPart)
- tadaa.Volume = 10
- tadaa.SoundId = "rbxassetid://551195499"
- table.insert(tadaas,tadaa)
- end
- wait()
- for i,v in pairs(tadaas) do
- v:Play()
- end
- end
- end
- local events = {}
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("BasePart") then v.Material = Enum.Material.Neon table.insert(events,v.Touched:Connect(stardestroy)) end
- end
- if starmanEvents[plr.Name] then for i,v in pairs(starmanEvents[plr.Name]) do v:Disconnect() end starmanEvents[plr.Name] = nil end
- starmanEvents[plr.Name] = events
- starmanPlayers[plr.Name] = char
- local Players = game:GetService("Players")
- local name = "Hmm465"
- local plrchar = Players:FindFirstChild(name).Character
- local Timers = {}
- function checkTimer(n,t,res)
- if not Timers[n] then Timers[n] = 0 end
- if tick() >= Timers[n] + t then
- if res then Timers[n] = tick() end
- return true
- else
- return false
- end
- end
- function nonEmpty(t)
- for i,v in pairs(t) do
- return true
- end
- return false
- end
- game:GetService("RunService").Heartbeat:connect(function()
- if nonEmpty(starmanPlayers) then
- if checkTimer("Starman",0.05,true) then
- for name,plrchar in pairs(starmanPlayers) do
- pcall(function()
- local colors = {"Bright red","Bright blue","Bright green","Bright yellow","Bright violet"}
- if not Players:FindFirstChild(name) then starmanPlayers[name] = nil end
- local plr = Players:FindFirstChild(name)
- if plr then
- local char = plrchar
- local light = char.HumanoidRootPart:FindFirstChild("StarmanFlash")
- local meshMap = {}
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("CharacterMesh") then
- if v.BodyPart.Name == "Torso" then meshMap["Torso"] = "rbxassetid://"..v.MeshId end
- if v.BodyPart.Name == "LeftArm" then meshMap["Left Arm"] = "rbxassetid://"..v.MeshId end
- if v.BodyPart.Name == "RightArm" then meshMap["Right Arm"] = "rbxassetid://"..v.MeshId end
- if v.BodyPart.Name == "LeftLeg" then meshMap["Left Leg"] = "rbxassetid://"..v.MeshId end
- if v.BodyPart.Name == "RightLeg" then meshMap["Right Leg"] = "rbxassetid://"..v.MeshId end
- end
- end
- if char.Head:FindFirstChild("Mesh") then meshMap["Head"] = char.Head.Mesh.MeshId end
- if not char or char.Parent == nil then starmanPlayers[plr.Name] = nil end
- local newColor = BrickColor.new(colors[math.random(1,#colors)])
- while starmanLastColor == newColor do newColor = BrickColor.new(colors[math.random(1,#colors)]) end
- starmanLastColor = newColor
- for i,v in pairs(char:GetChildren()) do
- if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" then
- v.BrickColor = newColor
- local fade = v:Clone()
- if meshMap[v.Name] then
- local newMesh = Instance.new("SpecialMesh",fade)
- newMesh.MeshId = meshMap[v.Name]
- end
- fade.Name = "StarFade"
- fade.Anchored = true
- fade.CanCollide = false
- for n,c in pairs(fade:GetChildren()) do if c:IsA("Attachment") or c:IsA("Motor6D") or c:IsA("PointLight") or c:IsA("Sound") or c:IsA("Weld") then c:Destroy() end end
- fade.Parent = workspace.Terrain
- game:GetService("TweenService"):Create(fade,TweenInfo.new(0.5),{Transparency = 1}):Play()
- game:GetService("Debris"):AddItem(fade,0.5)
- end
- end
- light.Color = newColor.Color
- end
- end)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement