Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- FlameTV, a tv which you control, and can load animations and stuffz, can't really find else much to put here
- -- If you're seeing this, and you don't know who TheFlamingBlaster is, get out dirty fmer!
- debounceframe = false
- local player = game.Players.LocalPlayer
- local tv = Instance.new("Model",workspace) tv.Name = "TV"
- tvpart = Instance.new("Part",tv) tvpart.Locked = true tvpart.Size = Vector3.new(25,15,1) tvpart.Anchored = true tvpart.Name = "TV"
- local plrcontrolpart = Instance.new("Part",workspace.CurrentCamera) plrcontrolpart.Anchored = true plrcontrolpart.Locked = true plrcontrolpart.Size = Vector3.new(25, 15, 1.06) plrcontrolpart.CFrame = tvpart.CFrame
- local displaygui = Instance.new("SurfaceGui",tvpart) displaygui.Adornee = tvpart
- local controlgui = Instance.new("SurfaceGui",player.PlayerGui) controlgui.Adornee = plrcontrolpart
- function opt(obj) local sizecontrol = Instance.new("TextButton",controlgui) sizecontrol.Size = UDim2.new(00,100,0,50) sizecontrol.Text = "Adjust size" sizecontrol.Position = UDim2.new(00,0,0,550) local sizeframe = Instance.new("Frame",controlgui) sizeframe.Size = UDim2.new(0,100,0,200) sizeframe.Position = UDim2.new(0,0,0,350) sizeframe.Visible = false local adjustbox = Instance.new("TextBox",sizeframe) adjustbox.Text = "Adjust size to a UDim2 value." adjustbox.Size = UDim2.new(1,0,0.25,0) local adjustbutton = Instance.new("TextButton",sizeframe) adjustbutton.Size = UDim2.new(1,0,0.25,0) adjustbutton.Position = UDim2.new(0,0,0.25,0) adjustbutton.Text = "Adjust Sound to Above" adjustbutton.MouseButton1Down:connect(function() local sound = Instance.new("Sound",tvpart) sound.SoundId = ("http://www.roblox.com/asset/?id="..adjustbox.Text) sound.Volume = 1 sound:Play() end) sizecontrol.MouseButton1Down:connect(function() if sizeframe.Visible == false then sizeframe.Visible = true else sizeframe.Visible = false end end) end
- local copy = coroutine.create(function() while true do displaygui:ClearAllChildren() for index, child in pairs(controlgui:GetChildren()) do local clone = child:Clone() clone.Parent = displaygui if child:IsA("TextButton") then clone.AutoButtonColor = false end if child:IsA("Frame") or child:IsA("TextBox") then clone.Active = false end end wait(0.01) end end) coroutine.resume(copy)
- local superbutton = Instance.new("TextButton",controlgui) superbutton.Size = UDim2.new(0,150,0,50) superbutton.Text = "Generate draggable frame. " superbutton.MouseButton1Down:connect(function()if debounceframe == false then debounceframe = true local frame = Instance.new("Frame",controlgui) frame.Draggable = true frame.Active = true frame.Position = UDim2.new(0.5,0,0.5,0) frame.Size = UDim2.new(0,100,0,100) frame.BackgroundColor = BrickColor.Random() opt(frame) end end)
- function OnDestroyed()
- wait(0.01)
- tvpart.Parent = tv
- end
- function OnDestroyedModel()
- wait(0.01)
- tv.Parent = workspace
- end
- function OnDestroyedScript()
- wait(0.01)
- tv:Destroy()
- end
- script.AncestryChanged:connect(OnDestroyedScript)
- tv.AncestryChanged:connect(OnDestroyedModel)
- tvpart.AncestryChanged:connect(OnDestroyed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement