Dance Potion
Key Required

Dance Potion

Brookhaven 🏡RPcheedabob333cheedabob333 22.9K views 79 executesUpdated May 1, 2025
Unrated
00
Lua Script•70 lines (2093 chars)
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:FindFirstChildOfClass("Humanoid")
local function InstanceTool()
	local tool = Instance.new("Tool", player.Backpack)
	tool.Name = "DiscoPotion"
	tool.TextureId = "11031105791"
	local handle = Instance.new("Part", tool)
	handle.Size = Vector3.new(1,1.2,1)
	handle.Name = "Handle"
	local mesh = Instance.new("SpecialMesh", handle)
	mesh.MeshId = "http://www.roblox.com/asset/?id=27808002"
	mesh.TextureId = "http://www.roblox.com/asset/?id=27808058"
	local discosound = Instance.new("Sound", handle)
	discosound.Name = "Disco"
	discosound.SoundId = "rbxassetid://27808972"
	discosound.Looped = true
	discosound.RollOffMaxDistance = 1562.5
	discosound.RollOffMinDistance = 15.625
	discosound.RollOffMode = Enum.RollOffMode.Inverse
	local equipsound = Instance.new("Sound", handle)
	equipsound.Name = "Equip"
	equipsound.SoundId = "http://www.roblox.com/asset/?id=27809960"
	equipsound.Looped = false
	equipsound.RollOffMaxDistance = 15625.003
	equipsound.RollOffMinDistance = 15.625
	equipsound.RollOffMode = Enum.RollOffMode.Inverse
	local danceloop = Instance.new("Animation", tool)
	danceloop.Name = "DanceLoop"
	danceloop.AnimationId = "http://www.roblox.com/asset/?id=27789359"
	local dance = humanoid:LoadAnimation(danceloop)
	dance.Looped = true
	local dancing = false
	tool.Equipped:Connect(function()
		equipsound:Play()
	end)
	tool.Activated:Connect(function()
		if dancing == false then
			dancing = true
			dance:Play()
			discosound:Play()
		end
	end)
	tool.Unequipped:Connect(function()
		if dancing == true then
			dancing = false
			dance:Stop()
			discosound:Stop()
		end
	end)
	humanoid.Running:Connect(function(walkspeed)
		if walkspeed > 0 then
			if dancing == true then
				dancing = false
				dance:Stop()
				discosound:Stop()
			end
		end
	end)
end
if humanoid.RigType == Enum.HumanoidRigType.R6 then
	InstanceTool()
end

humanoid.Died:Connect(function()
	wait(game.Players.RespawnTime + 1)
	if humanoid.RigType == Enum.HumanoidRigType.R6 then
		InstanceTool()
	end
end)

Features & Information

This script gives player a dance potion

Community Comments (0)

No comments yet for this script.

More Scripts for Brookhaven 🏡RP