local plr = owner
local Player = owner
print('Local User is '..plr.Name)
local char = plr.Character
Character=plr.Character
local hum = char.Humanoid
local hed = char.Head
local root = char.HumanoidRootPart
local rootj = root.RootJoint
local tors = char.Torso
local ra = char["Right Arm"]
local la = char["Left Arm"]
local rl = char["Right Leg"]
local ll = char["Left Leg"]
local neck = tors["Neck"]
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
local maincolor = BrickColor.new("Institutional white")
local Sitt = false
local VALUE1 = false
-------------------------------------------------------
--Start Good Stuff--
-------------------------------------------------------
cam = game.Workspace.CurrentCamera
CF = CFrame.new
cf = CFrame.new
angles = CFrame.Angles
attack = false
Euler = CFrame.fromEulerAnglesXYZ
Rad = math.rad
IT = Instance.new
BrickC = BrickColor.new
Cos = math.cos
Acos = math.acos
Sin = math.sin
Asin = math.asin
Abs = math.abs
Mrandom = math.random
Floor = math.floor
-------------------------------------------------------
--Start HeartBeat--
-------------------------------------------------------
function CreateSound(Parent, ID, Volume, Pitch, Looped, EmitterSize, Position, Time, Start)
local NewSound = Instance.new("Sound")
if Parent ~= nil then
NewSound.Parent = Parent
else
local SoundPart = Instance.new("Part", workspace.Terrain)
SoundPart.Anchored = true
SoundPart.CanCollide = false
SoundPart.Transparency = 1
SoundPart.Size = Vector3.new(1, 1, 1)
SoundPart.Position = Position
NewSound.Parent = SoundPart
end
NewSound.SoundId = "rbxassetid://"..ID or 0
NewSound.EmitterSize = EmitterSize or 10
NewSound.Volume = Volume or 1
NewSound.TimePosition = Start or 0
NewSound.PlaybackSpeed = Pitch or 1
NewSound.Looped = Looped or false
NewSound.Playing = true
if NewSound.Looped == false and Time == nil then
game.Debris:AddItem(NewSound, NewSound.TimeLength + 5)
end
if Parent == nil and Time == nil then
game.Debris:AddItem(NewSound.Parent, NewSound.TimeLength + 5)
end
if Time then
game.Debris:AddItem(NewSound, Time)
end
return NewSound
end
function TweenAnimate(object, Aniim, time, easingstyle, easingdirection, repet, reverse, deelay)
local success, errorMessage = pcall(function()
local infos = TweenInfo.new(time, Enum.EasingStyle[easingstyle], Enum.EasingDirection[easingdirection], repet, reverse, deelay)
local tween = game:GetService("TweenService"):Create(object, infos, Aniim)
tween:Play()
return tween
end)
if not success then
warn("Error in TweenAnimate function: " .. errorMessage)
end
end
-------------------------------------------------------
--End HeartBeat--
-------------------------------------------------------
-------------------------------------------------------
--Start Important Functions--
-------------------------------------------------------
function swait(num)
if num == 0 or num == nil then
game:service("RunService").Stepped:wait(0)
else
for i = 0, num do
game:service("RunService").Stepped:wait(0)
end
end
end
local isChatFunctionRunning = false
function chatFunc2(Table)
if isChatFunctionRunning then return end
isChatFunctionRunning = true
task.spawn(function()
local msg = Table.msg or ""
local timr = Table.timr or 1
local size = Table.size or 14
local sound = Table.sound or 9125869797
local color = Table.color or Color3.new(1, 1, 1)
local color2 = Table.color2 or Color3.new(1, 0, 0)
local style = Table.style or "normal"
local font = Table.font or Enum.Font.GothamSemibold
local position = Table.position or Vector3.new(0, 2.5, 2)
if not Head then
isChatFunctionRunning = false
return
end
if not msg or msg == "" then
isChatFunctionRunning = false
return
end
local namebillboard = Head:FindFirstChild("NameBillboardText")
if namebillboard then
namebillboard:Destroy()
end
namebillboard = Instance.new("BillboardGui")
namebillboard.Size = UDim2.new(0, 0, 0, 0)
namebillboard.Name = "NameBillboardText"
namebillboard.StudsOffset = position
namebillboard.Parent = hed
local textt = Instance.new("TextBox")
textt.BackgroundTransparency = 1
textt.Name = "textt"
textt.TextWrapped = true
textt.TextSize = size
textt.TextScaled = true
textt.Font = font
textt.Text = ""
textt.TextStrokeTransparency = 0
textt.TextStrokeColor3 = color
textt.TextColor3 = color2
textt.Size = UDim2.new(1, 0, 1, 0)
textt.Parent = namebillboard
TweenAnimate(namebillboard, {Size = UDim2.new(6, 0, 1, 0)}, 0.5, 'Bounce', 'Out', 0, false, 0)
if style == "bold" then
textt.Font = Enum.Font.GothamBold
elseif style == "italic" then
textt.Font = Enum.Font.GothamItalic
end
local displayText = ""
for i = 1, string.len(msg) do
displayText = string.sub(msg, 1, i)
textt.Text = "「 " .. displayText .. " 」"
CreateSound(Torso, sound, 1, math.random(10, 15) / 10)
task.wait(0.05)
end
if Table.AnimateColor then
TweenAnimate(textt, {TextColor3 = color2}, 0.5, 'Linear', 'Out', 0, false, 0)
end
TweenAnimate(textt, {TextStrokeTransparency = 1, TextTransparency = 1}, 0.5, 'Quad', 'InOut', 0, false, 0)
TweenAnimate(namebillboard, {Size = UDim2.new(0, 0, 0, 0)}, 0.5, 'Bounce', 'Out', 0, false, 0)
task.wait(0.5)
namebillboard:Destroy()
isChatFunctionRunning = false
end)
end
Player.Chatted:connect(function(message)
chatFunc2({
msg = message,
timr = 2,
size = 18,
sound = 6571814729,
color = Color3.fromRGB(0, 0, 0),
color2 = Color3.fromRGB(170, 85, 255),
style = "bold",
font = Enum.Font.GothamBold,
position = Vector3.new(0, 3, 0),
animateColor = true
})
end)