Advertisement
V3rmLua33

Bear animation

Mar 14th, 2015
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.86 KB | None | 0 0
  1. local lp = game.Players.LocalPlayer
  2. local chr = lp.Character
  3. local mouse = lp:GetMouse()
  4. local euler = CFrame.fromEulerAnglesXYZ
  5. local rad = math.rad
  6. local trso = chr.Torso
  7. local la = Instance.new("Weld",chr['Left Arm'])
  8. la.Part0=chr['Left Arm']
  9. la.Part1=chr.Torso
  10. la.C0=CFrame.new(1.5,0,0)
  11. local rot = 0
  12.  
  13. local ContentProvider = Game:GetService("ContentProvider")
  14.  
  15. local function LoadAssets(AssetList)
  16.     -- Takes an asset list and preloads it. Will not wait for them to load.
  17.  
  18.     for _, AssetId in pairs(AssetList) do
  19.         ContentProvider:Preload("http://www.roblox.com/asset/?id=" .. AssetId)
  20.     end
  21. end
  22.  
  23. LoadAssets({203654824, 192187815, 179678714, 8329686, 187990139})
  24.  
  25.  
  26.  
  27.  
  28. if chr:FindFirstChild("Shirt") then
  29. chr.Shirt:destroy()
  30. end
  31.  
  32. if chr:FindFirstChild("Pants") then
  33. chr.Pants:destroy()
  34. end
  35.  
  36. colors = chr['Body Colors']
  37.  
  38. colors.HeadColor = BrickColor.new("Brown")
  39. colors.TorsoColor = BrickColor.new("Brown")
  40. colors.LeftArmColor = BrickColor.new("Brown")
  41. colors.RightArmColor = BrickColor.new("Brown")
  42. colors.LeftLegColor = BrickColor.new("Brown")
  43. colors.RightLegColor = BrickColor.new("Brown")
  44.  
  45.  
  46. local face = chr.Head:FindFirstChild("face")
  47.  
  48. if face then
  49. face.Texture = "http://www.roblox.com/asset/?id=8329686"
  50. end
  51.  
  52. for i,v in pairs(chr:children()) do
  53.     if v.ClassName == "Hat" then
  54.         print(v.Name.." has been removed, #baldforbieber")
  55.         v:destroy()
  56.     end
  57. end
  58.  
  59.  
  60.  
  61.  
  62.  
  63. local hd = Instance.new("Weld",chr.Head)
  64. hd.Part0=chr.Head
  65. hd.Part1=chr.Torso
  66. hd.C0=CFrame.new(0,-1.5,0)
  67.  
  68.  
  69. hum = chr.Humanoid
  70.  
  71.  
  72.  
  73. function CreateMesh(parent, id, x, y, z, texture)
  74. local m=Instance.new("SpecialMesh", parent)
  75. m.MeshType = "FileMesh"
  76. m.MeshId="http://www.roblox.com/asset/?id="..id
  77. if texture ~= nil then
  78. m.TextureId="http://www.roblox.com/asset/?id="..texture
  79. end
  80. m.Scale = Vector3.new(x,y,z)
  81. end
  82.  
  83. Microphone=function()
  84. mic = Instance.new("Part", chr)
  85. CreateMesh(mic, 43996479, 0.3, 0.3, 0.3, 43997070)
  86. mic.Name = "Microphone"
  87. mic.Locked = true
  88. mic.BrickColor = BrickColor.new("Lime green")
  89. mic.CanCollide=true
  90. mic.Size=Vector3.new(1,1,1)
  91. micw = Instance.new("Weld",mic)
  92. micw.Part0=mic
  93. micw.Part1=chr['Left Arm']
  94. micw.C0=CFrame.new(0,0,0)
  95. micw.C1=euler(rad(0),rad(0),rad(0))
  96. end
  97.  
  98. Hat=function()
  99. hat = Instance.new("Part", chr)
  100. CreateMesh(hat, 1028713, 1, 1, 1)
  101. hat.Name = "Top hat"
  102. hat.Locked = true
  103. hat.BrickColor = BrickColor.new("Lime green")
  104. hat.CanCollide=true
  105. hat.Size=Vector3.new(1,1,1)
  106. hatw = Instance.new("Weld",hat)
  107. hatw.Part0=hat
  108. hatw.Part1=chr['Head']
  109. hatw.C0=CFrame.new(0,-0.7,0)
  110. hatw.C1=euler(rad(0),rad(0),rad(0))
  111. end
  112.  
  113. Hat()
  114. Microphone()
  115.  
  116.  
  117. function Name(msg)
  118.         if hat.Parent then
  119.         pcall(function()
  120.         local Gui = Instance.new('BillboardGui', hat)
  121.         Gui.ExtentsOffset = Vector3.new(0,1.5,0)
  122.         Gui.Size = UDim2.new(0,200,0,300)
  123.         local Frame = Instance.new('Frame',Gui)
  124.         Frame.BackgroundTransparency = 1
  125.         Frame.Size = UDim2.new(1,0,1,0)
  126.         local Txt = Instance.new('TextLabel',Frame)
  127.         Txt.BackgroundTransparency = 1
  128.         Txt.Size = UDim2.new(1,0,1,0)
  129.         Txt.Font = 'ArialBold'
  130.         Txt.FontSize = 'Size24'
  131.         Txt.Text = msg
  132.         Txt.TextColor3 = BrickColor.new("Really blue").Color
  133.         Txt.TextStrokeColor3 = Color3.new(0/255,0/255,0/255)
  134.         Txt.TextStrokeTransparency = .5
  135.         Txt.TextWrapped = true
  136.         Txt.TextScaled = false
  137.         end)
  138.         else
  139.         end
  140. end
  141.  
  142. function Chat(msg) -- Credit to jillmiles1, kthxbye
  143.         if hat.Parent then
  144.         pcall(function()
  145.         if hat:FindFirstChild("Fazbear Chat Gui") then
  146.         hat['Fazbear Chat Gui']:destroy()
  147.         end
  148.         local Gui = Instance.new('BillboardGui', hat)
  149.         Gui.Name = "Fazbear Chat Gui"
  150.         Gui.ExtentsOffset = Vector3.new(0,3,0)
  151.         Gui.Size = UDim2.new(0,200,0,300)
  152.         local Frame = Instance.new('Frame',Gui)
  153.         Frame.BackgroundTransparency = 1
  154.         Frame.Size = UDim2.new(1,0,1,0)
  155.         local Txt = Instance.new('TextLabel',Frame)
  156.         Txt.BackgroundTransparency = 1
  157.         Txt.Size = UDim2.new(1,0,1,0)
  158.         Txt.Font = 'ArialBold'
  159.         Txt.Name = "ChatGui"
  160.         Txt.FontSize = 'Size24'
  161.         Txt.Text = ''
  162.         Txt.TextColor3 = BrickColor.new("Really red").Color
  163.         Txt.TextStrokeColor3 = Color3.new(0/255,0/255,0/255)
  164.         Txt.TextStrokeTransparency = .5
  165.         Txt.TextWrapped = true
  166.         Txt.TextScaled = false
  167.         delay(wait(),function()
  168.                 for v = 1, #msg do
  169.                         Txt.Text=string.sub(msg,1,v)
  170.                         wait(.07)
  171.                 end;
  172.                 wait(1)
  173.                 for v = 1, #Txt.Text do
  174.                         Txt.Text=string.sub(msg,-1,v)
  175.                         wait(.05)
  176.                 end;
  177.                 Gui:remove()
  178.         end)
  179.         end)
  180.         else
  181.         end
  182. end
  183.  
  184.  
  185. local crouch = function()
  186.  la.C1=euler(rad(-90),rad(0),rad(0))
  187.  hd.C1=euler(rad(0),rad(-3),rad(10))
  188.  micw.C1=euler(rad(0),rad(0),rad(0))
  189.  micw.C0=CFrame.new(0,-1,0)
  190.  la.C0=CFrame.new(1.5,-.5,-.5)
  191. end
  192.  
  193. local stand = function()
  194.  la.C1=euler(rad(0),rad(0),rad(0))
  195.   hd.C1=euler(rad(0),rad(0),rad(0))
  196.   micw.C1=euler(rad(180),rad(0),rad(0))
  197.  la.C0=CFrame.new(1.5,0,0)
  198.  micw.C0=CFrame.new(0,-1,0)
  199. end
  200.  
  201. function PlaySound(id, pitch, looped)
  202.         epicsound = Instance.new("Sound")
  203.         epicsound.Name = "FazbearSound"
  204.   epicsound.SoundId = "rbxassetid://"..id
  205.      epicsound.Volume = 1
  206.      epicsound.Pitch = pitch
  207.      if looped == nil then
  208.      looped = true
  209.      else
  210.      looped = looped
  211.      end
  212.      wait()
  213.   epicsound.Looped = looped
  214.   epicsound.Parent = workspace
  215.   if epicsound.SoundId=="rbxassetid://tt" then -- TELL ME, TELL ME, WHERE DA FREAKS AT!
  216.       epicsound.SoundId="rbxassetid://181158033"
  217.   elseif epicsound.SoundId=="rbxassetid://fabulous" then -- FA-FA-FABULOUS!
  218.       epicsound.SoundId="rbxassetid://191819419"
  219.      elseif epicsound.SoundId=="rbxassetid://ufdb" then -- ultimate final death battle(fairy tail XD)
  220.          epicsound.SoundId="rbxassetid://153085393"
  221.         elseif epicsound.SoundId=="rbxassetid://nnm" then
  222.            epicsound.SoundId="rbxassetid://210189234"
  223.        elseif epicsound.SoundId=="rbxassetid://tun" then -- tunak tunak tun
  224.            epicsound.SoundId="rbxassetid://162682002"
  225.        elseif epicsound.SoundId=="rbxassetid://zelda" then
  226.            epicsound.SoundId="rbxassetid://158215156"
  227.        elseif epicsound.SoundId=="rbxassetid://cc" then
  228.            epicsound.SoundId="rbxassetid://177080835"
  229.      end
  230.   es=epicsound:clone()
  231.   es:Stop()
  232.   es.Parent = chr.Torso
  233.   wait()
  234.   es:Play()
  235. end
  236.  
  237. hum.WalkSpeed=100
  238. hum.MaxHealth = math.huge
  239. hum.Health = math.huge
  240.  
  241.  
  242. lp.Chatted:connect(function(msg)
  243.         Chat(msg)
  244. end)
  245.  
  246. goldie=true
  247. crouch()
  248.  
  249. function StopMusic()
  250.     if chr.Torso:FindFirstChild("FazbearSound") then
  251.         if chr.Torso.FazbearSound.ClassName == "Sound" then
  252.             chr.Torso.FazbearSound:Stop()
  253.             wait()
  254.             chr.Torso.FazbearSound:Destroy()
  255.         end
  256.     end
  257. end
  258.  
  259. Name("T13R ONE")
  260.  
  261.  
  262. mouse.KeyDown:connect(function(key)
  263. if key == "g" then
  264. if goldie==false then
  265. goldie=true
  266. crouch()
  267. elseif goldie==true then
  268. goldie=false
  269. stand()
  270. end
  271. elseif key == "r" then -- Plays a song
  272. StopMusic()
  273. PlaySound(203654824, 1, true)
  274. Chat("Now Playing: The Show Must Go On - FNAF | 203654824")
  275. elseif key == "f" then -- Plays a song
  276. StopMusic()
  277. PlaySound(192187815, 1, true)
  278. Chat("Now Playing: Fnaf 2: It's Been so Long | 192187815")
  279. elseif key == "l" then -- Plays a laugh
  280. StopMusic()
  281. PlaySound(179678714, 0.39, false)
  282. Chat("*laugh*")
  283. elseif key == "v" then -- Plays a scream
  284. StopMusic()
  285. PlaySound(193107910, 1, false)
  286. Chat("*screams*")
  287. elseif key == "q" then -- Stops any sound(s) playing from your torso
  288. StopMusic()
  289. Chat("All sounds stopped!")
  290. end
  291. end)
  292.  
  293.  
  294.  
  295. hum.Died:connect(function()
  296.     es.Pitch = 10
  297.     wait()
  298.     es:Pause()
  299.     es:Stop()
  300.     es.Name = "Ded"
  301.     wait()
  302.     es:Destroy()
  303. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement