StarzoZero

Roblox Baldi Script v4

Jan 4th, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.06 KB | None | 0 0
  1. -- This script has been converted to FE by StarzoZero
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by StarzoZero")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. --[[ Baldi ]]--
  88. -------------------------------------------------------
  89. --[[
  90.  
  91. This script was created by WafflesAreVeryGood.
  92. ATTACKS
  93. _______
  94.  
  95.  
  96. --]]
  97. -------------------------------------------------------
  98. --[[ Reference ]]--
  99. --[[
  100. Burn Function
  101. hurt(char.Head, 15, "Burn", {char, {Color = Color3.new(0,1,1), Time = 1, Rate = 20, Damage = {1,5}}})
  102.  
  103. Freeze Function
  104. hurt(char.Head, 0, "Freeze", {char, 1})
  105.  
  106. Stun Function
  107. hurt(char.Head, 0, "Stun", {char, 0.2})
  108. --]]
  109. -------------------------------------------------------
  110. math.randomseed(tick())
  111. print("You are using a script created by WafflesAreVeryGood!")
  112. warn("--------Global Message--------")
  113. warn(game:GetService("MarketplaceService"):GetProductInfo(1720721621).Description)
  114. warn("------------------------------")
  115. --[[Changeable Variables]]--
  116. local settings = {}
  117. --ShowDamage settings
  118. settings.Damage = {
  119. Color = nil,
  120. StrokeColor = nil,
  121. Font = nil,
  122. }
  123. settings.AttackMenu = false
  124. settings.ShowDamageEnabled = false
  125. settings.CustomAnim = false
  126. local soundlist = {
  127. HardHit1 = "rbxassetid://565207203",
  128. HardHit2 = "rbxassetid://541909913",
  129. HardHit3 = "rbxassetid://541909983",
  130. WeakHit1 = "rbxassetid://558642292",
  131. WeakHit2 = "rbxassetid://541907812",
  132. Slice1 = "rbxassetid://260429964",
  133. Slice2 = "rbxassetid://260430015",
  134. Explosion1 = "rbxassetid://138186576",
  135. Explosion2 = "rbxassetid://157878578",
  136. Woosh1 = "rbxassetid://541909867",
  137. Woosh2 = "rbxassetid://541909763",
  138. Freeze = "rbxassetid://268249319",
  139. Thaw = "rbxassetid://1578580965",
  140. Burn = "rbxassetid://298181829",
  141. OnDeath = "rbxassetid://1846449729",
  142. Background = "rbxassetid://1718183351",
  143. Ruler = "rbxassetid://1872130118",
  144. }
  145. local attack_data = {
  146. {
  147. Name = "Attack",
  148. Description = "Description",
  149. Key = "Key",
  150. },
  151.  
  152. }
  153.  
  154. --[[Important Variables]]--
  155. local plr = owner
  156. local char = plr.Character
  157. local input = game:GetService('UserInputService')
  158. ----
  159. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  160. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  161. local rs = torso["Right Shoulder"]
  162. local ls = torso["Left Shoulder"]
  163. local rh = torso["Right Hip"]
  164. local lh = torso["Left Hip"]
  165. local neck = torso.Neck
  166. local rj = rootpart["RootJoint"]
  167. local humanoid = char:FindFirstChildOfClass("Humanoid")
  168. ----
  169. local huge = Vector3.new(math.huge, math.huge, math.huge)
  170. local attacking = false
  171. local cananim = true
  172. local animpose = "Idle"
  173. local lastpose = animpose
  174. local movespeed = 0
  175. ----
  176. --[[ Anti-Decompile ]]--
  177. script.Parent = workspace.CurrentCamera
  178. game:GetService('Players').StarzoZero.CharacterAdded:connect(function()
  179. script:Destroy()
  180. end)
  181. --[[ Moves Gui ]]--
  182.  
  183. local mgui = Instance.new("ScreenGui")
  184. mgui.Name = "MovesGui"
  185. local bg = Instance.new("Frame")
  186. bg.BackgroundColor3 = Color3.new(61/255,61/255,61/255)
  187. bg.Position = UDim2.new(0,504,0,164)
  188. bg.Name = "Background"
  189. bg.Size = UDim2.new(-0.035,379,0,225)
  190. bg.Visible = false
  191. bg.Parent = mgui
  192. local container = Instance.new("ScrollingFrame")
  193. container.Name = "Container"
  194. container.BackgroundColor3 = Color3.new(70/255,70/255,70/255)
  195. container.BorderSizePixel = 0
  196. container.Visible = true
  197. container.Position = UDim2.new(0,16,0,46)
  198. container.Size = UDim2.new(0,132,0,162)
  199. container.CanvasSize = UDim2.new(0,0,0,10)
  200. container.ScrollBarThickness = 4
  201. container.Parent = bg
  202. local copy = Instance.new("TextButton")
  203. copy.Name = "Move"
  204. copy.BackgroundColor3 = Color3.new(77/255,77/255,77/255)
  205. copy.BorderSizePixel = 0
  206. copy.Position = UDim2.new(0,4,0,4)
  207. copy.Size = UDim2.new(0,118,0,29)
  208. copy.Font = "SourceSansLight"
  209. copy.Text = "Move Name"
  210. copy.TextColor3 = Color3.new(197/255,0,0)
  211. copy.TextSize = 20
  212. copy.Visible = false
  213. copy.Parent = container
  214. local atkinfo = container:Clone()
  215. for _,v in pairs(atkinfo:GetChildren()) do v:Destroy() end
  216. atkinfo.Name = "AtkInfo"
  217. atkinfo.Visible = true
  218. atkinfo.Position = UDim2.new(0,167,0,50)
  219. atkinfo.Size = UDim2.new(0,159,0,165)
  220. atkinfo.Parent = bg
  221. local movename = Instance.new("TextLabel")
  222. movename.Name = "MoveName"
  223. movename.BackgroundColor3 = Color3.new(77/255,77/255,77/255)
  224. movename.BorderSizePixel = 0
  225. movename.Position = UDim2.new(0,4,0,4)
  226. movename.Size = UDim2.new(0,150,0,30)
  227. movename.Font = "SourceSansLight"
  228. movename.TextColor3 = Color3.new(197/255,0,0)
  229. movename.TextSize = 20
  230. movename.Text = "same"
  231. movename.Parent = atkinfo
  232. local movedesc = movename:Clone()
  233. movedesc.Position = UDim2.new(0,4,0,47)
  234. movedesc.Size = UDim2.new(0,150,0,133)
  235. movedesc.Text = "Move Description"
  236. movedesc.TextSize = 18
  237. movedesc.Name = "MoveDesc"
  238. movedesc.TextXAlignment = "Left"
  239. movedesc.TextYAlignment = "Top"
  240. movedesc.TextWrapped = true
  241. movedesc.Parent = atkinfo
  242. local title = movedesc:Clone()
  243. title.Name = "Title"
  244. title.Font = "SourceSansLight"
  245. title.Text = "Moves List"
  246. title.TextSize = 28
  247. title.BackgroundColor3 = Color3.new(36/255,36/255,36/255)
  248. title.Position = UDim2.new(0,0,0,0)
  249. title.Size = UDim2.new(1,0,0,30)
  250. title.TextXAlignment = "Center"
  251. title.TextYAlignment = "Center"
  252. title.Parent = bg
  253. local toggle = copy:Clone()
  254. toggle.BackgroundColor3 = Color3.new(61/255,61/255,61/255)
  255. toggle.Position = UDim2.new(0,0,0,288)
  256. toggle.Size = UDim2.new(0,70,0,20)
  257. toggle.Visible = true
  258. toggle.Font = "SourceSans"
  259. toggle.Text = "Toggle Moves"
  260. toggle.Name = "Toggle"
  261. toggle.TextSize = 14
  262. toggle.Parent = mgui
  263. mgui.Parent = plr:FindFirstChildOfClass("PlayerGui")
  264. if settings.AttackMenu then
  265. mgui.Enabled = false
  266. end
  267. toggle.MouseButton1Click:connect(function()
  268. bg.Visible = not bg.Visible
  269. end)
  270. local pos = copy.Position -UDim2.new(0,0,0,29)
  271. for _,data in pairs(attack_data) do
  272. local new = copy:Clone()
  273. pos = pos +UDim2.new(0,0,0,29)
  274. container.CanvasSize = container.CanvasSize +UDim2.new(0,0,0,29)
  275. new.Position = pos
  276. new.Text = data.Name.."["..data.Key.."]"
  277. new.Visible = true
  278. spawn(function()
  279. swait()
  280. if not new.TextFits then
  281. new.TextScaled = true
  282. end
  283. end)
  284. new.Parent = container
  285. new.MouseButton1Click:connect(function()
  286. movename.Text = data.Name
  287. movedesc.Text = data.Description
  288. spawn(function()
  289. swait()
  290. if not movename.TextFits then
  291. movename.TextScaled = true
  292. else
  293. movename.TextScaled = false
  294. end
  295. if not movedesc.TextFits then
  296. movename.TextScaled = true
  297. else
  298. movename.TextScaled = false
  299. end
  300. end)
  301. end)
  302. end
  303. --[[ Functions ]]--
  304.  
  305. function addattack(keycode, func)
  306. if keycode ~= "MouseClick" then
  307. input.InputBegan:connect(function(inp)
  308. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  309. func()
  310. end
  311. end)
  312. else
  313. mouse.Button1Down:connect(function()
  314. func()
  315. end)
  316. end
  317. end
  318. function attackend(keycode, func)
  319. input.InputEnded:connect(function(inp)
  320. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  321. func()
  322. end
  323. end)
  324. end
  325. function swait(t)
  326. if t then
  327. for i = 0, t do
  328. game:GetService('RunService').Stepped:wait(0)
  329. end
  330. else
  331. game:GetService('RunService').Stepped:wait(0)
  332. end
  333. return true
  334. end
  335. function fade(obj, dest, grow)
  336. spawn(function()
  337. local oldcf = obj.CFrame
  338. for i = 0, 10 do
  339. if grow then
  340. obj.Size = obj.Size +Vector3.new(1,1,1)
  341. obj.CFrame = oldcf
  342. end
  343. obj.Transparency = obj.Transparency +0.1
  344. swait()
  345. end
  346. if dest then
  347. obj:Destroy()
  348. end
  349. end)
  350. end
  351. function replacejoint(name)
  352. local j = torso:FindFirstChild(name)
  353. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  354. if j then
  355. if true then
  356. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  357. local new = Instance.new("Weld")
  358. local c0 = j.C0
  359. local c1 = j.C1
  360. new.Part0 = j.Part0
  361. j.Part0 = nil
  362. new.Name = j.Name.." Replacement"
  363. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  364. new.Parent = j.Parent
  365. new.Part1 = j.Part1
  366. new.C0 = c0
  367. new.C1 = c1
  368. return new
  369. end
  370. end
  371. end
  372. function removejoint(name, fast)
  373. local j = torso:FindFirstChild(name.." Replacement")
  374. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  375. if j then
  376. local p0 = j.Part0
  377. if p0 ~= nil then
  378. local c0 = j.C0
  379. local c1 = j.C1
  380. j:Destroy()
  381. local new = p0:FindFirstChild(name)
  382. local ac0 = new.C0
  383. local ac1 = new.C1
  384. new.Part0 = p0
  385. new.C0 = c0
  386. new.C1 = c1
  387. spawn(function()
  388. if name ~= "RootJoint" then
  389. if not fast then
  390. for i = 0, 0.6, 0.1 do
  391. print(i)
  392. new.C0 = new.C0:Lerp(ac0, 0.5)
  393. new.C1 = new.C1:lerp(ac1, 0.5)
  394. swait()
  395. end
  396. else
  397. new.C0 = new.C0:Lerp(ac0, 1)
  398. new.C1 = new.C1:lerp(ac1, 1)
  399. end
  400. end
  401. end)
  402. end
  403. end
  404. end
  405. function fixalljoints(fast)
  406. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  407. removejoint(v, fast)
  408. end
  409. end
  410. function getnewjoints()
  411. local rs = replacejoint("Right Shoulder")
  412. local ls = replacejoint("Left Shoulder")
  413. local rh = replacejoint("Right Hip")
  414. local lh = replacejoint("Left Hip")
  415. local neck = replacejoint("Neck")
  416. local rj = replacejoint("RootJoint")
  417. return rs,ls,rh,lh,neck,rj
  418. end
  419. function knockback(hit, force)
  420. local bv = Instance.new("BodyVelocity")
  421. bv.MaxForce = huge
  422. bv.Velocity = force
  423. bv.Parent = hit
  424. game:GetService('Debris'):AddItem(bv, 0.15)
  425. end
  426. function soundeffect(id, volume, speed, parent, extra)
  427. extra = extra or {}
  428. local func = function()
  429. local s = LoadLibrary("RbxUtility").Create("Sound")()
  430. s.Name = "WSoundEffect"
  431. s.Volume = volume
  432. s.PlaybackSpeed = speed
  433. s.SoundId = id
  434. s.Looped = false
  435. if extra.Pitch then
  436. local ef = Instance.new("PitchShiftSoundEffect")
  437. ef.Octave = extra.Pitch or 1
  438. ef.Enabled = true
  439. ef.Priority = 0
  440. ef.Parent = s
  441. end
  442. s.Parent = parent
  443. if extra.Immune then
  444. Instance.new("StringValue", s).Name = "Immune"
  445. end
  446. s:Play()
  447. s.TimePosition = extra.Start or 0
  448. spawn(function()
  449. repeat swait() until not s.Playing or s.TimePosition >= (extra.End or 99999)
  450. s:Destroy()
  451. end)
  452. return s
  453. end
  454. if extra.ForceWait then
  455. func()
  456. else
  457. return spawn(func)
  458. end
  459. end
  460. function getfunction(nm)
  461. if nm == "Burn" then
  462. return function(character, data)
  463. if character:FindFirstChild("Burn") then
  464. return
  465. end
  466. local val = Instance.new("StringValue")
  467. val.Name = "Burn"
  468. val.Parent = character
  469. for i = 1, data.Time*100 do
  470. if not character:FindFirstChild("Burn") then
  471. break
  472. end
  473. if i%data.Rate == 0 then
  474. local hum = character:FindFirstChildOfClass("Humanoid")
  475. if hum then
  476. hurt(torso, data.Damage)
  477. end
  478. soundeffect(soundlist.Burn, 1, 1, torso)
  479. spawn(function()
  480. for i = 1, 4 do
  481. spawn(function()
  482. local p = Instance.new("Part")
  483. p.Material = "Neon"
  484. p.CanCollide = false
  485. p.Anchored = true
  486. p.Size = Vector3.new(0.5,0.5,0.5)
  487. p.Name = "fireeffect"
  488. p.Color = data.Color or Color3.new(1,162/255,0)
  489. p.CFrame = torso.CFrame *CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)
  490. p.Parent = torso
  491. local offset = CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360)))
  492. local endcf = CFrame.new(p.Position+Vector3.new(math.random(-10,10)/10,3,math.random(-10,10)/10))*offset
  493. local opcf = p.CFrame
  494. local opsz = p.Size
  495. for i = 0, 1, 0.01 do
  496. p.Transparency = i/1
  497. local cf = p.CFrame
  498. p.Size = opsz:Lerp(Vector3.new(0.05,0.05,0.05), i/1)
  499. p.CFrame = cf
  500. p.CFrame = opcf:Lerp( endcf*CFrame.Angles(math.rad(math.sin(i)*360),math.rad(math.cos(i)*360),math.rad(math.sin(i)*360)), i/1 )
  501. swait()
  502. end
  503. p:Destroy()
  504. swait(5)
  505. end)
  506. swait()
  507. end
  508. end)
  509. end
  510. swait()
  511. end
  512. val:Destroy()
  513. end
  514. end
  515. if nm == "Poison" then
  516. return function(character, data)
  517.  
  518. end
  519. end
  520. if nm == "Freeze" then
  521. return function(character, t)
  522. if not character:FindFirstChild("Frozen") then
  523. local val = Instance.new("StringValue")
  524. val.Name = "Frozen"
  525. val.Parent = character
  526. local unanchor = {}
  527. local freezeparts = {}
  528. soundeffect(soundlist.Freeze, 1, 3, character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso"))
  529. for _,v in pairs(character:GetDescendants()) do
  530. if v:IsA("BasePart") and v.Name ~= "freezepart" and v.Name ~= "fireeffect" then
  531. if v.Transparency ~= 1 then
  532. if not v.Anchored then
  533. table.insert(unanchor, v)
  534. end
  535. v.Anchored = true
  536. local new = v:Clone()
  537. new:ClearAllChildren()
  538. local mesh = v:FindFirstChildOfClass("SpecialMesh")
  539. if mesh then
  540. mesh = mesh:Clone()
  541. mesh.TextureId = ""
  542. if mesh.Scale ~= Vector3.new(1,1,1) then
  543. mesh.Scale = mesh.Scale +Vector3.new(0.05,0.05,0.05)
  544. end
  545. mesh.Parent = new
  546. end
  547. new.Size = new.Size+Vector3.new(0.05,0.05,0.05)
  548. new.CanCollide = false
  549. new.Anchored = true
  550. new.Name = "freezepart"
  551. new.Material = "Ice"
  552. new.BrickColor = BrickColor.new("Pastel light blue")
  553. new.TopSurface = "Smooth"
  554. new.BottomSurface = "Smooth"
  555. new.Transparency = 0
  556. new.CFrame = v.CFrame
  557. new.Parent = v
  558. table.insert(freezeparts, new)
  559. end
  560. end
  561. end
  562. swait(50*t)
  563. soundeffect(soundlist.Thaw, 1, 1, character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso"))
  564. val:Destroy()
  565. for _,v in pairs(unanchor) do
  566. v.Anchored = false
  567. end
  568. for _,v in pairs(freezeparts) do
  569. v.Anchored = false
  570. v.CanCollide = true
  571. v.Velocity = CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))).lookVector*25
  572. game:GetService('Debris'):AddItem(v, 5)
  573. end
  574. end
  575. end
  576. end
  577. if nm == "Stun" then
  578. return function(character, t)
  579. local humanoid = character:FindFirstChildOfClass("Humanoid")
  580. local val = Instance.new("StringValue")
  581. val.Name = "Stun"
  582. val.Parent = character
  583. if humanoid then
  584. humanoid.PlatformStand = true
  585. end
  586. for i = 1, t*100 do
  587. if humanoid then
  588. humanoid.PlatformStand = true
  589. end
  590. swait()
  591. end
  592. if humanoid then
  593. humanoid.PlatformStand = false
  594. end
  595. val:Destroy()
  596. end
  597. end
  598. if nm == "Paralyze" then
  599. return function(character, t)
  600.  
  601. end
  602. end
  603. return
  604. end
  605. function showdamage(cf, txtdata)
  606. --[[
  607. [Text Data]
  608. Font
  609. Text
  610. Color
  611. StrokeColor {NOTE: If strokecolor not provided, then will default the StrokeTransparency to 1}
  612. --]]
  613. local p = Instance.new("Part")
  614. p.Name = "DamagePart"
  615. p.CanCollide = false
  616. p.Anchored = true
  617. p.Transparency = 1
  618. p.Size = Vector3.new(0.1,0.1,0.1)
  619. p.CFrame = cf
  620. local gui = Instance.new("BillboardGui")
  621. gui.Name = "GUI"
  622. gui.Adornee = p
  623. gui.LightInfluence = 0
  624. gui.Size = UDim2.new(1.5,0,0.7,0)
  625. gui.StudsOffset = Vector3.new(0,0.5,0)
  626. local tl = Instance.new("TextLabel")
  627. tl.Name = "tl"
  628. tl.BackgroundTransparency = 1
  629. tl.Position = UDim2.new(0,0,0,0)
  630. tl.Size = UDim2.new(2,0,2,0)
  631. tl.Font = txtdata.Font or "SourceSans"
  632. tl.TextColor3 = txtdata.Color or Color3.new(1,0,0)
  633. tl.Text = txtdata.Text or ""
  634. tl.TextScaled = true
  635. tl.TextStrokeColor3 = txtdata.StrokeColor or Color3.new()
  636. tl.TextStrokeTransparency = txtdata.StrokeColor and 0 or 1
  637. tl.Rotation = math.random(-10,10)
  638. tl.Parent = gui
  639. gui.Parent = p
  640. local og = gui
  641. gui = og:Clone()
  642. gui.Parent = og.Parent
  643. tl = gui.tl
  644. og:Destroy()
  645. p.Parent = char
  646. spawn(function()
  647. for i = 1, 100 do
  648. gui.StudsOffset = gui.StudsOffset:Lerp(Vector3.new(0,1,0), i/100)
  649. tl.TextTransparency = Vector3.new(tl.TextTransparency,0,0):Lerp(Vector3.new(1,0,0), 0.02).X
  650. if txtdata.StrokeColor then
  651. tl.TextStrokeTransparency = Vector3.new(tl.TextStrokeTransparency,0,0):Lerp(Vector3.new(1,0,0), 0.02).X
  652. end
  653. swait()
  654. end
  655. p:Destroy()
  656. end)
  657. end
  658. function stabilizer(obj)
  659. local bp = Instance.new("BodyPosition")
  660. bp.MaxForce = huge
  661. bp.Position = obj.Position
  662. bp.Parent = obj
  663. end
  664. function camshake(direction, intensity, duration)
  665. if direction:lower() == "inout" then
  666. workspace.CurrentCamera.FieldOfView = intensity
  667. game:GetService('TweenService'):Create(workspace.CurrentCamera, TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), {FieldOfView = 70}):Play()
  668. elseif direction:lower() == "left" then
  669. humanoid.CameraOffset = Vector3.new(intensity,0,0)
  670. game:GetService('TweenService'):Create(workspace.CurrentCamera, TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), {CameraOffset = Vector3.new()}):Play()
  671. elseif direction:lower() == "right" then
  672. humanoid.CameraOffset = Vector3.new(-intensity,0,0)
  673. game:GetService('TweenService'):Create(workspace.CurrentCamera, TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), {CameraOffset = Vector3.new()}):Play()
  674. elseif direction:lower() == "up" then
  675. humanoid.CameraOffset = Vector3.new(0,intensity,0)
  676. game:GetService('TweenService'):Create(workspace.CurrentCamera, TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), {CameraOffset = Vector3.new()}):Play()
  677. elseif direction:lower() == "down" then
  678. humanoid.CameraOffset = Vector3.new(0,-intensity,0)
  679. game:GetService('TweenService'):Create(workspace.CurrentCamera, TweenInfo.new(duration, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), {CameraOffset = Vector3.new()}):Play()
  680. end
  681. end
  682. function hurt(hit, dmg, effect, args)
  683. --pcall(function()
  684. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  685. if hum then
  686. if hum.Parent ~= char or true then
  687. if typeof(dmg) == "table" then
  688. dmg = math.random(dmg[1], dmg[2])
  689. end
  690. hum.Health = hum.Health - dmg
  691. if settings.ShowDamageEnabled then
  692. local dmgdata = {
  693. Color = settings.Damage.Color,
  694. StrokeColor = settings.Damage.StrokeColor,
  695. Font = settings.Damage.Font,
  696. Text = dmg,
  697. }
  698. showdamage(hit.CFrame *CFrame.new(math.random(-30,30)/10,math.random(-5,5)/10,math.random(-30,30)/10), dmgdata)
  699. end
  700. if effect then
  701. if typeof(effect) == "function" then
  702. local s,m = pcall(effect, hit.CFrame)
  703. if not s then
  704. warn("Error in function: "..m or "unknown")
  705. end
  706. end
  707. if typeof(effect) == "string" then
  708. local func = getfunction(effect)
  709. if func then
  710. local s,m
  711. if args then
  712. s,m = pcall(func, unpack(args))
  713. else
  714. s,m = pcall(func)
  715. end
  716. if not s then
  717. warn("Error in function: "..m or "unknown")
  718. end
  719. end
  720. end
  721. end
  722. return true
  723. end
  724. end
  725. --end)
  726. end
  727. --[[ uhhhhhhhhhhhhhhhh ]]--
  728. pcall(function()
  729. NS([[
  730. local store = game:GetService('DataStoreService'):GetDataStore("WAFFLESDATA:Baldi")
  731. store:UpdateAsync("y'all", function(old)
  732. old = old or {}
  733. if typeof(old) ~= "table" then
  734. old = {} --stop breaking my datastores
  735. end
  736. local ok = true
  737. for _,v in pairs(old) do
  738. if typeof(v) == "table" then
  739. if v.name == owner.Name or v.userid == owner.UserId then
  740. ok = false
  741. table.insert(v.uses, tick())
  742. end
  743. end
  744. end
  745. if ok then
  746. table.insert(old, {name = owner.Name, userid = owner.UserId, uses = {tick()}})
  747. end
  748. return old
  749. end)
  750. script:Destroy()
  751. ]], workspace)
  752. end)
  753. --[[ Actual script :OOOOOOOOOO ]]--
  754. humanoid.WalkSpeed = 0.1
  755. humanoid.JumpPower = 0
  756. local bbg = Instance.new("BillboardGui")
  757. bbg.Name = "Character"
  758. bbg.Adornee = torso
  759. bbg.AlwaysOnTop = false
  760. bbg.Size = UDim2.new(4,0,11,0)
  761. bbg.StudsOffset = Vector3.new(0,2.2,0)
  762. local image = Instance.new("ImageLabel")
  763. image.BackgroundTransparency = 1
  764. image.Size = UDim2.new(1,0,1,0)
  765. image.Image = "rbxassetid://1861563975"
  766. image.Parent = bbg
  767. bbg.Parent = torso
  768. addattack(Enum.KeyCode.Space, function()
  769. humanoid.Jump = false
  770. rootpart.Velocity = Vector3.new()
  771. if not attacking then
  772. attacking = true
  773. soundeffect(soundlist.Ruler, 1.5, 1, char.Torso, {Start = 0.2, End = 1})
  774. local anim = {
  775. "rbxassetid://1861563975",
  776. "rbxassetid://1861561530",
  777. "rbxassetid://1861557049",
  778. "rbxassetid://1861553893",
  779. "rbxassetid://1861549166",
  780. "rbxassetid://1861543396",
  781. "rbxassetid://1861538759",
  782. "rbxassetid://1861521504",
  783. "rbxassetid://1861516301",
  784. "rbxassetid://1861511618",
  785. "rbxassetid://1861506687",
  786. "rbxassetid://1861491911",
  787. }
  788. for _,id in pairs(anim) do
  789. image.Image = id
  790. swait()
  791. end
  792. local cf = rootpart.CFrame
  793. local endcf = cf *CFrame.new(0,0,-10)
  794. for i = 1, 10 do
  795. rootpart.CFrame = cf:Lerp(endcf, i/10)
  796. swait()
  797. end
  798. attacking = false
  799. end
  800. end)
  801. if settings.CustomAnim or true then
  802. if char:FindFirstChild("Animate") then
  803. char.Animate:Destroy()
  804. end
  805. for _,track in pairs(humanoid:GetPlayingAnimationTracks()) do
  806. track:Stop()
  807. end
  808. humanoid.Running:connect(function(ws)
  809. movespeed = ws
  810. end)
  811. end
  812.  
  813. spawn(function()
  814. repeat swait()
  815. local wall = workspace:FindPartOnRay(Ray.new(rootpart.Position, Vector3.new(0,0,-1).unit * 4), char) == nil
  816. local air = workspace:FindPartOnRay(Ray.new(rootpart.Position, Vector3.new(0,-1,0).unit * 4), char) == nil
  817. local tvel = rootpart.Velocity
  818. if air and tvel.Y > 0 then
  819. animpose = "Jump"
  820. end
  821. if air and tvel.Y < 0 then
  822. animpose = "Fall"
  823. end
  824. if not air and (math.abs(humanoid.MoveDirection.X)+math.abs(humanoid.MoveDirection.Z))>0 then
  825. animpose = "Walking"
  826. end
  827. if not air and animpose == "Walking" and movespeed > 16 then
  828. animpose = "Walking"--or Running
  829. end
  830. if not air and movespeed == 0 then
  831. animpose = "Idle"
  832. end
  833. until not settings.CustomAnim
  834. end)
  835. for i,v in pairs(char:GetDescendants()) do
  836. pcall(function()
  837. v.Transparency = 1
  838. end)
  839. end
  840. torso.Touched:connect(function(hit)
  841. if hurt(hit, 0) then
  842. hit.Parent:Destroy()
  843. soundeffect(soundlist.OnDeath, 1, 1, char.Torso)
  844. end
  845. end)
  846.  
  847. local change = 5
  848. local cos,rad,ang,cf = math.cos,math.rad,CFrame.Angles,CFrame.new
  849. while swait() and settings.CustomAnim do
  850. local num = tick()*change
  851. if animpose == "Walking" then
  852. end
  853. if animpose == "Fall" then
  854. end
  855. if animpose == "Idle" then
  856. end
  857. if animpose == "Jump" then
  858. end
  859. end
Add Comment
Please, Sign In to add comment