Advertisement
TheFlamingBlaster

tv

Apr 24th, 2016
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. -- FlameTV, a tv which you control, and can load animations and stuffz, can't really find else much to put here
  2. -- If you're seeing this, and you don't know who TheFlamingBlaster is, get out dirty fmer!
  3. debounceframe = false
  4.  
  5. local player = game.Players.LocalPlayer
  6. local tv = Instance.new("Model",workspace) tv.Name = "TV"
  7. tvpart = Instance.new("Part",tv) tvpart.Locked = true tvpart.Size = Vector3.new(25,15,1) tvpart.Anchored = true tvpart.Name = "TV"
  8. 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
  9. local displaygui = Instance.new("SurfaceGui",tvpart) displaygui.Adornee = tvpart
  10. local controlgui = Instance.new("SurfaceGui",player.PlayerGui) controlgui.Adornee = plrcontrolpart
  11. 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
  12. 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)
  13. 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)
  14.  
  15. function OnDestroyed()
  16. wait(0.01)
  17. tvpart.Parent = tv
  18. end
  19. function OnDestroyedModel()
  20. wait(0.01)
  21. tv.Parent = workspace
  22. end
  23. function OnDestroyedScript()
  24. wait(0.01)
  25. tv:Destroy()
  26. end
  27. script.AncestryChanged:connect(OnDestroyedScript)
  28. tv.AncestryChanged:connect(OnDestroyedModel)
  29. tvpart.AncestryChanged:connect(OnDestroyed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement