Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do print("made for bacon")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
- --Draw something, put your sound id in, and watch the light show!--
- --Enjoy lads.--
- Player=game:GetService("Players").LocalPlayer
- Character=Player.Character
- Character.Humanoid.Name = "noneofurbusiness"
- hum = Character.noneofurbusiness
- LeftArm=Character["Left Arm"]
- LeftLeg=Character["Left Leg"]
- RightArm=Character["Right Arm"]
- RightLeg=Character["Right Leg"]
- Root=Character["HumanoidRootPart"]
- Head=Character["Head"]
- Torso=Character["Torso"]
- Neck=Torso["Neck"]
- removeuseless = game:GetService("Debris")
- soundIsPlaying = false
- number = 0
- stop = false
- flatt = false
- standingg = true
- tf = 0
- idrewsomething = false
- tab2={}
- tab={}
- blue = false
- red = true
- green = false
- drawingallowed = true
- MseGuide = true
- RunSrv = game:GetService("RunService")
- RenderStepped = game:GetService("RunService").RenderStepped
- local HEADLERP = Instance.new("ManualWeld")
- HEADLERP.Parent = Head
- HEADLERP.Part0 = Head
- HEADLERP.Part1 = Head
- HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- OrgnC0 = Neck.C0
- local movelimbs = coroutine.wrap(function()
- while RunSrv.RenderStepped:wait() do
- TrsoLV = Torso.CFrame.lookVector
- Dist = nil
- Diff = nil
- if not MseGuide then
- print("l")
- else
- local _, Point = Workspace:FindPartOnRay(Ray.new(Head.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
- Dist = (Head.CFrame.p-Point).magnitude
- Diff = Head.CFrame.Y-Point.Y
- local _, Point2 = Workspace:FindPartOnRay(Ray.new(LeftArm.CFrame.p, mouse.Hit.lookVector), Workspace, false, true)
- Dist2 = (LeftArm.CFrame.p-Point).magnitude
- Diff2 = LeftArm.CFrame.Y-Point.Y
- HEADLERP.C0 = CFrame.new(0, -1.5, -0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
- Neck.C0 = Neck.C0:lerp(OrgnC0*CFrame.Angles((math.tan(Diff/Dist)*1), 0, (((Head.CFrame.p-Point).Unit):Cross(Torso.CFrame.lookVector)).Y*1), .1)
- end
- end
- end)
- movelimbs()
- godmode = coroutine.wrap(function()---- so you don't get killed by fucking random things
- while true do
- hum.MaxHealth = math.huge
- wait(0.0000001)
- hum.Health = math.huge
- wait()
- end
- end)
- godmode()
- ff = Instance.new("ForceField", Character)
- ff.Visible = false
- coroutine.wrap(function()
- mouse.Button1Down:connect(function()
- if drawingallowed then
- fo = false
- while true do
- if fo then break end
- idrewsomething = true
- brick = Instance.new("Part",Character)
- brick.Anchored = true
- brick.Material = "Neon"
- brick.CanCollide = false
- brick.BrickColor = BrickColor.new("Really black")
- brick.Size = Vector3.new(1,1,1)
- brick.CFrame = CFrame.new(mouse.Hit.p)
- table.insert(tab2,brick)
- light = Instance.new("PointLight", brick)
- light.Color = brick.BrickColor.Color
- light.Range = 0
- light.Enabled = true
- light.Shadows = true
- light.Brightness = 0
- table.insert(tab,light)
- wait()
- end
- end
- end)
- end)()
- coroutine.wrap(function()
- mouse.Button1Up:connect(function()
- if drawingallowed then
- fo = true
- end
- end)
- end)()
- ---GUI---
- screenGui = Instance.new("ScreenGui")
- screenGui.Parent = script.Parent
- frame = Instance.new("Frame")
- frame.Parent = screenGui
- frame.Position = UDim2.new(0, 8, 0, 225)
- frame.Size = UDim2.new(0, 250, 0, 200)
- frame.BackgroundColor3 = BrickColor.new("White").Color
- frame.BackgroundTransparency = .5
- textButton = Instance.new("TextButton")
- textButton.Parent = screenGui
- textButton.Position = UDim2.new(0, 12, 0, 400)
- textButton.Size = UDim2.new(0, 50, 0, 10)
- textButton.BackgroundColor3 = BrickColor.new("Really red").Color
- textButton.Text = "Red"
- textButton.MouseButton1Down:connect(function()
- red = true
- green = false
- blue = false
- rainbow = false
- smooth = false
- end)
- textButton2 = Instance.new("TextButton")
- textButton2.Parent = screenGui
- textButton2.Position = UDim2.new(0, 75, 0, 400)
- textButton2.Size = UDim2.new(0, 50, 0, 10)
- textButton2.BackgroundColor3 = BrickColor.new("Really blue").Color
- textButton2.Text = "Blue"
- textButton2.MouseButton1Down:connect(function()
- red = false
- green = false
- blue = true
- rainbow = false
- smooth = false
- end)
- textButton3 = Instance.new("TextButton")
- textButton3.Parent = screenGui
- textButton3.Position = UDim2.new(0, 138, 0, 400)
- textButton3.Size = UDim2.new(0, 50, 0, 10)
- textButton3.BackgroundColor3 = BrickColor.new("Lime green").Color
- textButton3.Text = "Green"
- textButton3.MouseButton1Down:connect(function()
- red = false
- green = true
- blue = false
- rainbow = false
- smooth = false
- end)
- textButton4 = Instance.new("TextButton")
- textButton4.Parent = screenGui
- textButton4.Position = UDim2.new(0, 201, 0, 400)
- textButton4.Size = UDim2.new(0, 50, 0, 10)
- coroutine.wrap(function()
- while true do
- textButton4.BackgroundColor3 = BrickColor.Random().Color
- wait(.05)
- end
- end)()
- textButton4.Text = "Rainbow"
- textButton4.MouseButton1Down:connect(function()
- red = false
- green = false
- blue = false
- rainbow = true
- smooth = false
- end)
- textBox = Instance.new("TextBox")
- textBox.Parent = screenGui
- textBox.Position = UDim2.new(0, 58, 0, 280)
- textBox.Size = UDim2.new(0, 150, 0, 20)
- textBox.BackgroundColor3 = BrickColor.new("White").Color
- textBox.Text = "Type Sound Id here"
- form = Instance.new("TextButton")
- form.Parent = screenGui
- form.TextScaled = true
- form.Position = UDim2.new(0, 114, 0, 305)
- form.Size = UDim2.new(0, 40, 0, 20)
- form.BackgroundColor3 = BrickColor.new("White").Color
- form.Text = "Up"
- form.MouseButton1Down:connect(function()
- if standingg then
- standingg = false
- flatt = true
- form.Text = "Flat"
- elseif flatt then
- flatt = false
- standingg = true
- form.Text = "Up"
- end
- end)
- coroutine.wrap(function()
- while wait() do
- sid = textBox.Text
- end
- end)()
- playbutton = Instance.new("TextButton")
- playbutton.Parent = screenGui
- playbutton.Position = UDim2.new(0, 58, 0, 305)
- playbutton.Size = UDim2.new(0, 50, 0, 20)
- playbutton.BackgroundColor3 = BrickColor.new("White").Color
- playbutton.Text = "Play"
- playbutton.MouseButton1Down:connect(function()
- if not idrewsomething then return end
- if soundIsPlaying then
- sound1:Remove()
- sound1 = Instance.new("Sound", Character)
- sound1.Looped = true
- sound1.SoundId = "http://www.roblox.com/asset/?id=" .. sid
- sound1:Play()
- else
- soundIsPlaying = true
- vol.Text = 1
- pitch.Text = 1
- sound1 = Instance.new("Sound", Character)
- coroutine.wrap(function()
- while soundIsPlaying do
- wait()
- sound1.Volume = svol
- end
- end)()
- sound1.Looped = true
- coroutine.wrap(function()
- while soundIsPlaying do
- sound1.Pitch = pitchh
- wait()
- end
- end)()
- sound1.SoundId = "http://www.roblox.com/asset/?id=" .. sid
- sound1:Play()
- coroutine.wrap(function()
- while sound1.IsPlaying and soundIsPlaying do
- for i,v in pairs(tab) do
- v.Enabled = true
- v.Brightness = sound1.PlaybackLoudness/19
- v.Range = sound1.PlaybackLoudness/15
- if red then
- v.Color = Color3.new(sound1.PlaybackLoudness/200, 0,0)
- elseif blue then
- v.Color = Color3.new(0, 0,sound1.PlaybackLoudness/200)
- elseif green then
- v.Color = Color3.new(0, sound1.PlaybackLoudness/200,0)
- elseif rainbow then
- v.Color = brick.BrickColor.Color
- end
- end
- wait()
- end
- end)()
- while sound1.IsPlaying and soundIsPlaying do
- workspace.CurrentCamera.FieldOfView = 70 - sound1.PlaybackLoudness/100
- bcol = brick.BrickColor
- for _,v in pairs(tab2) do
- if standingg then
- v.Size = Vector3.new(1, sound1.PlaybackLoudness/math.random(10,25), 1)
- elseif flatt then
- v.Size = Vector3.new(sound1.PlaybackLoudness/math.random(10,25), 1, 1)
- end
- if red then
- v.BrickColor = BrickColor.new(Color3.new(sound1.PlaybackLoudness/200, 0,0))
- elseif blue then
- v.BrickColor = BrickColor.new(Color3.new(0,0,sound1.PlaybackLoudness/200))
- elseif green then
- v.BrickColor = BrickColor.new(Color3.new(0,sound1.PlaybackLoudness/200,0))
- elseif rainbow then
- v.BrickColor = BrickColor.Random()
- end
- end
- wait()
- end
- end
- end)
- local stopbutton = Instance.new("TextButton")
- stopbutton.Parent = screenGui
- stopbutton.Position = UDim2.new(0, 158, 0, 305)
- stopbutton.Size = UDim2.new(0, 50, 0, 20)
- stopbutton.BackgroundColor3 = BrickColor.new("White").Color
- stopbutton.Text = "Stop"
- vol = Instance.new("TextBox")
- vol.Parent = screenGui
- vol.Position = UDim2.new(0, 58, 0, 330)
- vol.Size = UDim2.new(0, 50, 0, 20)
- vol.BackgroundColor3 = BrickColor.new("White").Color
- vol.Text = "Volume"
- coroutine.wrap(function()
- while wait() do
- svol = vol.Text
- end
- end)()
- local remove = Instance.new("TextButton")
- remove.Parent = screenGui
- remove.Position = UDim2.new(0, 108, 0, 370)
- remove.Size = UDim2.new(0, 50, 0, 20)
- remove.BackgroundColor3 = BrickColor.new("White").Color
- remove.Text = "Clean"
- pitch = Instance.new("TextBox")
- pitch.Parent = screenGui
- pitch.Position = UDim2.new(0, 158, 0, 330)
- pitch.Size = UDim2.new(0, 50, 0, 20)
- pitch.BackgroundColor3 = BrickColor.new("White").Color
- pitch.Text = "Pitch"
- coroutine.wrap(function()
- while wait() do
- pitchh = pitch.Text
- end
- end)()
- pitchup = Instance.new("ImageButton")
- pitchup.Parent = screenGui
- pitchup.Position = UDim2.new(0, 131, 0, 327)
- pitchup.BackgroundTransparency = 1
- pitchup.Size = UDim2.new(0, 25, 0, 25)
- pitchup.Image = "rbxassetid://29563813"
- pitchup.MouseButton1Down:connect(function()
- if soundIsPlaying then
- pitch.Text = pitch.Text + .1
- end
- end)
- pitchdown = Instance.new("ImageButton")
- pitchdown.Parent = screenGui
- pitchdown.Rotation = 180
- pitchdown.Position = UDim2.new(0, 211, 0, 327)
- pitchdown.BackgroundTransparency = 1
- pitchdown.Size = UDim2.new(0, 25, 0, 25)
- pitchdown.Image = "rbxassetid://29563813"
- pitchdown.MouseButton1Down:connect(function()
- if soundIsPlaying then
- pitch.Text = pitch.Text - .1
- end
- end)
- remove.MouseButton1Down:connect(function()
- if idrewsomething then
- if soundIsPlaying then
- soundIsPlaying = false
- workspace.CurrentCamera.FieldOfView = 70
- woosh = Instance.new("Sound",Character)
- woosh.Volume = 2
- woosh.SoundId = "rbxasstid://215402014"
- woosh:Play()
- sound1:Stop()
- pitch.Text = "Pitch"
- vol.Text = "Volume"
- removeuseless:AddItem(woosh,2)
- for _,v in pairs(tab2) do
- v:Remove()
- end
- idrewsomething = false
- elseif not soundIsPlaying then
- soundIsPlaying = false
- woosh = Instance.new("Sound",Character)
- woosh.Volume = 2
- woosh.SoundId = "rbxasstid://215402014"
- woosh:Play()
- for _,v in pairs(tab2) do
- v:Remove()
- end
- idrewsomething = false
- end
- end
- end)
- local day = Instance.new("TextButton")
- day.Parent = screenGui
- day.Position = UDim2.new(0, 50, 0, 370)
- day.Size = UDim2.new(0, 50, 0, 20)
- day.BackgroundColor3 = BrickColor.new("Bright yellow").Color
- day.Text = "Day"
- day.MouseButton1Down:connect(function()
- daytime = true
- nighttime = false
- turnon = Instance.new("Sound",Character)
- turnon.SoundId = "rbxassetid://858896518"
- turnon.Volume = 1
- turnon.Pitch = 1.05
- turnon:Play()
- removeuseless:AddItem(turnon,2)
- coroutine.wrap(function()
- while daytime do
- game.Lighting.TimeOfDay = 12
- game.Lighting.GlobalShadows = true
- game.Lighting.Ambient = Color3.fromRGB(10,10,10)
- game.Lighting.Brightness = 1
- wait()
- end
- end)()
- end)
- local night = Instance.new("TextButton")
- night.Parent = screenGui
- night.Position = UDim2.new(0, 165, 0, 370)
- night.Size = UDim2.new(0, 50, 0, 20)
- night.BackgroundColor3 = BrickColor.new("Really black").Color
- night.TextColor = BrickColor.new("White")
- night.Text = "Night"
- night.MouseButton1Down:connect(function()
- daytime = false
- nighttime = true
- turnoff = Instance.new("Sound",Character)
- turnoff.SoundId = "rbxassetid://858896518"
- turnoff.Volume = 1
- turnoff.Pitch = .9
- turnoff:Play()
- removeuseless:AddItem(turnoff,2)
- coroutine.wrap(function()
- while nighttime do
- game.Lighting.TimeOfDay = 0
- game.Lighting.GlobalShadows = false
- game.Lighting.Ambient = Color3.new(0,0,0)
- game.Lighting.Brightness = 0
- wait()
- end
- end)()
- end)
- volumeup = Instance.new("ImageButton")
- volumeup.Parent = screenGui
- volumeup.Position = UDim2.new(0, 29, 0, 327)
- volumeup.BackgroundTransparency = 1
- volumeup.Size = UDim2.new(0, 25, 0, 25)
- volumeup.Image = "rbxassetid://29563813"
- volumeup.MouseButton1Down:connect(function()
- if soundIsPlaying then
- vol.Text = vol.Text + 1
- end
- end)
- volumedown = Instance.new("ImageButton")
- volumedown.Parent = screenGui
- volumedown.Rotation = 180
- volumedown.Position = UDim2.new(0, 111, 0, 327)
- volumedown.BackgroundTransparency = 1
- volumedown.Size = UDim2.new(0, 25, 0, 25)
- volumedown.Image = "rbxassetid://29563813"
- Supr14 = Instance.new("ImageLabel")
- Supr14.Parent = screenGui
- Supr14.Rotation = 0
- Supr14.Position = UDim2.new(0, 13, 0, 222)
- Supr14.BackgroundTransparency = 1
- Supr14.Size = UDim2.new(0, 240, 0, 60)
- Supr14.Image = "rbxassetid://1815697653"
- volumedown.MouseButton1Down:connect(function()
- if soundIsPlaying then
- vol.Text = vol.Text - 1
- end
- end)
- stopbutton.MouseButton1Down:connect(function()
- if idrewsomething then
- if soundIsPlaying then
- sound1:Remove()
- soundIsPlaying = false
- workspace.CurrentCamera.FieldOfView = 70
- pitch.Text = "Pitch"
- vol.Text = "Volume"
- for i,v in pairs(tab) do
- v.Enabled = false
- end
- for i = 1, 10 do
- for _,v in pairs(tab2) do
- v.BrickColor = BrickColor.new("Really black")
- v.Size = v.Size - Vector3.new(0,15,0)
- end
- wait()
- end
- end
- end
- end)
- print("Drawing visualiser!, Made by Supr14")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement