Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- poem = nil
- resources = {
- GlitchAudio = "rbxassetid://333430981";
- BMusicAudio = "rbxassetid://1234948361";--edit this sound id for the background music
- poem1 = [[
- null
- qxoo
- oxqq
- llun
- ]];
- poem2 = [[
- My sunshine,
- my only sunshine
- ]];
- poem3 = [[
- null
- Example: To crypt D (of value 3), add the shift 3
- ]];
- }
- firstperson = false
- lp = game.Players.LocalPlayer
- char = lp.Character
- glitchsound = Instance.new("Sound",char.Head)
- backgroundmusic = Instance.new("Sound",char.Head)
- glitchsound.SoundId = resources.GlitchAudio
- backgroundmusic.SoundId = resources.BMusicAudio
- backgroundmusic.Looped = true
- backgroundmusic:Play()
- function speak(text)
- model = Instance.new("Model",workspace)
- part = Instance.new("Part",model)
- part.Size = Vector3.new(1,1,1)
- part.CanCollide = false
- part.Anchored = true
- part.Position = char.Head.Position
- part.BrickColor = BrickColor.new("Lavender")
- part.Name = "Head"
- hum = Instance.new("Humanoid",model)
- clicktodelete = Instance.new("ClickDetector",part)
- clicktodelete.MouseClick:connect(function()
- model:Destroy()
- poem = nil
- end)
- for a=1, string.len(text) do
- wait(0.01)
- model.Name = string.sub(text,1,a)
- end
- while true do
- wait(0.01)
- part.Position = char.Head.Position
- end
- end
- lp.Chatted:connect(function(msg)
- chance = math.random(1,5)
- if chance == 2 then
- speak(string.reverse(msg))
- else
- speak(msg)
- end
- end)
- function glitchcam()
- glitchsound:Play()
- camera = workspace.CurrentCamera
- fov = camera.FieldOfView
- cce = Instance.new("ColorCorrectionEffect",game.Lighting)
- cce.Name = "glitcheffect"
- for i=1, 10 do
- wait(0.01)
- camera.FieldOfView = math.random(50,80)
- cce.Brightness = math.random()
- cce.Contrast = math.random()
- cce.Saturation = math.random()
- cce.TintColor = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
- end
- game:GetService("Debris"):AddItem(cce,1)
- cce:Destroy()
- camera.FieldOfView = fov
- get = game.Lighting:GetChildren()
- for i=1, #get do
- wait(0.01)
- if get[i].Name == "glitcheffect" then
- get[i]:Destroy()
- end
- end
- end
- function onKeyPress(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Enum.KeyCode.Q then
- glitchcam()
- end
- if inputObject.KeyCode == Enum.KeyCode.P then
- if firstperson then
- firstperson = false
- else
- firstperson = true
- end
- end
- if inputObject.KeyCode == Enum.KeyCode.Z then
- poem = resources["poem"..math.random(1,3)]
- speak("I made a poem for you. Let me read it:\n"..poem)
- end
- end
- game:GetService("UserInputService").InputBegan:connect(onKeyPress)
- while true do
- wait(0.01)
- if firstperson then
- workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
- workspace.CurrentCamera.CFrame = char.Head.CFrame
- else
- workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement