SHOW:
|
|
- or go back to the newest paste.
1 | - | --ffghjkgh67 |
1 | + | --credit: KrystalTeam |
2 | - | |
2 | + | local twerksrc = [[ |
3 | - | --Script Builder Radio! |
3 | + | function clerp(a,b,t) |
4 | - | |
4 | + | local qa = {QuaternionFromCFrame(a)} |
5 | - | local Player = game.Players.LocalPlayer |
5 | + | |
6 | - | local c = Player.Character |
6 | + | local qb = {QuaternionFromCFrame(b)} |
7 | - | if not c or not c.Parent then |
7 | + | |
8 | - | c = Player.CharacterAdded:wait() |
8 | + | local ax, ay, az = a.x, a.y, a.z |
9 | ||
10 | - | |
10 | + | local bx, by, bz = b.x, b.y, b.z |
11 | - | wait(1) |
11 | + | |
12 | - | |
12 | + | local _t = 1-t |
13 | - | local radio = Instance.new("Part",c) |
13 | + | |
14 | - | radio.Name = "Radio" |
14 | + | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) |
15 | - | radio.CanCollide = false |
15 | + | |
16 | - | radio.Anchored = true |
16 | + | |
17 | - | radio.FormFactor = "Custom" |
17 | + | function QuaternionFromCFrame(cf) |
18 | - | radio.Size = Vector3.new(3.2, 1.43, 0.8) |
18 | + | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() |
19 | - | radio.CFrame = c.Torso.CFrame * CFrame.new(0,0,.8) |
19 | + | |
20 | - | radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,3.15,0) |
20 | + | local trace = m00 + m11 + m22 |
21 | - | radio.CFrame = radio.CFrame * CFrame.fromEulerAnglesXYZ(0,0,-.7) |
21 | + | if trace > 0 then |
22 | - | |
22 | + | local s = math.sqrt(1 + trace) |
23 | - | local mesh = Instance.new("SpecialMesh",radio) |
23 | + | |
24 | - | mesh.MeshId = "http://www.roblox.com/asset/?id=151760030" |
24 | + | local recip = 0.5/s |
25 | - | mesh.TextureId = "https://www.roblox.com/Sweg-item?id=156708131" |
25 | + | |
26 | - | |
26 | + | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 |
27 | - | local weld = Instance.new("Weld",radio) |
27 | + | else |
28 | - | weld.Part0 = c.Torso |
28 | + | local i = 0 |
29 | - | weld.Part1 = radio |
29 | + | |
30 | - | weld.C0 = c.Torso.CFrame:inverse() |
30 | + | if m11 > m00 then |
31 | - | weld.C1 = radio.CFrame:inverse() |
31 | + | |
32 | - | radio.Anchored = false |
32 | + | i = 1 |
33 | - | |
33 | + | |
34 | - | local sound = Instance.new("Sound",radio) |
34 | + | end |
35 | - | sound.Name = "Music" |
35 | + | if m22 > (i == 0 and m00 or m11) then |
36 | - | sound.Looped = true |
36 | + | |
37 | - | sound.Volume = 1 |
37 | + | i = 2 |
38 | - | |
38 | + | |
39 | - | local gui = Instance.new("ScreenGui",Player.PlayerGui) |
39 | + | end |
40 | - | |
40 | + | if i == 0 then |
41 | - | local frame = Instance.new("Frame",gui) |
41 | + | local s = math.sqrt(m00-m11-m22+1) |