Advertisement
DarkScriptZEditors

BoW

Dec 20th, 2018
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.71 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code by Mokiros")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  51. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67. local Mouse = Player:GetMouse()
  68. local UIS = game:GetService("UserInputService")
  69. local input = function(io,a)
  70. if a then return end
  71. --Since InputObject is a client-side instance, we create and pass table instead
  72. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  73. end
  74. UIS.InputBegan:Connect(input)
  75. UIS.InputEnded:Connect(input)
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then
  95. return typeof(s[k])=="function"
  96. and function(_,...)return s[k](s,...)end or s[k]
  97. end
  98. end,
  99. __newindex = function(self,k,v)
  100. local s = rawget(self,"_RealService")
  101. if s then s[k]=v end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return rawget(self,s) or _rg:GetService(s)
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. RunService = FakeService({
  120. _btrs = {},
  121. RenderStepped = _rg:GetService("RunService").Heartbeat,
  122. BindToRenderStep = function(self,name,_,fun)
  123. self._btrs[name] = self.Heartbeat:Connect(fun)
  124. end,
  125. UnbindFromRenderStep = function(self,name)
  126. self._btrs[name]:Disconnect()
  127. end,
  128. },"RunService")
  129. }
  130. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  131. g.service = g.GetService
  132. FakeService(g,game)
  133. --Changing owner to fake player object to support owner:GetMouse()
  134. game,owner = g,g.Players.LocalPlayer
  135. end
  136. plr = game.Players.LocalPlayer
  137. repeat wait() until plr.Character
  138. char = plr.Character
  139.  
  140. effect = Instance.new("Model",char)
  141. effect.Name = "Effects"
  142.  
  143.  
  144. moozik = Instance.new("Sound",char)
  145. moozik.SoundId = "rbxassetid://132024343"
  146. moozik.Volume = 10
  147. moozik.Looped = true
  148. moozik:Play()
  149. hurt = Instance.new("Sound",char)
  150. hurt.SoundId = "rbxassetid://975173739"
  151. hurt.Volume = 10
  152.  
  153.  
  154.  
  155.  
  156. local block = Instance.new("Part",effect)
  157. block.Size = Vector3.new(1,1,1)
  158. block.CanCollide = false
  159. local weld = Instance.new("Weld",block)
  160. weld.Part0 = block
  161. weld.Part1 = char["Right Arm"]
  162. weld.C0 = CFrame.new(-0.00427627563, -0.0187358856, 1.48222256, 1, 0, 0, 0, -0.0125430031, -0.999921381, 0, 0.999921262, -0.0125430049)
  163. local decal1 = Instance.new("Decal",block)
  164. decal1.Face = "Top"
  165. local decal2 = Instance.new("Decal",block)
  166. decal2.Face = "Front"
  167. local decal3 = Instance.new("Decal",block)
  168. decal3.Face = "Bottom"
  169. local decal4 = Instance.new("Decal",block)
  170. decal4.Face = "Back"
  171. local decal5 = Instance.new("Decal",block)
  172. decal5.Face = "Left"
  173. local decal6 = Instance.new("Decal",block)
  174. decal6.Face = "Right"
  175. damaged = false
  176. local reddamage = function(timeofeffect)
  177. for i,v in pairs(char:GetChildren()) do
  178. if v.ClassName == "Part" and v.Name ~= "HumanoidRootPart" then
  179. local cp = v:Clone()
  180. cp.Parent = effect
  181. cp.BrickColor = BrickColor.new("Really red")
  182. cp.Transparency = 0.7
  183. cp.CanCollide = false
  184. cp.Material = Enum.Material.Neon
  185. if cp.Name == "Head" then
  186. cp.face:Destroy()
  187. end
  188. if cp.Name == "Torso" then
  189. cp.roblox:Destroy()
  190. end
  191. if v ~= char.Head then
  192. cp.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  193. else
  194. cp.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  195. end
  196. local weld = Instance.new("Weld",cp)
  197. weld.Part0 = v
  198. weld.Part1 = cp
  199. game:GetService("Debris"):AddItem(cp,timeofeffect)
  200. end
  201. end
  202. char.Torso.Velocity = char.Torso.CFrame.lookVector * -100
  203. hurt:Play()
  204. end
  205.  
  206. function changeyourblockdecal(bottom,top,left,right,back,front)
  207. decal3.Texture = bottom
  208. decal1.Texture = top
  209. decal5.Texture = left
  210. decal6.Texture = right
  211. decal4.Texture = back
  212. decal2.Texture = front
  213. end
  214. function changeblockdecal(whatblock , bottom,top,left,right,back,front)
  215. local tex1 = Instance.new("Decal",whatblock)
  216. tex1.Face = "Top"
  217. local tex2 = Instance.new("Decal",whatblock)
  218. tex2.Face = "Front"
  219. local tex3 = Instance.new("Decal",whatblock)
  220. tex3.Face = "Bottom"
  221. local tex4 = Instance.new("Decal",whatblock)
  222. tex4.Face = "Back"
  223. local tex5 = Instance.new("Decal",whatblock)
  224. tex5.Face = "Left"
  225. local tex6 = Instance.new("Decal",whatblock)
  226. tex6.Face = "Right"
  227. tex3.Texture = bottom
  228. tex1.Texture = top
  229. tex5.Texture = left
  230. tex6.Texture = right
  231. tex4.Texture = back
  232. tex2.Texture = front
  233. end
  234. lhand = char.Torso["Left Shoulder"]:Clone()
  235. rhand = char.Torso["Right Shoulder"]:Clone()
  236. local rhandweld = Instance.new("Weld",char)
  237. rhandweld.Part0 = char.Torso
  238. rhandweld.Part1 = char["Right Arm"]
  239. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  240. local human2 = Instance.new("Weld",char)
  241. human2.Part0 = char.HumanoidRootPart
  242. human2.Part1 = char.Torso
  243. human2co = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  244.  
  245.  
  246. function changeblocktype(whattype)
  247. if whattype == "Grass" then
  248. changeyourblockdecal("http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96430265","http://www.roblox.com/asset/?id=96430337","http://www.roblox.com/asset/?id=96430337","http://www.roblox.com/asset/?id=96430337","http://www.roblox.com/asset/?id=96430337")
  249. end
  250. if whattype == "Dirt" then
  251. changeyourblockdecal("http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755","http://www.roblox.com/asset/?id=96167755")
  252. end
  253. if whattype == "Cobblestone" then
  254. changeyourblockdecal("http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377","http://www.roblox.com/asset/?id=57539377")
  255. end
  256. if whattype == "Gold" then
  257. changeyourblockdecal("http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851","http://www.roblox.com/asset/?id=71405851")
  258. end
  259. if whattype == "Stone" then
  260. changeyourblockdecal("http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261","http://www.roblox.com/asset/?id=56882261")
  261. end
  262. if whattype == "DiamondBlock" then
  263. changeyourblockdecal("http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371","http://www.roblox.com/asset/?id=59262371")
  264. end
  265. if whattype == "DiamondOre" then
  266. changeyourblockdecal("http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647","http://www.roblox.com/asset/?id=49919647")
  267. end
  268. if whattype == "WoodenPlank" then
  269. changeyourblockdecal("http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036","http://www.roblox.com/asset/?id=107806036")
  270. end
  271. if whattype == "OakWood" then
  272. changeyourblockdecal("http://www.roblox.com/asset/?id=55355773","http://www.roblox.com/asset/?id=55355773","http://www.roblox.com/asset/?id=55319786","http://www.roblox.com/asset/?id=55319786","http://www.roblox.com/asset/?id=55319786","http://www.roblox.com/asset/?id=55319786")
  273. end
  274. if whattype == "GoldOre" then
  275. changeyourblockdecal("http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646","http://www.roblox.com/asset/?id=73374646")
  276. end
  277. if whattype == "Sponge" then
  278. changeyourblockdecal("http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383","http://www.roblox.com/asset/?id=38945383")
  279. end
  280. end
  281.  
  282. changeblocktype("Grass")
  283.  
  284.  
  285.  
  286. function playanim(whatanim,speed)
  287. if whatanim == "Place" then
  288. rhandweld.Parent = char.Torso
  289. for i = 0,1, speed do
  290. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.473864555, -0.788700104, 1, 0, 0, 0, -0.0214149933, -0.999770641, 0, 0.999770641, -0.0214149933),i)
  291. game:GetService("RunService").RenderStepped:wait()
  292. end
  293. for i = 0,1, speed do
  294. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.957962036, 0.0477108955, -1.06759644, 0.445479125, 0.728770554, 0.520040333, 0.0191690028, 0.572963655, -0.81935662, -0.895087242, 0.374974847, 0.241273522),i)
  295. game:GetService("RunService").RenderStepped:wait()
  296. end
  297. end
  298. if whatanim == "Destroy" then
  299. rhandweld.Parent = char.Torso
  300. for i = 0,1, speed do
  301. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.473864555, -0.788700104, 1, 0, 0, 0, -0.0214149933, -0.999770641, 0, 0.999770641, -0.0214149933),i)
  302. game:GetService("RunService").RenderStepped:wait()
  303. end
  304. for i = 0,1, speed do
  305. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.957962036, 0.0477108955, -1.06759644, 0.445479125, 0.728770554, 0.520040333, 0.0191690028, 0.572963655, -0.81935662, -0.895087242, 0.374974847, 0.241273522),i)
  306. game:GetService("RunService").RenderStepped:wait()
  307. end
  308. end
  309. if whatanim == "NormalPose" then
  310. for i = 0,1 , speed do
  311. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i)
  312. game:GetService("RunService").RenderStepped:wait()
  313. end
  314. end
  315. end
  316. canuse = true
  317. mouse = plr:GetMouse()
  318. function buildblock()
  319. if canuse then
  320. canuse = false
  321. playanim("Place", 0.07)
  322. local theactualblock = Instance.new("Part")
  323. theactualblock:BreakJoints()
  324. theactualblock.Parent = workspace
  325. theactualblock.Transparency = 0
  326. theactualblock.CFrame = mouse.Hit + Vector3.new(0,1.09,0)
  327. theactualblock.Orientation = Vector3.new(0,0,0)
  328. theactualblock.Size = Vector3.new(3,3,3)
  329. theactualblock.Anchored = true
  330. theactualblock.CanCollide = true
  331. theactualblock.Name = "BlockPlace"
  332. changeblockdecal(theactualblock,decal3.Texture, decal1.Texture, decal5.Texture,decal6.Texture, decal4.Texture, decal2.Texture)
  333. playanim("NormalPose", 0.3)
  334. canuse = true
  335. end
  336. end
  337. function destroyblock()
  338. if mouse.Target.Name == "BlockPlace" and mouse.Target.Name ~= "Base" and mouse.Target.Name ~= "Baseplate" and mouse.Target.Name ~= "Workspace" then
  339. playanim("Destroy", 0.07)
  340. mouse.Target:Destroy()
  341. playanim("NormalPose", 0.3)
  342. end
  343. end
  344. local mouse1 = mouse.Button1Down:connect(function()
  345. buildblock()
  346. end)
  347. local mouse2 = mouse.KeyDown:connect(function(k)
  348. if k == "q" then
  349. destroyblock()
  350. end
  351. if k == "e" then
  352. local chance = math.random(1,11)
  353. if chance == 1 then
  354. changeblocktype("Grass")
  355. end
  356. if chance == 2 then
  357. changeblocktype("Dirt")
  358. end
  359. if chance == 3 then
  360. changeblocktype("Cobblestone")
  361. end
  362. if chance == 4 then
  363. changeblocktype("Gold")
  364. end
  365. if chance == 5 then
  366. changeblocktype("Stone")
  367. end
  368. if chance == 6 then
  369. changeblocktype("DiamondBlock")
  370. end
  371. if chance == 7 then
  372. changeblocktype("DiamondOre")
  373. end
  374. if chance == 8 then
  375. changeblocktype("WoodenPlank")
  376. end
  377. if chance == 9 then
  378. changeblocktype("OakWood")
  379. end
  380. if chance == 10 then
  381. changeblocktype("GoldOre")
  382. end
  383. if chance == 11 then
  384. changeblocktype("Sponge")
  385. end
  386. end
  387. end)
  388. HasDied = false
  389. Dead = false
  390. local reddeath = function()
  391. for i,v in pairs(char:GetChildren()) do
  392. if v.ClassName == "Part" and v.Name ~= "HumanoidRootPart" then
  393. local cp = v:Clone()
  394. cp.Parent = effect
  395. cp.BrickColor = BrickColor.new("Really red")
  396. cp.Transparency = 1
  397. cp.CanCollide = false
  398. cp.Material = Enum.Material.Neon
  399. if cp.Name == "Head" then
  400. cp.face:Destroy()
  401. end
  402. if cp.Name == "Torso" then
  403. cp.roblox:Destroy()
  404. end
  405. if v ~= char.Head then
  406. cp.Size = v.Size+(Vector3.new(1,1,1)*0.2)
  407. else
  408. cp.Size = (Vector3.new(1,1,1)*v.Size.Y)+(Vector3.new(1,1,1)*0.2)
  409. end
  410. local weld = Instance.new("Weld",cp)
  411. weld.Part0 = v
  412. weld.Part1 = cp
  413. end
  414. end
  415. end
  416. reddeath()
  417. generategui = function()
  418. local screen = Instance.new("ScreenGui",plr.PlayerGui)
  419. screen.Name = "Death(lol i was lazy to add buttons lol)"
  420. local text = Instance.new("TextLabel",screen)
  421. text.Text = "You died!"
  422. text.TextColor3 = Color3.new(1,1,1)
  423. text.Font = "Arcade"
  424. text.TextScaled = true
  425. text.Position = UDim2.new(0.381, 0,0.172, 0)
  426. text.Size = UDim2.new(0, 200, 0, 50)
  427. text.BackgroundTransparency = 1
  428. local respawn = Instance.new("TextButton",screen)
  429. respawn.Text = "Respawn"
  430. respawn.TextScaled = true
  431. respawn.Position = UDim2.new(0.381, 0,0.561, 0)
  432. respawn.Size = UDim2.new(0, 200,0, 50)
  433. respawn.BackgroundTransparency = 1
  434. respawn.TextColor3 = Color3.new(1,1,1)
  435. respawn.Font = "Arcade"
  436. respawn.MouseButton1Click:connect(function()
  437. Dead = false
  438. HasDied = false
  439. char.Humanoid.Health = 0
  440. char.Parent = nil
  441. respawn.Text = "Say g/r or g/sr to respawn properly"
  442. end)
  443. end
  444. local BODY = {}
  445. LeftArm = char["Left Arm"]
  446. RightLeg = char["Right Leg"]
  447. LeftLeg = char["Left Leg"]
  448. for _, c in pairs(char:GetDescendants()) do
  449. if c:IsA("BasePart") and c.Name ~= "Handle" then
  450. if c ~= char.HumanoidRootPart and c ~= char.Torso and c ~= char.Head and c ~= char["Right Arm"] and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
  451. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  452. end
  453. table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
  454. elseif c:IsA("JointInstance") then
  455. table.insert(BODY,{c,c.Parent,nil,nil,nil})
  456. end
  457. end
  458. for e = 1, #BODY do
  459. if BODY[e] ~= nil then
  460. local STUFF = BODY[e]
  461. local PART = STUFF[1]
  462. local PARENT = STUFF[2]
  463. local MATERIAL = STUFF[3]
  464. local TRANSPARENCY = STUFF[5]
  465. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  466. PART.Material = MATERIAL
  467. PART.Transparency = TRANSPARENCY
  468. end
  469. PART.AncestryChanged:Connect(function()
  470. PART.Parent = PARENT
  471. end)
  472. end
  473. end
  474. function refit()
  475. char.Parent = workspace
  476. for e = 1, #BODY do
  477. if BODY[e] ~= nil then
  478. local STUFF = BODY[e]
  479. local PART = STUFF[1]
  480. local PARENT = STUFF[2]
  481. local MATERIAL = STUFF[3]
  482. local TRANSPARENCY = STUFF[5]
  483. if PART.ClassName == "Part" and PART ~= char.HumanoidRootPart then
  484. PART.Material = MATERIAL
  485. PART.Transparency = TRANSPARENCY
  486. end
  487. if PART.Parent ~= PARENT then
  488. char:FindFirstChildOfClass("Humanoid"):remove()
  489. PART.Parent = PARENT
  490. Humanoid = Instance.new("Humanoid",char)
  491. end
  492. end
  493. end
  494. end
  495. char.Humanoid.Died:connect(function()
  496. hurt:Play()
  497. refit()
  498. mouse1:Disconnect()
  499. mouse2:Disconnect()
  500. for i,v in pairs(effect:GetChildren()) do
  501. if v.ClassName == "Part" then
  502. v.Transparency = 0.7
  503. end
  504. end
  505. workspace.CurrentCamera.CameraSubject = char.Head
  506. generategui()
  507. HasDied = true
  508. Dead = true
  509. for i = 0,1, 0.03 do
  510. human2.C0 = human2.C0:lerp(CFrame.new(1.99999964, -3.00000095, 0, -0.00852799695, 0.999963641, 0, -0.999963641, -0.00852799695, 0, 0, 0, 1):inverse() + Vector3.new(0,1,0),i)
  511. game:GetService("RunService").RenderStepped:wait()
  512. end
  513. end)
  514. while true do
  515. game:GetService("RunService").RenderStepped:wait()
  516. if char.Humanoid.Health < 100 and not damaged and not Dead and not HasDied then
  517. reddamage(0.5)
  518. damaged = true
  519. wait(1)
  520. damaged = false
  521. char.Humanoid.Health = 100
  522. end
  523. if char.Humanoid.Health < 1 and Dead and HasDied then
  524. refit()
  525. for i,v in pairs(effect:GetChildren()) do
  526. if v.ClassName == "Part" then
  527. v.Transparency = 0.7
  528. end
  529. end
  530. end
  531. if Dead and HasDied then
  532. char.Humanoid.WalkSpeed = 0
  533. char.Humanoid.JumpPower = 0
  534. human2.Parent = char.Torso
  535. rhandweld.Parent = char.Torso
  536. end
  537. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement