Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 4

local r15Emotes = {

["JiggyLeanBack"]="10714010337",
["RightFootLeftStomp"]="4049037604",
['Robot']='10714372526',
['SkiptyWiptyDoo']='10714076981',
['Breakdance']='10214311282',
['Zesty']='11444443576',
['Spinny']='10713981723',
['Jerk']='4555782893',
['clapSpread']='4555808220',
['robot2']='10714392151',
['TheFeels']='12874447851',
['NasXCountry']='5915712534',
['UdzalSummon']='10714177846',
['Hype']='10714369624',
['Monkey']='10714388352',
}

--local R6Dances = {"27789359", "30196114", "248263260", "45834924", "33796059",


"28488254", "52155728"}
local danceId
local dance
local danceTrack
local isDancing = false

local function getCurrentDance()


danceId = nil
local humanoid = game.Players.LocalPlayer.Character and
game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")
for _, v in pairs(animator:GetPlayingAnimationTracks()) do
danceId = tostring(v.Animation.AnimationId):gsub("rbxassetid://","")
end

return danceId
end

local tabCount =0
local function tablecount(tab)
tabCount = 0
for i,v in pairs(tab) do
tabCount = tabCount + 1
end
return tabCount
end

local function randTable(tab)


local num = math.random(1,tablecount(tab))

local alsoNum = 0
for i,v in pairs(tab) do
alsoNum = alsoNum + 1
if alsoNum == num then
return tab[i]
end
end
end

if game.CoreGui:FindFirstChild("FreeEmote") then

game.CoreGui:FindFirstChild("FreeEmote"):Destroy()
end

local FreeEmote = Instance.new("ScreenGui")


local MainFrame = Instance.new("Frame")
local UICorner = Instance.new("UICorner")
local UIGridLayout = Instance.new("UIGridLayout")
local Cell = Instance.new("Frame")
local CellBtn = Instance.new("TextButton")
local UIPadding = Instance.new("UIPadding")
local UICorner_2 = Instance.new("UICorner")

FreeEmote.Name = "FreeEmote"
FreeEmote.Parent = game.CoreGui
FreeEmote.Enabled = false
FreeEmote.ZIndexBehavior = Enum.ZIndexBehavior.Global

MainFrame.Name = "MainFrame"
MainFrame.Parent = FreeEmote
MainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
MainFrame.BackgroundTransparency = 0.400
MainFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
MainFrame.BorderSizePixel = 0
MainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
MainFrame.Size = UDim2.new(0, 600, 0, 600)

UICorner.CornerRadius = UDim.new(0, 12)


UICorner.Parent = MainFrame

UIGridLayout.Parent = MainFrame
UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIGridLayout.CellPadding = UDim2.new(0, 12, 0, 12)
UIGridLayout.CellSize = UDim2.new(0.150000006, 0, 0.150000006, 0)

Cell.Name = "Cell"
Cell.BackgroundColor3 = Color3.fromRGB(54, 54, 54)
Cell.BackgroundTransparency = 0.300
Cell.BorderColor3 = Color3.fromRGB(0, 0, 0)
Cell.BorderSizePixel = 0
Cell.Size = UDim2.new(0, 100, 0, 100)

CellBtn.Name = "CellBtn"
CellBtn.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
CellBtn.BackgroundTransparency = 1.000
CellBtn.BorderColor3 = Color3.fromRGB(0, 0, 0)
CellBtn.BorderSizePixel = 0
CellBtn.Size = UDim2.new(1, 0, 1, 0)
CellBtn.Font = Enum.Font.Gotham
CellBtn.Text = ""
CellBtn.TextColor3 = Color3.fromRGB(245, 245, 245)
CellBtn.TextSize = 14.000
CellBtn.TextWrapped = true

--cell
local function CreateCell(txt)
cell2 = Cell:Clone()
cell2.Parent = MainFrame

cellButton = CellBtn:Clone()
cellButton.Parent = cell2
cellButton.Text = txt

cellButton.MouseEnter:Connect(function()
Cell.BackgroundTransparency = 0
end)
cellButton.MouseLeave:Connect(function()
Cell.BackgroundTransparency = 0.3
end)
cellButton.MouseButton1Up:Connect(function()
if isDancing then danceTrack:Stop(0) isDancing=false danceTrack=nil end
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://"..r15Emotes[txt]
danceTrack =
game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid"):LoadAnimation
(animation)
danceTrack.Looped = true
danceTrack:Play()
isDancing = true
end)

UIPadding.Parent = cellButton
UIPadding.PaddingBottom = UDim.new(0, 1)
UIPadding.PaddingLeft = UDim.new(0, 1)
UIPadding.PaddingRight = UDim.new(0, 1)
UIPadding.PaddingTop = UDim.new(0, 1)

UICorner_2.CornerRadius = UDim.new(0, 12)


UICorner_2.Parent = Cell
end

for i,_ in pairs(r15Emotes) do


CreateCell(i)
end

--change if moved

local pos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.p


local oldCF = Vector3.new(math.ceil(pos.X),math.ceil(pos.Y),math.ceil(pos.Z))

task.spawn(function()
while task.wait() do
local pos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.p
if oldCF ~= Vector3.new(math.ceil(pos.X),math.ceil(pos.Y),math.ceil(pos.Z))
then
if isDancing then danceTrack:Stop(0.25) isDancing=false danceTrack=nil
end
oldCF = Vector3.new(math.ceil(pos.X),math.ceil(pos.Y),math.ceil(pos.Z))
end
end
end)

local UserInputService = game:GetService("UserInputService")


UserInputService.InputBegan:Connect(function(input,chat)
if not chat and input.KeyCode == Enum.KeyCode.L then
FreeEmote.Enabled = not FreeEmote.Enabled
end
end)

You might also like