
Key Required

--! WARNING: This is a LocalScript. Place in StarterPlayerScripts.
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Teams = game:GetService("Teams")
-- CONFIGURATION
local TARGET_TEAM_NAME = "Bear"
local idleId = "83908479237351"
local walk1Id = "124585569030444"
local walk2Id = "93100534714641"
local sizeX, sizeY = 10.3, 11
local studsOffsetY = 2
-- SETUP
local plr = Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hrp = char:WaitForChild("HumanoidRootPart")
local effectsApplied = false
local playerSound
local ball
-- CLEANUP
local function cleanupEffects()
if hrp and hrp:FindFirstChild("BillboardGui") then
hrp.BillboardGui:Destroy()
end
if playerSound then
playerSound:Stop()
playerSound:Destroy()
playerSound = nil
end
if ball then
ball:Destroy()
ball = nil
end
end
-- APPLY EFFECTS (only once)
local function applyEffects()
if effectsApplied or not hrp then return end
effectsApplied = true
-- Billboard setup
local gui = hrp:FindFirstChild("BillboardGui")
if gui and gui:FindFirstChild("Idle") and gui:FindFirstChild("Walk1") and gui:FindFirstChild("Walk2") then
gui.Idle.Image = "http://www.roblox.com/asset/?id=" .. idleId
gui.Walk1.Image = "http://www.roblox.com/asset/?id=" .. walk1Id
gui.Walk2.Image = "http://www.roblox.com/asset/?id=" .. walk2Id
gui.Size = UDim2.new(sizeX, 0, sizeY, 0)
gui.StudsOffset = Vector3.new(0, studsOffsetY, 0)
end
-- Bear sound
playerSound = Instance.new("Sound")
playerSound.Name = "BearSound"
playerSound.SoundId = "rbxassetid://85527550800653"
playerSound.Parent = hrp
playerSound.PlaybackSpeed = 0.8
playerSound.Volume = 0.75
playerSound.Looped = true
playerSound:Play()
-- Floating red orb
ball = Instance.new("Part")
ball.Shape = Enum.PartType.Ball
ball.Size = Vector3.new(2, 2, 2)
ball.BrickColor = BrickColor.new("Persimmon")
ball.Material = Enum.Material.Neon
ball.Anchored = true
ball.CanCollide = false
ball.Parent = workspace
local pointLight = Instance.new("PointLight")
pointLight.Color = Color3.new(1, 0, 0)
pointLight.Range = 10
pointLight.Brightness = 2
pointLight.Parent = ball
RunService.Heartbeat:Connect(function()
if ball and hrp then
local offset = Vector3.new(3, 3, 0)
local rotatedOffset = hrp.CFrame:VectorToWorldSpace(offset)
ball.CFrame = hrp.CFrame + rotatedOffset
end
end)
end
-- TEAM CHANGE HANDLER
local function handleTeamChange()
if not plr.Team then return end
if plr.Team.Name == TARGET_TEAM_NAME then
applyEffects()
else
cleanupEffects()
end
end
-- INITIALIZE
handleTeamChange()
plr.TeamChanged:Connect(function()
handleTeamChange()
end)
plr.CharacterAdded:Connect(function(newChar)
char = newChar
hrp = char:WaitForChild("HumanoidRootPart")
if effectsApplied then
-- Keep effects active after respawn
local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://85527550800653"
sound.Parent = hrp
sound.PlaybackSpeed = 0.8
sound.Volume = 0.75
sound.Looped = true
sound:Play()
end
end)
plr.CharacterRemoving:Connect(function()
if not effectsApplied then
cleanupEffects()
end
end)No comments yet for this script.



