-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVIDEO PLAYER.lua
More file actions
90 lines (76 loc) · 2.33 KB
/
VIDEO PLAYER.lua
File metadata and controls
90 lines (76 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
--boombox video player
-- -padero
if getgenv().STOP then getgenv().STOP() task.wait(1) end
if not isfile('videodatae.txt') then return print('video data not found (make sure its inside the workspace folder)') end
local vdata = readfile('videodatae.txt')
data = vdata:split('N')
local ArtificialHB = Instance.new("BindableEvent")
ArtificialHB.Name = "Heartbeat"
local tf = 0
local allowframeloss = false
local tossremainder = false
local lastframe = tick()
local fram = 1/20
ArtificialHB:Fire()
local hb = game:GetService('RunService').Heartbeat:Connect(function(s, p) --allows for movie framerate consistency regardless of the local framerate, same reason why its used on serversided animation scripts
tf = tf + s
if tf >= fram then
if allowframeloss then
ArtificialHB:Fire()
lastframe = tick()
else
for i = 1, math.floor(tf / fram) do
ArtificialHB:Fire()
end
lastframe = tick()
end
if tossremainder then
tf = 0
else
tf = tf - fram * math.floor(tf / fram)
end
end
end)
local plr = game:GetService('Players').LocalPlayer
local backpack = plr.Backpack
local chr = plr.Character or plr.CharacterAdded:Wait()
local boombox;
local boomboxes = {"SuperFlyGoldBoombox","BoomBox", 'BoomboxYellow'}
for _,v in ipairs(boomboxes) do
boombox = backpack:FindFirstChild(v) or chr:FindFirstChild(v) or boombox
end
if not boombox then return print('no boombox, cant play') end
if boombox.Parent ~= chr then
chr:FindFirstChildOfClass('Humanoid'):EquipTool(boombox)
end
local slave = boombox:FindFirstChildOfClass('RemoteEvent',true)
local scriptz = boombox:FindFirstChildOfClass('LocalScript',true)
local scriptdata = decompile(scriptz)
local thing = string.find(scriptdata, 'PenguinAttack')
for _=0,30 do print('\n') end
print([[
starting in 3 seconds...
]])
task.wait(3)
--sound:Play()
local stop=false
getgenv().STOP = function() stop = true end
game:GetService("NetworkClient"):SetOutgoingKBPSLimit(math.huge)
local dt = 0
for _,frame in ipairs(data) do
local parsed = frame:gsub('%|','\n')
if stop == true then
break;
end
if thing then
slave:FireServer('PlaySong',('\n'):rep(10)..parsed..'\n\n\n\n')
else
slave:FireServer(('\n'):rep(10)..parsed..'\n\n\n')
end
ArtificialHB.Event:Wait()
end
--screengui:Destroy()
hb:Disconnect()
ArtificialHB:Destroy()
stop = nil
getgenv().STOP = nil