Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- players = game:GetService("Players")
- runservice = game:GetService("RunService")
- --owner = players:GetPlayerFromCharacter(script.Parent)
- plrgui = owner:findFirstChildOfClass("PlayerGui")
- character = owner.Character
- NLS([[players = game:GetService("Players")
- runservice = game:GetService("RunService")
- localplayer = players.LocalPlayer
- plrgui = localplayer:findFirstChildOfClass("PlayerGui")
- character = localplayer.Character
- remote = character:WaitForChild("funkyremotedoe")
- gui = plrgui:WaitForChild("ohshitagh0st")
- ghostframe = gui:WaitForChild("gh0stframe")
- ghostbutton = ghostframe:WaitForChild("gh0stbutton")
- visibleframe = gui:WaitForChild("visibleframe")
- visiblebutton = visibleframe:WaitForChild("visiblebutton")
- modeframe = gui:WaitForChild("modeframe")
- modebutton = modeframe:WaitForChild("modebutton")
- ghosted = false
- visible = true
- bodytype = "Ghost"
- function mufflesound(what)
- local eq = Instance.new("EqualizerSoundEffect", what)
- eq.HighGain = -30
- eq.MidGain = -30
- eq.LowGain = 0
- eq.Name = "GhostMuffleSound"
- end
- function unmufflesound(what)
- if what:findFirstChild("GhostMuffleSound") then
- what.GhostMuffleSound:destroy()
- end
- end
- workspace.DescendantAdded:connect(function(what)
- if what.ClassName == "Sound" then
- if ghosted then
- mufflesound(what)
- end
- end
- end)
- modebutton.MouseButton1Click:connect(function()
- if bodytype == "Ghost" then
- modebutton.Active = false
- remote:FireServer("humanoidbody", character.Head.CFrame)
- elseif bodytype == "Humanoid" then
- modebutton.Active = false
- remote:FireServer("ghostbody", character.Head.CFrame)
- end
- end)
- ghostbutton.MouseButton1Click:connect(function()
- if not ghosted then
- ghostbutton.Active = false
- remote:FireServer("ghostmeplease")
- else
- ghostbutton.Active = false
- remote:FireServer("unghostmeplease", character.Head.CFrame)
- end
- end)
- visiblebutton.MouseButton1Click:connect(function()
- if not visible then
- visiblebutton.Active = false
- remote:FireServer("visiblemepls", character.Head.CFrame)
- else
- visiblebutton.Active = false
- remote:FireServer("invisiblemepls", character.Head.CFrame)
- end
- end)
- remote.OnClientEvent:connect(function(WHAT)
- if WHAT == "ghostlocal" then
- ghosted = true
- ghostbutton.Text = "Ghost: On"
- ghostbutton.Active = true
- character.Parent = workspace
- workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView + 10
- local correct = Instance.new("ColorCorrectionEffect", workspace.CurrentCamera)
- correct.TintColor = Color3.fromRGB(255, 200, 255)
- correct.Name = "ghosteffect"
- for i,v in pairs(workspace:GetDescendants()) do
- if v.ClassName == "Sound" then
- mufflesound(v)
- end
- end
- for i = 1,20 do
- workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView - 0.5
- runservice.RenderStepped:wait()
- end
- elseif WHAT == "unghostlocal" then
- ghosted = false
- ghostbutton.Text = "Ghost: Off"
- ghostbutton.Active = true
- if workspace.CurrentCamera:findFirstChild("ghosteffect") then
- workspace.CurrentCamera.ghosteffect:destroy()
- end
- workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView + 10
- for i,v in pairs(workspace:GetDescendants()) do
- if v.ClassName == "Sound" then
- unmufflesound(v)
- end
- end
- for i = 1,20 do
- workspace.CurrentCamera.FieldOfView = workspace.CurrentCamera.FieldOfView - 0.5
- runservice.RenderStepped:wait()
- end
- elseif WHAT == "invisiblelocal" then
- visible = false
- visiblebutton.Text = "Visible: Off"
- visiblebutton.Active = true
- elseif WHAT == "visiblelocal" then
- visible = true
- visiblebutton.Text = "Visible: On"
- visiblebutton.Active = true
- elseif WHAT == "ghostedbody" then
- bodytype = "Ghost"
- modebutton.Text = "Body Type: Ghost"
- modebutton.Active = true
- elseif WHAT == "humanoidedbody" then
- bodytype = "Humanoid"
- modebutton.Text = "Body Type: Humanoid"
- modebutton.Active = true
- end
- end)
- coroutine.wrap(function()
- while runservice.Stepped:wait() do
- if workspace:findFirstChild("GH0ST ("..string.lower(localplayer.Name)..")") then
- local themodel = workspace:findFirstChild("GH0ST ("..string.lower(localplayer.Name)..")")
- if themodel:findFirstChildOfClass("Humanoid") then
- for i,v in pairs(themodel:GetDescendants()) do
- if v.ClassName == "SpawnLocation" then
- v.CanCollide = false
- end
- end
- end
- end
- end
- end)()
- while runservice.RenderStepped:wait() do
- if workspace:findFirstChild("GH0ST ("..string.lower(localplayer.Name)..")") then
- local themodel = workspace:findFirstChild("GH0ST ("..string.lower(localplayer.Name)..")")
- for i,v in pairs(character:GetDescendants()) do
- for q,w in pairs(themodel:GetDescendants()) do
- if w.Name == v.Name then
- if w.ClassName == "SpawnLocation" and w.Parent.ClassName ~= "Accessory" and w.Parent.ClassName ~= "Hat" then
- w.CFrame = v.CFrame
- w.Velocity = Vector3.new()
- w.RotVelocity = Vector3.new()
- end
- end
- end
- end
- for i,v in pairs(character:GetChildren()) do
- for q,w in pairs(themodel:GetChildren()) do
- if w.Name == v.Name then
- if w.ClassName == "Accessory" or w.ClassName == "Hat" then
- if w:findFirstChild("Handle") and v:findFirstChild("Handle") then
- w.Handle.CFrame = v.Handle.CFrame
- w.Handle.Velocity = Vector3.new()
- w.Handle.RotVelocity = Vector3.new()
- end
- end
- end
- end
- end
- end
- end]], character)
- visible = true
- ghosted = false
- bodytype = "Ghost"
- local remote = Instance.new("RemoteEvent", character)
- remote.Name = "funkyremotedoe"
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- ScreenGui0 = Instance.new("ScreenGui")
- Frame1 = Instance.new("Frame")
- ghostbutton = Instance.new("TextButton")
- Frame3 = Instance.new("Frame")
- visiblebutton = Instance.new("TextButton")
- Frame5 = Instance.new("Frame")
- modebutton = Instance.new("TextButton")
- ScreenGui0.Name = "ohshitagh0st"
- ScreenGui0.Parent = mas
- ScreenGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Frame1.Name = "gh0stframe"
- Frame1.Parent = ScreenGui0
- Frame1.Position = UDim2.new(0.816999972, 0, 0.950999975, 0)
- Frame1.Size = UDim2.new(0, 234, 0, 35)
- Frame1.BackgroundColor = BrickColor.new("Institutional white")
- Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame1.Style = Enum.FrameStyle.RobloxRound
- ghostbutton.Name = "gh0stbutton"
- ghostbutton.Parent = Frame1
- ghostbutton.Position = UDim2.new(0.0164168887, 0, -0.225141287, 0)
- ghostbutton.Size = UDim2.new(0, 210, 0, 29)
- ghostbutton.BackgroundColor = BrickColor.new("Institutional white")
- ghostbutton.BackgroundColor3 = Color3.new(1, 1, 1)
- ghostbutton.Style = Enum.ButtonStyle.RobloxButtonDefault
- ghostbutton.Font = Enum.Font.SourceSans
- ghostbutton.FontSize = Enum.FontSize.Size14
- ghostbutton.Text = "Ghost: Off"
- ghostbutton.TextColor = BrickColor.new("Institutional white")
- ghostbutton.TextColor3 = Color3.new(1, 1, 1)
- ghostbutton.TextScaled = true
- ghostbutton.TextSize = 14
- ghostbutton.TextWrap = true
- ghostbutton.TextWrapped = true
- Frame3.Name = "visibleframe"
- Frame3.Parent = ScreenGui0
- Frame3.Position = UDim2.new(0.816999972, 0, 0.902999997, 0)
- Frame3.Size = UDim2.new(0, 234, 0, 35)
- Frame3.BackgroundColor = BrickColor.new("Institutional white")
- Frame3.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame3.Style = Enum.FrameStyle.RobloxRound
- visiblebutton.Name = "visiblebutton"
- visiblebutton.Parent = Frame3
- visiblebutton.Position = UDim2.new(0.0164168887, 0, -0.225141287, 0)
- visiblebutton.Size = UDim2.new(0, 210, 0, 29)
- visiblebutton.BackgroundColor = BrickColor.new("Institutional white")
- visiblebutton.BackgroundColor3 = Color3.new(1, 1, 1)
- visiblebutton.Style = Enum.ButtonStyle.RobloxButtonDefault
- visiblebutton.Font = Enum.Font.SourceSans
- visiblebutton.FontSize = Enum.FontSize.Size14
- visiblebutton.Text = "Visible: On"
- visiblebutton.TextColor = BrickColor.new("Institutional white")
- visiblebutton.TextColor3 = Color3.new(1, 1, 1)
- visiblebutton.TextScaled = true
- visiblebutton.TextSize = 14
- visiblebutton.TextWrap = true
- visiblebutton.TextWrapped = true
- Frame5.Name = "modeframe"
- Frame5.Parent = ScreenGui0
- Frame5.Position = UDim2.new(0.816999972, 0, 0.853999972, 0)
- Frame5.Size = UDim2.new(0, 234, 0, 35)
- Frame5.BackgroundColor = BrickColor.new("Institutional white")
- Frame5.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame5.Style = Enum.FrameStyle.RobloxRound
- modebutton.Name = "modebutton"
- modebutton.Parent = Frame5
- modebutton.Position = UDim2.new(0.0164168887, 0, -0.225141287, 0)
- modebutton.Size = UDim2.new(0, 210, 0, 29)
- modebutton.BackgroundColor = BrickColor.new("Institutional white")
- modebutton.BackgroundColor3 = Color3.new(1, 1, 1)
- modebutton.Style = Enum.ButtonStyle.RobloxButtonDefault
- modebutton.Font = Enum.Font.SourceSans
- modebutton.FontSize = Enum.FontSize.Size14
- modebutton.Text = "Body Type: Ghost"
- modebutton.TextColor = BrickColor.new("Institutional white")
- modebutton.TextColor3 = Color3.new(1, 1, 1)
- modebutton.TextScaled = true
- modebutton.TextSize = 14
- modebutton.TextWrap = true
- modebutton.TextWrapped = true
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = plrgui
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- remote.OnServerEvent:connect(function(WHO, WHAT, VALUE)
- if WHO == owner then
- if WHAT == "ghostmeplease" then
- ghosted = true
- local sphereeffect = Instance.new("Part", workspace)
- sphereeffect.Material = "Neon"
- sphereeffect.Shape = "Ball"
- sphereeffect.Anchored = true
- sphereeffect.Name = "GhostTransitionEffect"
- sphereeffect.CanCollide = false
- sphereeffect.CFrame = character.Head.CFrame * CFrame.new(0,-1.5,0)
- sphereeffect.Size = Vector3.new(10,10,10)
- game.Debris:AddItem(sphereeffect, 3.8)
- coroutine.wrap(function()
- local sound = Instance.new("Sound", sphereeffect)
- sound.SoundId = "rbxassetid://182981587"
- sound.Volume = 1
- sound.PlaybackSpeed = 0.5
- sound:Play()
- game.Debris:AddItem(sound, 3.8)
- end)()
- coroutine.wrap(function()
- for i = 1,20 do
- sphereeffect.Transparency = sphereeffect.Transparency + 0.05
- sphereeffect.Size = sphereeffect.Size - Vector3.new(0.5,0.5,0.5)
- runservice.Stepped:wait()
- end
- end)()
- local invisff = Instance.new("ForceField", character)
- invisff.Visible = false
- invisff.Name = "AntiExplosionFF"
- character.Parent = ScreenGui0
- remote:FireClient(owner, "ghostlocal")
- elseif WHAT == "unghostmeplease" then
- ghosted = false
- if character:findFirstChild("AntiExplosionFF") then
- character.AntiExplosionFF:destroy()
- end
- local sphereeffect = Instance.new("Part", workspace)
- sphereeffect.Material = "Neon"
- sphereeffect.Shape = "Ball"
- sphereeffect.Anchored = true
- sphereeffect.CanCollide = false
- sphereeffect.CFrame = VALUE * CFrame.new(0,-1.5,0)
- sphereeffect.Size = Vector3.new(6,6,6)
- game.Debris:AddItem(sphereeffect, 4)
- coroutine.wrap(function()
- local sound = Instance.new("Sound", sphereeffect)
- sound.SoundId = "rbxassetid://171399373"
- sound.Volume = 1
- sound.PlaybackSpeed = 0.8
- sound:Play()
- game.Debris:AddItem(sound, 4)
- end)()
- coroutine.wrap(function()
- for i = 1,20 do
- sphereeffect.Transparency = sphereeffect.Transparency + 0.05
- sphereeffect.Size = sphereeffect.Size + Vector3.new(0.3,0.3,0.3)
- runservice.Stepped:wait()
- end
- end)()
- remote:FireClient(owner, "unghostlocal")
- character.Parent = workspace
- elseif WHAT == "invisiblemepls" then
- visible = false
- if workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")") then
- workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")"):destroy()
- end
- local sphereeffect = Instance.new("Part", workspace)
- sphereeffect.Material = "ForceField"
- sphereeffect.Shape = "Ball"
- sphereeffect.Anchored = true
- sphereeffect.Name = "GhostVisibilityEffect"
- sphereeffect.CanCollide = false
- sphereeffect.CFrame = VALUE * CFrame.new(0,-1.5,0)
- sphereeffect.Size = Vector3.new(10,10,10)
- coroutine.wrap(function()
- for i = 1,20 do
- sphereeffect.Transparency = sphereeffect.Transparency + 0.05
- sphereeffect.Size = sphereeffect.Size - Vector3.new(0.5,0.5,0.5)
- runservice.Stepped:wait()
- end
- sphereeffect:destroy()
- end)()
- remote:FireClient(owner, "invisiblelocal")
- elseif WHAT == "visiblemepls" then
- visible = true
- local sphereeffect = Instance.new("Part", workspace)
- sphereeffect.Material = "ForceField"
- sphereeffect.Shape = "Ball"
- sphereeffect.Anchored = true
- sphereeffect.Name = "GhostVisibilityEffect"
- sphereeffect.CanCollide = false
- sphereeffect.CFrame = VALUE * CFrame.new(0,-1.5,0)
- sphereeffect.Size = Vector3.new(1,1,1)
- coroutine.wrap(function()
- for i = 1,20 do
- sphereeffect.Transparency = sphereeffect.Transparency + 0.05
- sphereeffect.Size = sphereeffect.Size + Vector3.new(0.5,0.5,0.5)
- runservice.Stepped:wait()
- end
- sphereeffect:destroy()
- end)()
- remote:FireClient(owner, "visiblelocal")
- elseif WHAT == "humanoidbody" then
- bodytype = "Humanoid"
- if workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")") then
- workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")"):destroy()
- end
- local sphereeffect = Instance.new("Part", workspace)
- sphereeffect.Material = "Neon"
- sphereeffect.Shape = "Ball"
- sphereeffect.BrickColor = BrickColor.Black()
- sphereeffect.Anchored = true
- sphereeffect.Name = "GhostModeEffect"
- sphereeffect.CanCollide = false
- sphereeffect.CFrame = VALUE * CFrame.new(0,-1.5,0)
- sphereeffect.Size = Vector3.new(10,10,10)
- coroutine.wrap(function()
- local sound = Instance.new("Sound", sphereeffect)
- sound.SoundId = "rbxassetid://34320976"
- sound.Volume = 1
- sound:Play()
- end)()
- coroutine.wrap(function()
- for i = 1,20 do
- sphereeffect.Transparency = sphereeffect.Transparency + 0.05
- sphereeffect.Size = sphereeffect.Size - Vector3.new(0.5,0.5,0.5)
- runservice.Stepped:wait()
- end
- wait(1.5)
- sphereeffect:destroy()
- end)()
- remote:FireClient(owner, "humanoidedbody")
- elseif WHAT == "ghostbody" then
- bodytype = "Ghost"
- if workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")") then
- workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")"):destroy()
- end
- local sphereeffect = Instance.new("Part", workspace)
- sphereeffect.Material = "Neon"
- sphereeffect.Shape = "Ball"
- sphereeffect.BrickColor = BrickColor.Black()
- sphereeffect.Anchored = true
- sphereeffect.Name = "GhostModeEffect"
- sphereeffect.CanCollide = false
- sphereeffect.CFrame = VALUE * CFrame.new(0,-1.5,0)
- sphereeffect.Size = Vector3.new(10,10,10)
- coroutine.wrap(function()
- local sound = Instance.new("Sound", sphereeffect)
- sound.SoundId = "rbxassetid://34320976"
- sound.Volume = 1
- sound:Play()
- end)()
- coroutine.wrap(function()
- for i = 1,20 do
- sphereeffect.Transparency = sphereeffect.Transparency + 0.05
- sphereeffect.Size = sphereeffect.Size - Vector3.new(0.5,0.5,0.5)
- runservice.Stepped:wait()
- end
- wait(1.5)
- sphereeffect:destroy()
- end)()
- remote:FireClient(owner, "ghostedbody")
- end
- end
- end)
- while wait() do
- if ghosted then
- if visible then
- if not workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")") then
- Instance.new("Model", workspace).Name = "GH0ST ("..string.lower(owner.Name)..")"
- if bodytype == "Humanoid" then
- local human0id = Instance.new("Humanoid", workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")"))
- human0id.Died:connect(function()
- human0id.Parent:destroy()
- end)
- end
- end
- local model = workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")")
- for i,v in pairs(character:GetChildren()) do
- local found = nil
- for q,w in pairs(model:GetChildren()) do
- if v.Name == w.Name then
- if v.ClassName == "Accessory" or v.ClassName == "Hat" then
- found = v
- end
- if bodytype == "Humanoid" then
- if v.ClassName == "CharacterMesh" or v.ClassName == "ShirtGraphic" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- found = v
- end
- end
- end
- end
- if found == nil then
- if v.ClassName == "Accessory" or v.ClassName == "Hat" then
- if v:findFirstChild("Handle") then
- local handdle = v.Handle
- local hatt = Instance.new("Accessory", model)
- hatt.Name = v.Name
- local limb = Instance.new("SpawnLocation", hatt)
- limb.Neutral = false
- limb.Name = "Handle"
- limb.Size = handdle.Size
- limb.CFrame = handdle.CFrame
- if bodytype == "Ghost" then
- limb.Material = "Glass"
- limb.Transparency = 0.9
- elseif bodytype == "Humanoid" then
- limb.Material = handdle.Material
- limb.Transparency = handdle.Transparency
- end
- limb.BrickColor = handdle.BrickColor
- limb.CanCollide = false
- limb:SetNetworkOwner(owner)
- if v.Handle:findFirstChildOfClass("SpecialMesh") then
- v.Handle:findFirstChildOfClass("SpecialMesh"):Clone().Parent = limb
- end
- end
- elseif bodytype == "Humanoid" then
- if v.ClassName == "CharacterMesh" or v.ClassName == "ShirtGraphic" or v.ClassName == "Shirt" or v.ClassName == "Pants" then
- v:Clone().Parent = model
- end
- end
- end
- end
- for i,v in pairs(character:GetDescendants()) do
- local found = nil
- for q,w in pairs(model:GetDescendants()) do
- if v.Name == w.Name then
- if v.ClassName == "Part" or v.ClassName == "MeshPart" then
- found = v
- end
- end
- end
- if found == nil then
- if v.ClassName == "Part" or v.ClassName == "MeshPart" then
- if v.Name == "Handle" and v.Parent.ClassName ~= "Tool" then return end
- local limb = Instance.new("SpawnLocation", model)
- limb.Neutral = false
- limb.Name = v.Name
- limb.Size = v.Size
- limb.CFrame = v.CFrame
- if bodytype == "Ghost" then
- limb.Material = "Glass"
- limb.Transparency = 0.9
- elseif bodytype == "Humanoid" then
- limb.Material = v.Material
- limb.Transparency = v.Transparency
- end
- limb.BrickColor = v.BrickColor
- limb.CanCollide = false
- limb:SetNetworkOwner(owner)
- if v.Name == "Head" then
- if bodytype == "Humanoid" then
- if character.Head:findFirstChildOfClass("Decal") then
- character.Head:findFirstChildOfClass("Decal"):Clone().Parent = limb
- end
- end
- if v:findFirstChildOfClass("SpecialMesh") then
- v:findFirstChildOfClass("SpecialMesh"):Clone().Parent = limb
- end
- end
- end
- end
- end
- else
- if workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")") then
- workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")"):destroy()
- end
- end
- else
- if workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")") then
- workspace:findFirstChild("GH0ST ("..string.lower(owner.Name)..")"):destroy()
- end
- end
- end
Add Comment
Please, Sign In to add comment