sIendytubble

testing updates for steve script

Jul 20th, 2020
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 178.19 KB | None | 0 0
  1.  
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer warn'youngmacka123s minecraft script.'
  5. if owner.Name == "Latexchangedlatex" then
  6. game:GetService("Chat"):Chat(owner.Character.Head, "Blacklisted.", Enum.ChatColor.Red)
  7. else
  8. -- ORIGINAL CREATOR: Depr1
  9. --Fixed lags by stommmDev for toasters if the creator wants to shut down this script i will
  10. -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
  11. -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
  12. -- then this is not the original link of this script.
  13.  
  14. -- The original link of the script gets edited constantly for updates, if you use the original
  15. -- link you will be able to enjoy the most recent updates of this script without changing to
  16. -- another link which contains updated script.
  17.  
  18. -- Enjoy! :)
  19. -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks, choose a empty slot i
  20. -- you want to remove a block.
  21. -- if your a noob who wants alex back then republish this pastebin and add "rbxassetid://295150002", in the faces
  22. faces = {"http://www.roblox.com/asset/?id=36047310"}
  23. local Changelog = [[
  24.  
  25. Hey, thanks for using my Steve script!
  26. (WOOHOO! Void Script Builder Compatible!!)
  27. updateBoard V1.0.2
  28. ChangeLogs:
  29. 6/15/2020:
  30. HUGE UPDATE!!!!
  31. MOBILE SUPPORT!!!!
  32. recently added buttons to:
  33. crouch
  34. place a block
  35. place a sign
  36. switch a block
  37. toggle inventory
  38. toggle sword
  39.  
  40. hey back with another update!
  41. sorry if you thought i discontinued it but actually
  42. i fixed something that i should of fixed
  43. a along time ago
  44. the signs are fixed
  45. when you press p and use the sign gui to change the signs text it
  46. actually works now so yeah
  47. please dont swear with this
  48. i dont want my script getting banned from void script builder
  49. Notice:
  50. i am starting to remove the lower changelogs so you can click the x on the
  51. changelog gui
  52. Special Note:
  53. im letting people become a beta tester to some of my new features for FREE!
  54. dm on discord at Someone Special#8836 if you want to test some new features.
  55. Beta Testers:
  56. guest712921
  57. ]]
  58. -- this script will transform you into steve when used
  59. function getSideByLocation(loc)
  60. local side = nil
  61. if loc.X < 0 then side = "Left" end
  62. if loc.X > 0 then side = "Right" end
  63. if loc.Y > 0 then side = "Top" end
  64. if loc.Y < 0 then side = "Bottom" end
  65. if loc.Z < 0 then side = "Front" end
  66. if loc.Z > 0 then side = "Back" end
  67.  
  68. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  69. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  70. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  71. then
  72. return nil
  73. end
  74. return side
  75. end
  76. workspace:WaitForChild("Camera"):ClearAllChildren()
  77. local RS = game:GetService("RunService").RenderStepped
  78. local targetName = owner.Name
  79. local player = owner
  80. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  81. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  82. for i,f in pairs(faces) do
  83. local decal = Instance.new(className, part)
  84. if i == 1 then decal.Texture = frontF decal.Name = f end
  85. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  86. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  87. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  88. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  89. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  90. decal.Face = f
  91. end
  92. return part
  93. end
  94. function makeSquare(position, size, color, transparency, parent, zindex)
  95. local label = Instance.new("TextLabel", parent)
  96. label.Text = ""
  97. label.BorderSizePixel = 0
  98. label.BackgroundTransparency = transparency
  99. label.Position = position
  100. label.Size = size
  101. label.BackgroundColor3 = color
  102. if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
  103. return label
  104. end
  105. function AngleDifference(Angle1, Angle2)
  106. local Difference = {X = 0, Y = 0, Z = 0}
  107. Difference.X = Angle2.X - Angle1.X
  108.  
  109. if (Difference.X > 180) then
  110. Difference.X = Difference.X - 360
  111. elseif (Difference.X < -180) then
  112. Difference.X = Difference.X + 360
  113. end
  114.  
  115. Difference.Y = Angle2.Y - Angle1.Y
  116.  
  117. if (Difference.Y > 180) then
  118. Difference.Y = Difference.Y - 360
  119. elseif (Difference.Y < -180) then
  120. Difference.Y = Difference.Y + 360
  121. end
  122.  
  123. Difference.Z = Angle2.Z - Angle1.Z
  124.  
  125. if (Difference.Z > 180) then
  126. Difference.Z = Difference.Z - 360
  127. elseif (Difference.Z < -180) then
  128. Difference.Z = Difference.Z + 360
  129. end
  130.  
  131. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  132. end
  133. function fasttnt(part,fuse)
  134. coroutine.resume(coroutine.create(function()
  135. part.Anchored = false
  136. part.Velocity = Vector3.new(math.random(-5,5),10,math.random(-5,5))
  137. part["Creeper Hissing"]:Play()
  138. for i = 0,15 do
  139. for i,v in pairs(part:GetChildren()) do
  140. if v.ClassName == "Decal" then
  141. v.Transparency = 1
  142. end
  143. end
  144. part.Material = "SmoothPlastic"
  145. wait(fuse)
  146. for i,v in pairs(Part0:GetChildren()) do
  147. if v.ClassName == "Decal" then
  148. v.Transparency = 0
  149. end
  150. end
  151. part.Material = "Fabric"
  152. fuse = fuse - 0.07
  153. if fuse <= 0.25 then
  154. part.Size = part.Size + Vector3.new(0.1,0.1,0.1)
  155. end
  156. wait(fuse)
  157. end
  158. local explosion = Instance.new("Explosion",workspace)
  159. explosion.BlastPressure = 400000
  160. explosion.BlastRadius = 10
  161. explosion.Position = part.Position
  162. explosion.Hit:Connect(function(blkTar)
  163. if blkTar ~= part then
  164. if blkTar.Parent:FindFirstChildOfClass("Humanoid") then
  165. blkTar.Parent:FindFirstChildOfClass("Humanoid").Health = blkTar.Parent:FindFirstChildOfClass("Humanoid").Health - 39
  166. else
  167. blkTar:Destroy()
  168. end
  169. end
  170. end)
  171. part.Anchored = true
  172. part.Transparency = 1
  173. for i,v in pairs(part:GetChildren()) do
  174. if v.ClassName == "Decal" then
  175. v.Transparency = 1
  176. end
  177. end
  178. part.CanCollide = false
  179. part.TNT_BOOM:Play()
  180. --Part0.TNT_BOOM.PlaybackSpeed = math.random(0,1).."."..math.random(0,9)
  181. smoke = part.ParticleEmitter
  182. smoke.Enabled = true
  183. wait(0.07)
  184.  
  185. smoke.Enabled = false
  186. wait(1)
  187. part:Destroy()
  188. end))
  189. end
  190. function tntfunction(part,fuse)
  191. coroutine.resume(coroutine.create(function()
  192. part.Anchored = false
  193. part.Velocity = Vector3.new(math.random(-5,5),10,math.random(-5,5))
  194. part["Creeper Hissing"]:Play()
  195. for i = 0,15 do
  196. for i,v in pairs(part:GetChildren()) do
  197. if v.ClassName == "Decal" then
  198. v.Transparency = 1
  199. end
  200. end
  201. part.Material = "SmoothPlastic"
  202. wait(fuse)
  203. for i,v in pairs(Part0:GetChildren()) do
  204. if v.ClassName == "Decal" then
  205. v.Transparency = 0
  206. end
  207. end
  208. part.Material = "Fabric"
  209. fuse = fuse - 0.07
  210. if fuse <= 0.25 then
  211. part.Size = part.Size + Vector3.new(0.1,0.1,0.1)
  212. end
  213. wait(fuse)
  214. end
  215. local explosion = Instance.new("Explosion",workspace)
  216. explosion.BlastPressure = 400000
  217. explosion.BlastRadius = 10
  218. explosion.Position = part.Position
  219. explosion.Hit:Connect(function(blkTar)
  220. if blkTar then
  221. if blkTar.Name ~= "TNTBlock" then
  222. if blkTar.Parent:FindFirstChildOfClass("Humanoid") then
  223. blkTar.Parent:FindFirstChildOfClass("Humanoid").Health = blkTar.Parent:FindFirstChildOfClass("Humanoid").Health - 39
  224. else
  225. blkTar:Destroy()
  226. end
  227. end
  228. end
  229. if blkTar.Name == "TNTBlock" then
  230. if blkTar ~= part then
  231. tntfunction(blkTar, 0.05)
  232. end
  233. end
  234. end)
  235. part.Anchored = true
  236. part.Transparency = 1
  237. for i,v in pairs(part:GetChildren()) do
  238. if v.ClassName == "Decal" then
  239. v.Transparency = 1
  240. end
  241. end
  242. part.CanCollide = false
  243. part.TNT_BOOM:Play()
  244. --Part0.TNT_BOOM.PlaybackSpeed = math.random(0,1).."."..math.random(0,9)
  245. smoke = part.ParticleEmitter
  246. smoke.Enabled = true
  247. wait(0.07)
  248.  
  249. smoke.Enabled = false
  250. wait(1)
  251. part:Destroy()
  252. end))
  253. end
  254. function ifixtnt(part)
  255. coroutine.resume(coroutine.create(function()
  256. de = Instance.new("ClickDetector",part)
  257. de.MouseClick:Connect(function()
  258. tntfunction(part,0.5)
  259. end)
  260. end))
  261. --local fuse = 0.5
  262. end
  263. function makeImage(position, size, image, parent, zindex)
  264. local imglabel = Instance.new("ImageLabel", parent)
  265. imglabel.BorderSizePixel = 0
  266. imglabel.BackgroundTransparency = 1
  267. imglabel.Position = position
  268. imglabel.Size = size
  269. imglabel.Image = image
  270. if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
  271. return imglabel
  272. end
  273. function putToolBarSlot(position, image, zindex)
  274. local playerGui = player:FindFirstChild("PlayerGui")
  275. if playerGui then
  276. local gui = playerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", playerGui)
  277. gui.Name = "ToolBar"
  278. local slot = Instance.new("ImageLabel", gui)
  279. slot.Position = position
  280. slot.Size = UDim2.new(0, 32, 0, 32)
  281. slot.BackgroundTransparency = 1
  282. slot.ImageTransparency = 0
  283. slot.Image = image
  284. slot.ZIndex = 2
  285.  
  286. local imgSlot = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 32, 0, 32),
  287. "rbxassetid://347007448", slot)
  288.  
  289. imgSlot.ImageTransparency = 0.25
  290. imgSlot.BackgroundTransparency = 1
  291. imgSlot.ImageColor3 = Color3.new(0.225, 0.225, 0.225)
  292.  
  293. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 32),
  294. Color3.new(0/255, 0/255, 0/255), 0.7, slot)
  295. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 30, 0, 2),
  296. Color3.new(0/255, 0/255, 0/255), 0.7, slot)
  297. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 36, 0, 2),
  298. Color3.new(106/255, 106/255, 106/255), 0, slot)
  299. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 2, 0, 36),
  300. Color3.new(106/255, 106/255, 106/255), 0, slot)
  301. makeSquare(UDim2.new(0, 0, 0, 32), UDim2.new(0, 34, 0, 2),
  302. Color3.new(130/255, 130/255, 130/255), 0, slot)
  303. makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 34),
  304. Color3.new(130/255, 130/255, 130/255), 0, slot)
  305. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 2, 0, 38),
  306. Color3.new(130/255, 130/255, 130/255), 0, slot)
  307. makeSquare(UDim2.new(0, 34, 0, -2), UDim2.new(0, 2, 0, 36),
  308. Color3.new(106/255, 106/255, 106/255), 0, slot)
  309. makeSquare(UDim2.new(0, -2, 0, 34), UDim2.new(0, 38, 0, 2),
  310. Color3.new(106/255, 106/255, 106/255), 0, slot)
  311. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
  312. Color3.new(156/255, 156/255, 156/255), 0, slot)
  313. return slot
  314. end
  315. end
  316. function divide(x, d)
  317. if x ~= 0 and d ~= 0 then
  318. return x/d
  319. else
  320. return x
  321. end
  322. end -- so it doesn't divide by zero
  323. function getDistance(v1, v2)
  324. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  325. end
  326. function SnapToGrid(x, gridX)
  327. local x = math.floor((x / gridX) + 0.5) * gridX
  328. return x
  329. end
  330.  
  331. function round(x)
  332. if x%2 ~= 0.5 then
  333. return math.floor(x+0.5)
  334. end
  335. return x-0.5
  336. end
  337. function weldTo(part1, part2)
  338. local weld = Instance.new("Weld", part1)
  339. weld.Part0 = part1
  340. weld.Part1 = part2
  341. end
  342. function getMagnitudeXZ(velocity)
  343. return math.abs(velocity.X) + math.abs(velocity.Z)
  344. end
  345. function getBlockAtRegion(region)
  346. local blockFound = nil
  347. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  348. local usePart = true
  349. if part.Name == "Debris" then usePart = false end
  350. if usePart == true then
  351. blockFound = part
  352. break
  353. end
  354. end
  355. return blockFound
  356. end
  357. local RS = game:GetService("RunService").RenderStepped
  358. local creativeInventory = {
  359. {
  360. name = "Dirt",
  361. size = Vector3.new(2.6, 2.6, 2.6),
  362. transparency = 0;
  363. frontTex = "rbxassetid://152569532",
  364. backTex = "rbxassetid://152569532",
  365. topTex = "rbxassetid://152569532",
  366. bottomTex = "rbxassetid://152569532",
  367. leftTex = "rbxassetid://152569532",
  368. rightTex = "rbxassetid://152569532",
  369. displayTex = "",
  370. sound = "rbxassetid://1102186681",
  371. soundVol = 1.25,
  372. hasGravity = false,
  373. objectType = "Block"
  374. },
  375. {
  376. name = "Grass",
  377. size = Vector3.new(2.6, 2.6, 2.6),
  378. transparency = 0;
  379. frontTex = "rbxassetid://96430337",
  380. backTex = "rbxassetid://96430337",
  381. topTex = "rbxassetid://96430265",
  382. bottomTex = "rbxassetid://179655033",
  383. leftTex = "rbxassetid://96430337",
  384. rightTex = "rbxassetid://96430337",
  385. displayTex = "",
  386. sound = "rbxassetid://1102186681",
  387. soundVol = 1.25,
  388. hasGravity = false,
  389. objectType = "Block"
  390. },
  391. {
  392. name = "Sand",
  393. size = Vector3.new(2.6, 2.6, 2.6),
  394. transparency = 0;
  395. frontTex = "rbxassetid://347007448",
  396. backTex = "rbxassetid://347007448",
  397. topTex = "rbxassetid://347007448",
  398. bottomTex = "rbxassetid://347007448",
  399. leftTex = "rbxassetid://347007448",
  400. rightTex = "rbxassetid://347007448",
  401. displayTex = "",
  402. sound = "rbxassetid://1102186681",
  403. soundVol = 1.25,
  404. hasGravity = true,
  405. objectType = "Block"
  406. },
  407. {
  408. name = "Gravel",
  409. size = Vector3.new(2.6, 2.6, 2.6),
  410. transparency = 0;
  411. frontTex = "rbxassetid://151701568",
  412. backTex = "rbxassetid://151701568",
  413. topTex = "rbxassetid://151701568",
  414. bottomTex = "rbxassetid://151701568",
  415. leftTex = "rbxassetid://151701568",
  416. rightTex = "rbxassetid://151701568",
  417. displayTex = "",
  418. sound = "rbxassetid://1102186681",
  419. soundVol = 1.25,
  420. hasGravity = true,
  421. objectType = "Block"
  422. },
  423. {
  424. name = "Stone",
  425. size = Vector3.new(2.6, 2.6, 2.6),
  426. transparency = 0;
  427. frontTex = "rbxassetid://75880927",
  428. backTex = "rbxassetid://75880927",
  429. topTex = "rbxassetid://75880927",
  430. bottomTex = "rbxassetid://75880927",
  431. leftTex = "rbxassetid://75880927",
  432. rightTex = "rbxassetid://75880927",
  433. displayTex = "",
  434. sound = "rbxassetid://1016978163",
  435. soundVol = 2,
  436. hasGravity = false,
  437. objectType = "Block"
  438. },
  439. {
  440. name = "Diamond Ore",
  441. size = Vector3.new(2.6, 2.6, 2.6),
  442. transparency = 0;
  443. frontTex = "rbxassetid://57928490",
  444. backTex = "rbxassetid://57928490",
  445. topTex = "rbxassetid://57928490",
  446. bottomTex = "rbxassetid://57928490",
  447. leftTex = "rbxassetid://57928490",
  448. rightTex = "rbxassetid://57928490",
  449. displayTex = "",
  450. sound = "rbxassetid://1016978163",
  451. soundVol = 2,
  452. hasGravity = false,
  453. objectType = "Block"
  454. },
  455. {
  456. name = "Diamond Block",
  457. size = Vector3.new(2.6, 2.6, 2.6),
  458. transparency = 0;
  459. frontTex = "rbxassetid://56749955",
  460. backTex = "rbxassetid://56749955",
  461. topTex = "rbxassetid://56749955",
  462. bottomTex = "rbxassetid://56749955",
  463. leftTex = "rbxassetid://56749955",
  464. rightTex = "rbxassetid://56749955",
  465. displayTex = "",
  466. sound = "rbxassetid://1016978163",
  467. soundVol = 2,
  468. hasGravity = false,
  469. objectType = "Block"
  470. },
  471. {
  472. name = "Emerald Block",
  473. size = Vector3.new(2.6, 2.6, 2.6),
  474. transparency = 0;
  475. frontTex = "rbxassetid://152410853",
  476. backTex = "rbxassetid://152410853",
  477. topTex = "rbxassetid://152410853",
  478. bottomTex = "rbxassetid://152410853",
  479. leftTex = "rbxassetid://152410853",
  480. rightTex = "rbxassetid://152410853",
  481. displayTex = "",
  482. sound = "rbxassetid://1016978163",
  483. soundVol = 2,
  484. hasGravity = false,
  485. objectType = "Block"
  486. },
  487. {
  488. name = "Emerald Ore",
  489. size = Vector3.new(2.6, 2.6, 2.6),
  490. transparency = 0;
  491. frontTex = "rbxassetid://152410868",
  492. backTex = "rbxassetid://152410868",
  493. topTex = "rbxassetid://152410868",
  494. bottomTex = "rbxassetid://152410868",
  495. leftTex = "rbxassetid://152410868",
  496. rightTex = "rbxassetid://152410868",
  497. displayTex = "",
  498. sound = "rbxassetid://1016978163",
  499. soundVol = 2,
  500. hasGravity = false,
  501. objectType = "Block"
  502. },
  503. {
  504. name = "Obsidian",
  505. size = Vector3.new(2.6, 2.6, 2.6),
  506. transparency = 0;
  507. frontTex = "rbxassetid://112560322",
  508. backTex = "rbxassetid://112560322",
  509. topTex = "rbxassetid://112560322",
  510. bottomTex = "rbxassetid://112560322",
  511. leftTex = "rbxassetid://112560322",
  512. rightTex = "rbxassetid://112560322",
  513. displayTex = "",
  514. sound = "rbxassetid://1016978163",
  515. soundVol = 2,
  516. hasGravity = false,
  517. objectType = "Block"
  518. },
  519. {
  520. name = "Gold Block",
  521. size = Vector3.new(2.6, 2.6, 2.6),
  522. transparency = 0;
  523. frontTex = "rbxassetid://152572128",
  524. backTex = "rbxassetid://152572128",
  525. topTex = "rbxassetid://152572128",
  526. bottomTex = "rbxassetid://152572128",
  527. leftTex = "rbxassetid://152572128",
  528. rightTex = "rbxassetid://152572128",
  529. displayTex = "",
  530. sound = "rbxassetid://1016978163",
  531. soundVol = 2,
  532. hasGravity = false,
  533. objectType = "Block"
  534. },
  535. {
  536. name = "Gold Ore",
  537. size = Vector3.new(2.6, 2.6, 2.6),
  538. transparency = 0;
  539. frontTex = "rbxassetid://152572121",
  540. backTex = "rbxassetid://152572121",
  541. topTex = "rbxassetid://152572121",
  542. bottomTex = "rbxassetid://152572121",
  543. leftTex = "rbxassetid://152572121",
  544. rightTex = "rbxassetid://152572121",
  545. displayTex = "",
  546. sound = "rbxassetid://1016978163",
  547. soundVol = 2,
  548. hasGravity = false,
  549. objectType = "Block"
  550. },
  551. {
  552. name = "Iron Block",
  553. size = Vector3.new(2.6, 2.6, 2.6),
  554. transparency = 0;
  555. frontTex = "rbxassetid://152572134",
  556. backTex = "rbxassetid://152572134",
  557. topTex = "rbxassetid://152572134",
  558. bottomTex = "rbxassetid://152572134",
  559. leftTex = "rbxassetid://152572134",
  560. rightTex = "rbxassetid://152572134",
  561. displayTex = "",
  562. sound = "rbxassetid://1016978163",
  563. soundVol = 2,
  564. hasGravity = false,
  565. objectType = "Block"
  566. },
  567. {
  568. name = "Iron Ore",
  569. size = Vector3.new(2.6, 2.6, 2.6),
  570. transparency = 0;
  571. frontTex = "rbxassetid://132879562",
  572. backTex = "rbxassetid://132879562",
  573. topTex = "rbxassetid://132879562",
  574. bottomTex = "rbxassetid://132879562",
  575. leftTex = "rbxassetid://132879562",
  576. rightTex = "rbxassetid://132879562",
  577. displayTex = "",
  578. sound = "rbxassetid://1016978163",
  579. soundVol = 2,
  580. hasGravity = false,
  581. objectType = "Block"
  582. },
  583. {
  584. name = "Redstone Block",
  585. size = Vector3.new(2.6, 2.6, 2.6),
  586. transparency = 0;
  587. frontTex = "rbxassetid://136260219",
  588. backTex = "rbxassetid://136260219",
  589. topTex = "rbxassetid://136260219",
  590. bottomTex = "rbxassetid://136260219",
  591. leftTex = "rbxassetid://136260219",
  592. rightTex = "rbxassetid://136260219",
  593. sound = "rbxassetid://1016978163",
  594. soundVol = 2,
  595. hasGravity = false,
  596. objectType = "Block"
  597. },
  598. {
  599. name = "TNT",
  600. size = Vector3.new(2.6, 2.6, 2.6),
  601. transparency = 0;
  602. frontTex = "rbxassetid://48005067",
  603. backTex = "rbxassetid://48005067",
  604. topTex = "rbxassetid://48005073",
  605. bottomTex = "rbxassetid://48005064",
  606. leftTex = "rbxassetid://48005067",
  607. rightTex = "rbxassetid://48005067",
  608. displayTex = "",
  609. sound = "rbxassetid://1102186681",
  610. soundVol = 2,
  611. hasGravity = false,
  612. isExplosive = true,
  613. objectType = "Block"
  614. },
  615. {
  616. name = "Coal Block",
  617. size = Vector3.new(2.6, 2.6, 2.6),
  618. transparency = 0;
  619. frontTex = "rbxassetid://152527418",
  620. backTex = "rbxassetid://152527418",
  621. topTex = "rbxassetid://152527418",
  622. bottomTex = "rbxassetid://152527418",
  623. leftTex = "rbxassetid://152527418",
  624. rightTex = "rbxassetid://152527418",
  625. displayTex = "",
  626. sound = "rbxassetid://1016978163",
  627. soundVol = 2,
  628. hasGravity = false,
  629. objectType = "Block"
  630. },
  631. {
  632. name = "Coal Ore",
  633. size = Vector3.new(2.6, 2.6, 2.6),
  634. transparency = 0;
  635. frontTex = "rbxassetid://152572101",
  636. backTex = "rbxassetid://152572101",
  637. topTex = "rbxassetid://152572101",
  638. bottomTex = "rbxassetid://152572101",
  639. leftTex = "rbxassetid://152572101",
  640. rightTex = "rbxassetid://152572101",
  641. displayTex = "",
  642. sound = "rbxassetid://1016978163",
  643. soundVol = 2,
  644. hasGravity = false,
  645. objectType = "Block"
  646. },
  647. {
  648. name = "Bedrock",
  649. size = Vector3.new(2.6, 2.6, 2.6),
  650. transparency = 0;
  651. frontTex = "rbxassetid://75881126",
  652. backTex = "rbxassetid://75881126",
  653. topTex = "rbxassetid://75881126",
  654. bottomTex = "rbxassetid://75881126",
  655. leftTex = "rbxassetid://75881126",
  656. rightTex = "rbxassetid://75881126",
  657. displayTex = "",
  658. sound = "rbxassetid://1016978163",
  659. soundVol = 2,
  660. hasGravity = false,
  661. objectType = "Block"
  662. },
  663. {
  664. name = "Cobblestone",
  665. size = Vector3.new(2.6, 2.6, 2.6),
  666. transparency = 0;
  667. frontTex = "rbxassetid://152572105",
  668. backTex = "rbxassetid://152572105",
  669. topTex = "rbxassetid://152572105",
  670. bottomTex = "rbxassetid://152572105",
  671. leftTex = "rbxassetid://152572105",
  672. rightTex = "rbxassetid://152572105",
  673. displayTex = "",
  674. sound = "rbxassetid://1016978163",
  675. soundVol = 2,
  676. hasGravity = false,
  677. objectType = "Block"
  678. },
  679. {
  680. name = "Mossy Stone Brick",
  681. size = Vector3.new(2.6, 2.6, 2.6),
  682. transparency = 0;
  683. frontTex = "rbxassetid://61826751",
  684. backTex = "rbxassetid://61826751",
  685. topTex = "rbxassetid://61826751",
  686. bottomTex = "rbxassetid://61826751",
  687. leftTex = "rbxassetid://61826751",
  688. rightTex = "rbxassetid://61826751",
  689. displayTex = "",
  690. sound = "rbxassetid://1016978163",
  691. soundVol = 2,
  692. hasGravity = false,
  693. objectType = "Block"
  694. },
  695. {
  696. name = "Cracked Stone Brick",
  697. size = Vector3.new(2.6, 2.6, 2.6),
  698. transparency = 0;
  699. frontTex = "rbxassetid://151802087",
  700. backTex = "rbxassetid://151802087",
  701. topTex = "rbxassetid://151802087",
  702. bottomTex = "rbxassetid://151802087",
  703. leftTex = "rbxassetid://151802087",
  704. rightTex = "rbxassetid://151802087",
  705. displayTex = "",
  706. sound = "rbxassetid://1016978163",
  707. soundVol = 2,
  708. hasGravity = false,
  709. objectType = "Block"
  710. },
  711. {
  712. name = "Chiseled Stone Brick",
  713. size = Vector3.new(2.6, 2.6, 2.6),
  714. transparency = 0;
  715. frontTex = "rbxassetid://151802074",
  716. backTex = "rbxassetid://151802074",
  717. topTex = "rbxassetid://151802074",
  718. bottomTex = "rbxassetid://151802074",
  719. leftTex = "rbxassetid://151802074",
  720. rightTex = "rbxassetid://151802074",
  721. displayTex = "",
  722. sound = "rbxassetid://1016978163",
  723. soundVol = 2,
  724. hasGravity = false,
  725. objectType = "Block"
  726. },
  727. {
  728. name = "Stone Brick",
  729. size = Vector3.new(2.6, 2.6, 2.6),
  730. transparency = 0;
  731. frontTex = "rbxassetid://61826773",
  732. backTex = "rbxassetid://61826773",
  733. topTex = "rbxassetid://61826773",
  734. bottomTex = "rbxassetid://61826773",
  735. leftTex = "rbxassetid://61826773",
  736. rightTex = "rbxassetid://61826773",
  737. displayTex = "",
  738. sound = "rbxassetid://1016978163",
  739. soundVol = 2,
  740. hasGravity = false,
  741. objectType = "Block"
  742. },
  743. {
  744. name = "Nether Brick",
  745. size = Vector3.new(2.6, 2.6, 2.6),
  746. transparency = 0;
  747. frontTex = "rbxassetid://151802104",
  748. backTex = "rbxassetid://151802104",
  749. topTex = "rbxassetid://151802104",
  750. bottomTex = "rbxassetid://151802104",
  751. leftTex = "rbxassetid://151802104",
  752. rightTex = "rbxassetid://151802104",
  753. displayTex = "",
  754. sound = "rbxassetid://1016978163",
  755. soundVol = 2,
  756. hasGravity = false,
  757. objectType = "Block"
  758. },
  759. {
  760. name = "Granite",
  761. size = Vector3.new(2.6, 2.6, 2.6),
  762. transparency = 0;
  763. frontTex = "rbxassetid://151776467",
  764. backTex = "rbxassetid://151776467",
  765. topTex = "rbxassetid://151776467",
  766. bottomTex = "rbxassetid://151776467",
  767. leftTex = "rbxassetid://151776467",
  768. rightTex = "rbxassetid://151776467",
  769. displayTex = "",
  770. sound = "rbxassetid://1016978163",
  771. soundVol = 2,
  772. hasGravity = false,
  773. objectType = "Block"
  774. },
  775. {
  776. name = "Diorite",
  777. size = Vector3.new(2.6, 2.6, 2.6),
  778. transparency = 0;
  779. frontTex = "rbxassetid://151776452",
  780. backTex = "rbxassetid://151776452",
  781. topTex = "rbxassetid://151776452",
  782. bottomTex = "rbxassetid://151776452",
  783. leftTex = "rbxassetid://151776452",
  784. rightTex = "rbxassetid://151776452",
  785. sound = "rbxassetid://1016978163",
  786. soundVol = 2,
  787. hasGravity = false,
  788. objectType = "Block"
  789. },
  790. {
  791. name = "Andesite",
  792. size = Vector3.new(2.6, 2.6, 2.6),
  793. transparency = 0;
  794. frontTex = "rbxassetid://151776422",
  795. backTex = "rbxassetid://151776422",
  796. topTex = "rbxassetid://151776422",
  797. bottomTex = "rbxassetid://151776422",
  798. leftTex = "rbxassetid://151776422",
  799. rightTex = "rbxassetid://151776422",
  800. displayTex = "",
  801. sound = "rbxassetid://1016978163",
  802. soundVol = 2,
  803. hasGravity = false,
  804. objectType = "Block"
  805. },
  806. {
  807. name = "Polished Granite",
  808. size = Vector3.new(2.6, 2.6, 2.6),
  809. transparency = 0;
  810. frontTex = "rbxassetid://151776506",
  811. backTex = "rbxassetid://151776506",
  812. topTex = "rbxassetid://151776506",
  813. bottomTex = "rbxassetid://151776506",
  814. leftTex = "rbxassetid://151776506",
  815. rightTex = "rbxassetid://151776506",
  816. displayTex = "",
  817. sound = "rbxassetid://1016978163",
  818. soundVol = 2,
  819. hasGravity = false,
  820. objectType = "Block"
  821. },
  822. {
  823. name = "Polished Diorite",
  824. size = Vector3.new(2.6, 2.6, 2.6),
  825. transparency = 0;
  826. frontTex = "rbxassetid://151776533",
  827. backTex = "rbxassetid://151776533",
  828. topTex = "rbxassetid://151776533",
  829. bottomTex = "rbxassetid://151776533",
  830. leftTex = "rbxassetid://151776533",
  831. rightTex = "rbxassetid://151776533",
  832. displayTex = "",
  833. sound = "rbxassetid://1016978163",
  834. soundVol = 2,
  835. hasGravity = false,
  836. objectType = "Block"
  837. },
  838. {
  839. name = "Polished Andesite",
  840. size = Vector3.new(2.6, 2.6, 2.6),
  841. transparency = 0;
  842. frontTex = "rbxassetid://151776506",
  843. backTex = "rbxassetid://151776506",
  844. topTex = "rbxassetid://151776506",
  845. bottomTex = "rbxassetid://151776506",
  846. leftTex = "rbxassetid://151776506",
  847. rightTex = "rbxassetid://151776506",
  848. displayTex = "",
  849. sound = "rbxassetid://1016978163",
  850. soundVol = 2,
  851. hasGravity = false,
  852. objectType = "Block"
  853. },
  854. {
  855. name = "Brick Block",
  856. size = Vector3.new(2.6, 2.6, 2.6),
  857. transparency = 0;
  858. frontTex = "rbxassetid://59389191",
  859. backTex = "rbxassetid://59389191",
  860. topTex = "rbxassetid://59389191",
  861. bottomTex = "rbxassetid://59389191",
  862. leftTex = "rbxassetid://59389191",
  863. rightTex = "rbxassetid://59389191",
  864. displayTex = "",
  865. sound = "rbxassetid://1016978163",
  866. soundVol = 2,
  867. hasGravity = false,
  868. objectType = "Block"
  869. },
  870. {
  871. name = "Packed Ice",
  872. size = Vector3.new(2.6, 2.6, 2.6),
  873. transparency = 0;
  874. frontTex = "rbxassetid://152528023",
  875. backTex = "rbxassetid://152528023",
  876. topTex = "rbxassetid://152528023",
  877. bottomTex = "rbxassetid://152528023",
  878. leftTex = "rbxassetid://152528023",
  879. rightTex = "rbxassetid://152528023",
  880. displayTex = "",
  881. sound = "rbxassetid://1016978163",
  882. soundVol = 2,
  883. hasGravity = false,
  884. objectType = "Block"
  885. },
  886. {
  887. name = "Ice Block",
  888. size = Vector3.new(2.6, 2.6, 2.6),
  889. transparency = 1;
  890. frontTex = "rbxassetid://118555586",
  891. backTex = "rbxassetid://118555586",
  892. topTex = "rbxassetid://118555586",
  893. bottomTex = "rbxassetid://118555586",
  894. leftTex = "rbxassetid://118555586",
  895. rightTex = "rbxassetid://118555586",
  896. displayTex = "",
  897. sound = "rbxassetid://1016978163",
  898. soundVol = 2,
  899. hasGravity = false,
  900. objectType = "Block"
  901. },
  902. {
  903. name = "Netherrack",
  904. size = Vector3.new(2.6, 2.6, 2.6),
  905. transparency = 0;
  906. frontTex = "rbxassetid://151802119",
  907. backTex = "rbxassetid://151802119",
  908. topTex = "rbxassetid://151802119",
  909. bottomTex = "rbxassetid://151802119",
  910. leftTex = "rbxassetid://151802119",
  911. rightTex = "rbxassetid://151802119",
  912. displayTex = "",
  913. sound = "rbxassetid://1016978163",
  914. soundVol = 2,
  915. hasGravity = false,
  916. objectType = "Block"
  917. },
  918. {
  919. name = "End Stone",
  920. size = Vector3.new(2.6, 2.6, 2.6),
  921. transparency = 0;
  922. frontTex = "rbxassetid://151802091",
  923. backTex = "rbxassetid://151802091",
  924. topTex = "rbxassetid://151802091",
  925. bottomTex = "rbxassetid://151802091",
  926. leftTex = "rbxassetid://151802091",
  927. rightTex = "rbxassetid://151802091",
  928. displayTex = "",
  929. sound = "rbxassetid://1016978163",
  930. soundVol = 2,
  931. hasGravity = false,
  932. objectType = "Block"
  933. },
  934. {
  935. name = "Glass Block",
  936. size = Vector3.new(2.6, 2.6, 2.6),
  937. transparency = 1;
  938. frontTex = "rbxassetid://152239003",
  939. backTex = "rbxassetid://152239003",
  940. topTex = "rbxassetid://152239003",
  941. bottomTex = "rbxassetid://152239003",
  942. leftTex = "rbxassetid://152239003",
  943. rightTex = "rbxassetid://152239003",
  944. displayTex = "",
  945. sound = "rbxassetid://1016978163",
  946. soundVol = 2,
  947. hasGravity = false,
  948. objectType = "Block"
  949. },
  950. {
  951. name = "Glowstone",
  952. size = Vector3.new(2.6, 2.6, 2.6),
  953. transparency = 0;
  954. frontTex = "rbxassetid://54790811",
  955. backTex = "rbxassetid://54790811",
  956. topTex = "rbxassetid://54790811",
  957. bottomTex = "rbxassetid://54790811",
  958. leftTex = "rbxassetid://54790811",
  959. rightTex = "rbxassetid://54790811",
  960. displayTex = "",
  961. sound = "rbxassetid://1016978163",
  962. soundVol = 2,
  963. hasGravity = false,
  964. objectType = "Block"
  965. },
  966. {
  967. name = "Bookshelf",
  968. size = Vector3.new(2.6, 2.6, 2.6),
  969. transparency = 0;
  970. frontTex = "rbxassetid://118554092",
  971. backTex = "rbxassetid://118554092",
  972. topTex = "rbxassetid://346201871",
  973. bottomTex = "rbxassetid://346201871",
  974. leftTex = "rbxassetid://118554092",
  975. rightTex = "rbxassetid://118554092",
  976. displayTex = "",
  977. sound = "rbxassetid://507863457",
  978. soundVol = 2,
  979. hasGravity = false,
  980. objectType = "Block"
  981. },
  982. {
  983. name = "Oak Wood Planks",
  984. size = Vector3.new(2.6, 2.6, 2.6),
  985. transparency = 0;
  986. frontTex = "rbxassetid://346201871",
  987. backTex = "rbxassetid://346201871",
  988. topTex = "rbxassetid://346201871",
  989. bottomTex = "rbxassetid://346201871",
  990. leftTex = "rbxassetid://346201871",
  991. rightTex = "rbxassetid://346201871",
  992. displayTex = "",
  993. sound = "rbxassetid://507863457",
  994. soundVol = 2,
  995. hasGravity = false,
  996. objectType = "Block"
  997. },
  998. {
  999. name = "Oak Log",
  1000. size = Vector3.new(2.6, 2.6, 2.6),
  1001. transparency = 0;
  1002. frontTex = "rbxassetid://71445924",
  1003. backTex = "rbxassetid://71445924",
  1004. topTex = "rbxassetid://152538557",
  1005. bottomTex = "rbxassetid://152538557",
  1006. leftTex = "rbxassetid://71445924",
  1007. rightTex = "rbxassetid://71445924",
  1008. displayTex = "",
  1009. sound = "rbxassetid://507863457",
  1010. soundVol = 2,
  1011. hasGravity = false,
  1012. objectType = "Block"
  1013. },
  1014. {
  1015. name = "Oak Leaves",
  1016. size = Vector3.new(2.6, 2.6, 2.6),
  1017. transparency = 1;
  1018. frontTex = "rbxassetid://151708391",
  1019. backTex = "rbxassetid://151708391",
  1020. topTex = "rbxassetid://151708391",
  1021. bottomTex = "rbxassetid://151708391",
  1022. leftTex = "rbxassetid://151708391",
  1023. rightTex = "rbxassetid://151708391",
  1024. displayTex = "",
  1025. sound = "rbxassetid://507863457",
  1026. -- couldn't find a leaves sound for this one, sorry lol
  1027. soundVol = 2,
  1028. hasGravity = false,
  1029. objectType = "Block"
  1030. }
  1031. }
  1032. local toolBar = {
  1033. {
  1034. name = "Dirt Block",
  1035. size = Vector3.new(2.6, 2.6, 2.6),
  1036. transparency = 0;
  1037. frontTex = "rbxassetid://152569532",
  1038. backTex = "rbxassetid://152569532",
  1039. topTex = "rbxassetid://152569532",
  1040. bottomTex = "rbxassetid://152569532",
  1041. leftTex = "rbxassetid://152569532",
  1042. rightTex = "rbxassetid://152569532",
  1043. displayTex = "",
  1044. sound = "rbxassetid://1102186681",
  1045. soundVol = 1.25,
  1046. hasGravity = false,
  1047. objectType = "Block"
  1048. },
  1049. {
  1050. name = "Grass Block",
  1051. size = Vector3.new(2.6, 2.6, 2.6),
  1052. transparency = 0;
  1053. frontTex = "rbxassetid://96430337",
  1054. backTex = "rbxassetid://96430337",
  1055. topTex = "rbxassetid://96430265",
  1056. bottomTex = "rbxassetid://179655033",
  1057. leftTex = "rbxassetid://96430337",
  1058. rightTex = "rbxassetid://96430337",
  1059. displayTex = "",
  1060. sound = "rbxassetid://1102186681",
  1061. soundVol = 1.25,
  1062. hasGravity = false,
  1063. objectType = "Block"
  1064. },
  1065. {
  1066. name = "Stone",
  1067. size = Vector3.new(2.6, 2.6, 2.6),
  1068. transparency = 0;
  1069. frontTex = "rbxassetid://75880927",
  1070. backTex = "rbxassetid://75880927",
  1071. topTex = "rbxassetid://75880927",
  1072. bottomTex = "rbxassetid://75880927",
  1073. leftTex = "rbxassetid://75880927",
  1074. rightTex = "rbxassetid://75880927",
  1075. displayTex = "",
  1076. sound = "rbxassetid://1016978163",
  1077. soundVol = 2,
  1078. hasGravity = false,
  1079. objectType = "Block"
  1080. },
  1081. {
  1082. name = "Diamond Ore",
  1083. size = Vector3.new(2.6, 2.6, 2.6),
  1084. transparency = 0;
  1085. frontTex = "rbxassetid://152572119",
  1086. backTex = "rbxassetid://152572119",
  1087. topTex = "rbxassetid://152572119",
  1088. bottomTex = "rbxassetid://152572119",
  1089. leftTex = "rbxassetid://152572119",
  1090. rightTex = "rbxassetid://152572119",
  1091. displayTex = "",
  1092. sound = "rbxassetid://1016978163",
  1093. soundVol = 2,
  1094. hasGravity = false,
  1095. objectType = "Block"
  1096. },
  1097. {
  1098. name = "Diamond Block",
  1099. size = Vector3.new(2.6, 2.6, 2.6),
  1100. transparency = 0;
  1101. frontTex = "rbxassetid://56749955",
  1102. backTex = "rbxassetid://56749955",
  1103. topTex = "rbxassetid://56749955",
  1104. bottomTex = "rbxassetid://56749955",
  1105. leftTex = "rbxassetid://56749955",
  1106. rightTex = "rbxassetid://56749955",
  1107. displayTex = "",
  1108. sound = "rbxassetid://1016978163",
  1109. soundVol = 2,
  1110. hasGravity = false,
  1111. objectType = "Block"
  1112. },
  1113. {
  1114. name = "Oak Wood Planks",
  1115. size = Vector3.new(2.6, 2.6, 2.6),
  1116. transparency = 0;
  1117. frontTex = "rbxassetid://346201871",
  1118. backTex = "rbxassetid://346201871",
  1119. topTex = "rbxassetid://346201871",
  1120. bottomTex = "rbxassetid://346201871",
  1121. leftTex = "rbxassetid://346201871",
  1122. rightTex = "rbxassetid://346201871",
  1123. displayTex = "",
  1124. sound = "rbxassetid://507863457",
  1125. soundVol = 2,
  1126. hasGravity = false,
  1127. objectType = "Block"
  1128. },
  1129. {
  1130. name = "Oak Log",
  1131. size = Vector3.new(2.6, 2.6, 2.6),
  1132. transparency = 0;
  1133. frontTex = "rbxassetid://71445924",
  1134. backTex = "rbxassetid://71445924",
  1135. topTex = "rbxassetid://152538557",
  1136. bottomTex = "rbxassetid://152538557",
  1137. leftTex = "rbxassetid://71445924",
  1138. rightTex = "rbxassetid://71445924",
  1139. displayTex = "",
  1140. sound = "rbxassetid://507863457",
  1141. soundVol = 2,
  1142. hasGravity = false,
  1143. objectType = "Block"
  1144. }
  1145. --[[{
  1146. name = "Redstone",
  1147. size = Vector3.new(2.6, 0.05, 2.6),
  1148. transparency = 1;
  1149. frontTex = "rbxassetid://151911305",
  1150. backTex = "",
  1151. topTex = "rbxassetid://151911305",
  1152. bottomTex = "",
  1153. leftTex = "",
  1154. rightTex = "",
  1155. displayTex = "rbxassetid://64124418",
  1156. sound = "rbxassetid://1016978163",
  1157. soundVol = 2,
  1158. hasGravity = false,
  1159. objectType = "Redstone Dust"
  1160. },]]
  1161. }
  1162. function putInventorySlot(position, image, parent, zindex)
  1163. button = Instance.new("TextButton", parent)
  1164. print(button.Parent)
  1165. button.Position = position
  1166. button.Size = UDim2.new(0, 36, 0, 36)
  1167. button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
  1168. button.Text = ""
  1169. button.BorderSizePixel = 0
  1170. button.ZIndex = zindex
  1171. imageLabel = Instance.new("ImageLabel")
  1172. imageLabel.Parent = button
  1173. imageLabel.BackgroundTransparency = 0.9
  1174. imageLabel.Position = UDim2.new(0, 2, 0, 2)
  1175. imageLabel.Size = UDim2.new(0, 32, 0, 32)
  1176. imageLabel.Image = image
  1177. imageLabel.BorderSizePixel = 0
  1178. imageLabel.ZIndex = zindex
  1179. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
  1180. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  1181. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
  1182. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  1183. makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
  1184. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  1185. makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
  1186. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  1187. return button
  1188. end
  1189. if player and player.Character.Humanoid.Health ~= 0 then
  1190. for i,v in pairs(game.Players:GetChildren()) do
  1191. coroutine.resume(coroutine.create(function()
  1192. local sc = Instance.new("ScreenGui",v.PlayerGui)
  1193. local frame = Instance.new("Frame",sc)
  1194. frame.Position = UDim2.new(0,0,0.796,0)
  1195. frame.Size = UDim2.new(0,518,0,112)
  1196. frame.BackgroundTransparency = 1
  1197. local textLabel = Instance.new("TextLabel",frame)
  1198. textLabel.Text = player.Name.." has joined the game."
  1199. textLabel.TextSize = 24
  1200. textLabel.Font = "Arcade"
  1201. textLabel.Size = UDim2.new(1,0,1,0)
  1202. textLabel.Position = UDim2.new(0,1,0,1)
  1203. textLabel.BackgroundTransparency = 0.5
  1204. textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  1205. textLabel.TextColor3 = Color3.new(255, 255, 0)
  1206. wait(5)
  1207. textLabel.Visible = false
  1208. end))
  1209. end
  1210. local char = player.Character
  1211. coroutine.resume(coroutine.create(function()
  1212. for i,v in pairs(char:GetChildren()) do
  1213. if v.ClassName == "Shirt" then
  1214. v:remove()
  1215. v.Parent = nil
  1216. v:Destroy()
  1217. end
  1218. end
  1219. for i,v in pairs(char:GetChildren()) do
  1220. if v.ClassName == "Pants" then
  1221. v:remove()
  1222. v.Parent = nil
  1223. v:Destroy()
  1224. end
  1225. end
  1226. end))
  1227. damage = 10
  1228. local diedtofalldamage = false
  1229. local damageHeight = 10.4 -- The height at which the player will start getting damaged at
  1230. local lethalHeight = 59.8 -- The height at which the player will get killed
  1231.  
  1232. local root = char:WaitForChild("HumanoidRootPart")
  1233. local humanoid = char:WaitForChild("Humanoid")
  1234. Gravity = -2
  1235. humanoid.JumpPower = 25.11
  1236. BodyForce = Instance.new("BodyForce")
  1237. BodyForce.force = Vector3.new(0, (1-Gravity) * root:GetMass() * 236 / 1.2, 0)
  1238. BodyForce:clone().Parent = root
  1239.  
  1240. if humanoid and root then
  1241.  
  1242. local headHeight
  1243. humanoid.FreeFalling:Connect(function (state)
  1244. if state then
  1245. headHeight = root.Position.Y
  1246. elseif not state and headHeight ~= nil then
  1247. pcall(function ()
  1248.  
  1249. local fell = headHeight - root.Position.Y
  1250.  
  1251. if fell >= lethalHeight then
  1252. humanoid.Health = 0
  1253. diedtofalldamage = true
  1254. wait()
  1255. for i,v in pairs(game.Players:GetChildren()) do
  1256. if v.PlayerGui:FindFirstChild("TextLabel").Text == player.Name.. "Died" then
  1257. v:FindFirstChild("TextLabel").Text = player.Name.. "fell from a high place"
  1258. end
  1259. end
  1260. elseif fell >= damageHeight then
  1261. humanoid.Health = humanoid.Health - math.floor(fell)
  1262. if humanoid.Health < 1 then
  1263. diedtofalldamage = true
  1264. wait()
  1265. for i,v in pairs(game.Players:GetChildren()) do
  1266. if v.PlayerGui:FindFirstChild("TextLabel").Text == player.Name.. "Died" then
  1267. v:FindFirstChild("TextLabel").Text = player.Name.. "fell from a high place"
  1268. end
  1269. end
  1270. end
  1271. end
  1272. end)
  1273. end
  1274. end)
  1275. end
  1276. minecrafttheme = Instance.new("Sound",char)
  1277. minecrafttheme.SoundId = "rbxassetid://4611987152"
  1278. minecrafttheme.Volume = 0.5
  1279. --minecrafttheme:Play()
  1280. minecrafttheme.Looped = true
  1281. minecrafttheme:Play()
  1282. Step1 = Instance.new("Sound",char.HumanoidRootPart)
  1283. Step1.SoundId = "rbxassetid://507863105"
  1284. Step1.Volume = 1
  1285. Step1.PlaybackSpeed = 1
  1286. Step2 = Instance.new("Sound",char.HumanoidRootPart)
  1287. Step2.SoundId = "rbxassetid://507863105"
  1288. Step2.Volume = 1
  1289. Step2.PlaybackSpeed = 1
  1290. char:FindFirstChildOfClass("Humanoid").DisplayDistanceType = "None"
  1291.  
  1292. if char then
  1293. local d = char:GetChildren()
  1294. for i=1, #d do
  1295. if (d[i].className == "Accessory") then
  1296. d[i]:remove()
  1297. end
  1298. if (d[i].className == "Hat") then
  1299. d[i]:remove()
  1300. end
  1301. end
  1302.  
  1303. local draggingBlock = nil
  1304. function makeInventory()
  1305. local playerGui = player:FindFirstChild("PlayerGui")
  1306. if playerGui then
  1307. ScreenGui0 = Instance.new("ScreenGui")
  1308. Frame1 = Instance.new("Frame")
  1309. TextButton2 = Instance.new("TextButton")
  1310. TextButton3 = Instance.new("TextButton")
  1311. TextButton4 = Instance.new("TextButton")
  1312. TextButton5 = Instance.new("TextButton")
  1313. TextButton6 = Instance.new("TextButton")
  1314. TextButton7 = Instance.new("TextButton")
  1315. ScreenGui0.Name = "Buttons"
  1316. ScreenGui0.Parent = playerGui
  1317. ScreenGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1318. Frame1.Parent = ScreenGui0
  1319. Frame1.Size = UDim2.new(1, 0, 1, 0)
  1320. Frame1.BackgroundColor = BrickColor.new("Institutional white")
  1321. Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
  1322. Frame1.BackgroundTransparency = 1
  1323. TextButton2.Name = "PlaceBlock"
  1324. TextButton2.Parent = Frame1
  1325. TextButton2.Position = UDim2.new(0.0734693855, 0, 0.541577637, 0)
  1326. TextButton2.Size = UDim2.new(0, 100, 0, 100)
  1327. TextButton2.BackgroundColor = BrickColor.new("Sand violet metallic")
  1328. TextButton2.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
  1329. TextButton2.BackgroundTransparency = 0.5
  1330. TextButton2.Font = Enum.Font.Arcade
  1331. TextButton2.FontSize = Enum.FontSize.Size24
  1332. TextButton2.Text = "Place Block"
  1333. TextButton2.TextColor = BrickColor.new("Institutional white")
  1334. TextButton2.TextColor3 = Color3.new(1, 1, 1)
  1335. TextButton2.TextSize = 24
  1336. TextButton2.TextWrap = true
  1337. TextButton2.TextWrapped = true
  1338. TextButton3.Name = "PlaceSign"
  1339. TextButton3.Parent = Frame1
  1340. TextButton3.Position = UDim2.new(0.790476203, 0, 0.541577637, 0)
  1341. TextButton3.Size = UDim2.new(0, 100, 0, 100)
  1342. TextButton3.BackgroundColor = BrickColor.new("Sand violet metallic")
  1343. TextButton3.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
  1344. TextButton3.BackgroundTransparency = 0.5
  1345. TextButton3.Font = Enum.Font.Arcade
  1346. TextButton3.FontSize = Enum.FontSize.Size24
  1347. TextButton3.Text = "Place Sign"
  1348. TextButton3.TextColor = BrickColor.new("Institutional white")
  1349. TextButton3.TextColor3 = Color3.new(1, 1, 1)
  1350. TextButton3.TextSize = 24
  1351. TextButton3.TextWrap = true
  1352. TextButton3.TextWrapped = true
  1353. TextButton4.Name = "ChangeBlock"
  1354. TextButton4.Parent = Frame1
  1355. TextButton4.Position = UDim2.new(0.790476203, 0, 0.27346167, 0)
  1356. TextButton4.Size = UDim2.new(0, 100, 0, 100)
  1357. TextButton4.BackgroundColor = BrickColor.new("Sand violet metallic")
  1358. TextButton4.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
  1359. TextButton4.BackgroundTransparency = 0.5
  1360. TextButton4.Font = Enum.Font.Arcade
  1361. TextButton4.FontSize = Enum.FontSize.Size24
  1362. TextButton4.Text = "Change Block"
  1363. TextButton4.TextColor = BrickColor.new("Institutional white")
  1364. TextButton4.TextColor3 = Color3.new(1, 1, 1)
  1365. TextButton4.TextSize = 24
  1366. TextButton4.TextWrap = true
  1367. TextButton4.TextWrapped = true
  1368. TextButton5.Name = "Sword"
  1369. TextButton5.Parent = Frame1
  1370. TextButton5.Position = UDim2.new(0.0734693855, 0, 0.273461699, 0)
  1371. TextButton5.Size = UDim2.new(0, 100, 0, 100)
  1372. TextButton5.BackgroundColor = BrickColor.new("Sand violet metallic")
  1373. TextButton5.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
  1374. TextButton5.BackgroundTransparency = 0.5
  1375. TextButton5.Font = Enum.Font.Arcade
  1376. TextButton5.FontSize = Enum.FontSize.Size24
  1377. TextButton5.Text = "Equip Diamond Sword"
  1378. TextButton5.TextColor = BrickColor.new("Institutional white")
  1379. TextButton5.TextColor3 = Color3.new(1, 1, 1)
  1380. TextButton5.TextSize = 24
  1381. TextButton5.TextWrap = true
  1382. TextButton5.TextWrapped = true
  1383. TextButton6.Name = "Crouch"
  1384. TextButton6.Parent = Frame1
  1385. TextButton6.Position = UDim2.new(0.639455795, 0, 0.541577637, 0)
  1386. TextButton6.Size = UDim2.new(0, 100, 0, 100)
  1387. TextButton6.BackgroundColor = BrickColor.new("Sand violet metallic")
  1388. TextButton6.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
  1389. TextButton6.BackgroundTransparency = 0.5
  1390. TextButton6.Font = Enum.Font.Arcade
  1391. TextButton6.FontSize = Enum.FontSize.Size24
  1392. TextButton6.Text = "Crouch"
  1393. TextButton6.TextColor = BrickColor.new("Institutional white")
  1394. TextButton6.TextColor3 = Color3.new(1, 1, 1)
  1395. TextButton6.TextSize = 24
  1396. TextButton6.TextWrap = true
  1397. TextButton6.TextWrapped = true
  1398. TextButton7.Name = "Inventory"
  1399. TextButton7.Parent = Frame1
  1400. TextButton7.Position = UDim2.new(0.224489808, 0, 0.541577637, 0)
  1401. TextButton7.Size = UDim2.new(0, 100, 0, 100)
  1402. TextButton7.BackgroundColor = BrickColor.new("Sand violet metallic")
  1403. TextButton7.BackgroundColor3 = Color3.new(0.576471, 0.576471, 0.576471)
  1404. TextButton7.BackgroundTransparency = 0.5
  1405. TextButton7.Font = Enum.Font.Arcade
  1406. TextButton7.FontSize = Enum.FontSize.Size24
  1407. TextButton7.Text = "Inventory"
  1408. TextButton7.TextColor = BrickColor.new("Institutional white")
  1409. TextButton7.TextColor3 = Color3.new(1, 1, 1)
  1410. TextButton7.TextSize = 24
  1411. TextButton7.TextWrap = true
  1412. TextButton7.TextWrapped = true
  1413. Invbutton = TextButton7
  1414. CrouchButton = TextButton6
  1415. SwordButton = TextButton5
  1416. CBlockButton = TextButton4
  1417. SignButton = TextButton3
  1418. PBlockButton = TextButton2
  1419. local invGui = Instance.new("ScreenGui")
  1420. invGui.Parent = player.PlayerGui
  1421. local creativeInv = Instance.new("Frame", invGui)
  1422. creativeInv.BackgroundTransparency = 1
  1423. creativeInv.Position = UDim2.new(0.5, -170, 0.5, -202)
  1424.  
  1425. creativeInv.Visible = false
  1426.  
  1427. -- creative inventory GUI...
  1428.  
  1429. local blackOut = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0),
  1430. Color3.new(0/255, 0/255, 0/255), 0.3, invGui, 1)
  1431. blackOut.Visible = false
  1432.  
  1433. creativeInv.Changed:connect(function()
  1434. blackOut.Visible = creativeInv.Visible
  1435. end)
  1436.  
  1437. local changeLog = Instance.new("TextLabel", invGui)
  1438. changeLog.Text = Changelog
  1439. changeLog.Font = "SourceSans"
  1440. changeLog.FontSize = Enum.FontSize.Size12
  1441. changeLog.Size = UDim2.new(0, changeLog.TextBounds.X, 0, changeLog.TextBounds.Y + 2)
  1442. changeLog.BackgroundColor3 = Color3.new(0, 0, 0)
  1443. changeLog.BorderSizePixel = 0
  1444. changeLog.BackgroundTransparency = 0.5
  1445. changeLog.Position = UDim2.new(0.5, -changeLog.Size.X.Offset/2, 0.5, -changeLog.Size.Y.Offset/2)
  1446. changeLog.TextColor3 = Color3.new(1, 1, 1)
  1447. changeLog.TextXAlignment = "Left"
  1448. changeLog.TextYAlignment = "Top"
  1449.  
  1450. local coolButton = Instance.new("TextButton", changeLog)
  1451. coolButton.Position = UDim2.new(1, -17, 0, 1)
  1452. coolButton.Size = UDim2.new(0, 16, 0, 12)
  1453. coolButton.Text = "X"
  1454. coolButton.Font = "SourceSans"
  1455. coolButton.FontSize = Enum.FontSize.Size12
  1456. coolButton.BorderSizePixel = 0
  1457. coolButton.BackgroundColor3 = Color3.new(1, 0, 0)
  1458. coolButton.BackgroundTransparency = 0.2
  1459. coolButton.TextColor3 = Color3.new(1, 1, 1)
  1460. coolButton.TextStrokeTransparency = 0.5
  1461. coolButton.ZIndex = 2
  1462.  
  1463. local line = makeSquare(UDim2.new(0, 0, 1, -14), UDim2.new(1, 0, 0, 14),
  1464. Color3.new(0, 0, 0), 0.75, changeLog, 2)
  1465.  
  1466. local line2 = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 0, 14),
  1467. Color3.new(1, 1, 1), 0.9, changeLog, 1)
  1468.  
  1469. line2.Text = "Change Log"
  1470. line2.TextColor3 = Color3.new(1, 1, 1)
  1471. line2.TextStrokeTransparency = 0.75
  1472. line2.Font = "SourceSans"
  1473. line2.FontSize = Enum.FontSize.Size12
  1474.  
  1475. line.Text = "Made by Depr1 (Hes the original creator)"
  1476. line.TextColor3 = Color3.new(1, 0.65, 0)
  1477. line.TextStrokeTransparency = 0.5
  1478. line.Font = "SourceSans"
  1479. line.FontSize = Enum.FontSize.Size14
  1480. line.TextXAlignment = "Left"
  1481.  
  1482. coolButton.MouseButton1Click:connect(function()
  1483. changeLog.Visible = false
  1484. end)
  1485.  
  1486. makeSquare(UDim2.new(0, -2, 0, 2), UDim2.new(0, 340, 0, 404),
  1487. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  1488. makeSquare(UDim2.new(0, 338, 0, 0), UDim2.new(0, 6, 0, 406),
  1489. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 2)
  1490. makeSquare(UDim2.new(0, 0, 0, 404), UDim2.new(0, 342, 0, 4),
  1491. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 3)
  1492. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 338, 0, 402),
  1493. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  1494. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 4, 0, 406),
  1495. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 3)
  1496. makeSquare(UDim2.new(0, -2, 0, -4), UDim2.new(0, 342, 0, 6),
  1497. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 2)
  1498. makeSquare(UDim2.new(0, 340, 0, -2), UDim2.new(0, 2, 0, 2),
  1499. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 2)
  1500. makeSquare(UDim2.new(0, 340, 0, -4), UDim2.new(0, 2, 0, 4),
  1501. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1502. makeSquare(UDim2.new(0, 342, 0, -2), UDim2.new(0, 2, 0, 2),
  1503. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1504. makeSquare(UDim2.new(0, 344, 0, 0), UDim2.new(0, 2, 0, 406),
  1505. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1506. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 4),
  1507. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1508. makeSquare(UDim2.new(0, -2, 0, -6), UDim2.new(0, 342, 0, 4),
  1509. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1510. makeSquare(UDim2.new(0, 0, 0, 406), UDim2.new(0, 342, 0, 4),
  1511. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1512. makeSquare(UDim2.new(0, 342, 0, 404), UDim2.new(0, 2, 0, 4),
  1513. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1514. makeSquare(UDim2.new(0, -4, 0, 404), UDim2.new(0, 2, 0, 2),
  1515. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1516. makeSquare(UDim2.new(0, -2, 0, 406), UDim2.new(0, 2, 0, 2),
  1517. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1518. makeSquare(UDim2.new(0, -6, 0, -2), UDim2.new(0, 2, 0, 406),
  1519. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1520. local text = makeSquare(UDim2.new(0, 4, 0, 8), UDim2.new(0, 0, 0, 0), Color3.new(0/255, 0/255, 0/255), 1, creativeInv, 3)
  1521. text.Text = "Creative Inventory"
  1522. text.Font = "SourceSansSemibold"
  1523. text.TextSize = 14
  1524. text.TextXAlignment = "Left"
  1525. --
  1526. local draggingBlockPicture = Instance.new("ImageLabel", invGui)
  1527. draggingBlockPicture.BackgroundTransparency = 1
  1528. draggingBlockPicture.Size = UDim2.new(0, 32, 0, 32)
  1529. draggingBlockPicture.ZIndex = 5
  1530. coroutine.resume(coroutine.create(function()
  1531. local invMouse = player:GetMouse()
  1532. --local RS = game:GetService("RunService").RenderStepped
  1533. invMouse.Button2Down:connect(function()
  1534. draggingBlock = nil
  1535. end)
  1536. while RS:wait() do
  1537. --draggingBlockPicture.Position = UDim2.new(0, invMouse.X - 16, 0, invMouse.Y - 16)
  1538. if draggingBlock ~= nil then
  1539. draggingBlockPicture.Image = ""
  1540. else
  1541. draggingBlockPicture.Image = ""
  1542. end
  1543. end
  1544. end))
  1545.  
  1546. local done = false
  1547. local x = 0
  1548. local y = 0
  1549.  
  1550. for i,b in pairs(creativeInventory) do
  1551. local display = ""
  1552. if b.displayTex == "" then
  1553. display = b.frontTex
  1554. else
  1555. if b.displayTex then
  1556. display = b.displayTex
  1557. end
  1558. end
  1559. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), display, creativeInv, 4).MouseButton1Down:connect(function()
  1560. if draggingBlock == nil then
  1561. draggingBlock = b
  1562. end
  1563. end)
  1564. x = x + 1
  1565. if x >= 8 then
  1566. x = 0
  1567. y = y + 1
  1568. end
  1569. end
  1570. if x == 0 then done = true end
  1571. while x < 8 and done == false do
  1572. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), "", creativeInv, 4)
  1573. x = x + 1
  1574. end
  1575. for i = 1, 9 do
  1576. if toolBar[i] ~= nil then
  1577. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), toolBar[i].frontTex, creativeInv, 4)
  1578. invSlot.MouseButton2Down:connect(function()
  1579. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1580. if imgLabel then
  1581. toolBar[i] = nil
  1582. imgLabel.Image = ""
  1583. end
  1584. end)
  1585. invSlot.MouseButton1Down:connect(function()
  1586. --updateHand = true
  1587. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1588. if toolBar[i] == nil then
  1589. toolBar[i] = draggingBlock
  1590. imgLabel.Image = draggingBlock.frontTex
  1591. draggingBlock = nil
  1592. return
  1593. end
  1594. if toolBar[i] ~= nil and draggingBlock == nil then
  1595. draggingBlock = toolBar[i]
  1596. toolBar[i] = nil
  1597. imgLabel.Image = ""
  1598. return
  1599. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1600. --draggingBlock = toolBar[i]
  1601. --toolBar[i] = nil
  1602. imgLabel.Image = ""
  1603. local temp = toolBar[i]
  1604. toolBar[i] = draggingBlock
  1605. if imgLabel and draggingBlock ~= nil then
  1606. imgLabel.Image = draggingBlock.frontTex
  1607. end
  1608. if imgLabel and draggingBlock == nil then
  1609. imgLabel.Image = ""
  1610. end
  1611. draggingBlock = temp
  1612. return
  1613. end
  1614. end)
  1615. else
  1616. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), "", creativeInv, 4)
  1617. invSlot.MouseButton2Down:connect(function()
  1618. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1619. if imgLabel then
  1620. toolBar[i] = nil
  1621. imgLabel.Image = ""
  1622. end
  1623. end)
  1624. invSlot.MouseButton1Down:connect(function()
  1625. --updateHand = true
  1626. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1627. if toolBar[i] == nil then
  1628. toolBar[i] = draggingBlock
  1629. imgLabel.Image = draggingBlock.frontTex
  1630. draggingBlock = nil
  1631. return
  1632. end
  1633. if toolBar[i] ~= nil and draggingBlock == nil then
  1634. draggingBlock = toolBar[i]
  1635. toolBar[i] = nil
  1636. imgLabel.Image = ""
  1637. return
  1638. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1639. --draggingBlock = toolBar[i]
  1640. --toolBar[i] = nil
  1641. imgLabel.Image = ""
  1642. local temp = toolBar[i]
  1643. toolBar[i] = draggingBlock
  1644. if imgLabel and draggingBlock ~= nil then
  1645. imgLabel.Image = draggingBlock.frontTex
  1646. end
  1647. if imgLabel and draggingBlock == nil then
  1648. imgLabel.Image = ""
  1649. end
  1650. draggingBlock = temp
  1651. return
  1652. end
  1653. end)
  1654. end
  1655. end
  1656. return creativeInv
  1657. end
  1658. end
  1659.  
  1660.  
  1661. --[]
  1662. local gui = player.PlayerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", player.PlayerGui)
  1663. gui.Name = "ToolBar"
  1664.  
  1665. makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 364, 0, 44),
  1666. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1667.  
  1668. local blocks = {"Dirt", "Grass", "Stone", "Diamond_Ore", "Diamond_Block", "Wood_Planks", "Oak_Log"}
  1669. for i = 1, 9 do
  1670. if toolBar[blocks[i]] ~= nil then
  1671. putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[blocks[i]].frontTex)
  1672. else
  1673. putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
  1674. end
  1675. end
  1676.  
  1677. for i = 1, 9 do
  1678. if toolBar[i] ~= nil then
  1679. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[i].frontTex)
  1680. coroutine.resume(coroutine.create(function()
  1681. while wait() do
  1682. if toolBar[i] ~= nil then
  1683. if toolBar[i].displayTex == "" then
  1684. img.Image = toolBar[i].frontTex
  1685. else
  1686. img.Image = toolBar[i].displayTex
  1687. end
  1688. else
  1689. img.Image = ""
  1690. end
  1691. end
  1692. end))
  1693. else
  1694. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
  1695. coroutine.resume(coroutine.create(function()
  1696. while wait() do
  1697. if toolBar[i] ~= nil then
  1698. if toolBar[i].displayTex == "" then
  1699. img.Image = toolBar[i].frontTex
  1700. else
  1701. img.Image = toolBar[i].displayTex
  1702. end
  1703. else
  1704. img.Image = ""
  1705. end
  1706. end
  1707. end))
  1708. end
  1709. end
  1710. local creativeInventoryGUI = makeInventory()
  1711.  
  1712. local humRootPart = char:WaitForChild("HumanoidRootPart")
  1713. local head = char:WaitForChild("Head")
  1714. local torso = char:WaitForChild("Torso")
  1715. local lArm = char:WaitForChild("Left Arm")
  1716. local rArm = char:WaitForChild("Right Arm")
  1717. local lLeg = char:WaitForChild("Left Leg")
  1718. local rLeg = char:WaitForChild("Right Leg")
  1719. head.Size = Vector3.new(1.3, 1.3, 1.3)
  1720. head:WaitForChild("Mesh"):Destroy()
  1721. head:WaitForChild("face"):Destroy()
  1722.  
  1723. headdecal6 = Instance.new("Decal",head)
  1724. headdecal6.Face = "Front"
  1725. headdecal6.Texture = faces[math.random(1,#faces)]
  1726. if headdecal6.Texture == "http://www.roblox.com/asset/?id=36047310" then
  1727. torsodecal1 = Instance.new("Decal",torso)
  1728. torsodecal1.Face = "Left"
  1729. torsodecal1.Texture = "http://www.roblox.com/asset/?id=38934762"
  1730. torsodecal2 = Instance.new("Decal",torso)
  1731. torsodecal2.Face = "Bottom"
  1732. torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934740"
  1733. torsodecal3 = Instance.new("Decal",torso)
  1734. torsodecal3.Face = "Top"
  1735. torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934780"
  1736. torsodecal4 = Instance.new("Decal",torso)
  1737. torsodecal4.Face = "Back"
  1738. torsodecal4.Texture = "http://www.roblox.com/asset/?id=38934731"
  1739. torsodecal5 = Instance.new("Decal",torso)
  1740. torsodecal5.Face = "Right"
  1741. torsodecal5.Texture = "http://www.roblox.com/asset/?id=38934762"
  1742. torsodecal6 = Instance.new("Decal",torso)
  1743. torsodecal6.Face = "Front"
  1744. torsodecal6.Texture = "http://www.roblox.com/asset/?id=38934753"
  1745. for i,v in pairs(char:GetChildren()) do
  1746. if v.ClassName == "Part" and v.Name == "Left Leg" then
  1747. torsodecal1 = Instance.new("Decal",v)
  1748. torsodecal1.Face = "Left"
  1749. torsodecal1.Texture = "http://www.roblox.com/asset/?id=38936255"
  1750. torsodecal2 = Instance.new("Decal",v)
  1751. torsodecal2.Face = "Bottom"
  1752. torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934712"
  1753. torsodecal3 = Instance.new("Decal",v)
  1754. torsodecal3.Face = "Top"
  1755. torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934719"
  1756. torsodecal4 = Instance.new("Decal",v)
  1757. torsodecal4.Face = "Back"
  1758. torsodecal4.Texture = "http://www.roblox.com/asset/?id=38936209"
  1759. torsodecal5 = Instance.new("Decal",v)
  1760. torsodecal5.Face = "Right"
  1761. torsodecal5.Texture = "http://www.roblox.com/asset/?id=38936242"
  1762. torsodecal6 = Instance.new("Decal",v)
  1763. torsodecal6.Face = "Front"
  1764. torsodecal6.Texture = "http://www.roblox.com/asset/?id=38936226"
  1765. elseif v.ClassName == "Part" and v.Name == "Right Leg" then
  1766. torsodecal1 = Instance.new("Decal",v)
  1767. torsodecal1.Face = "Left"
  1768. torsodecal1.Texture = "http://www.roblox.com/asset/?id=38936242"
  1769. torsodecal2 = Instance.new("Decal",v)
  1770. torsodecal2.Face = "Bottom"
  1771. torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934712"
  1772. torsodecal3 = Instance.new("Decal",v)
  1773. torsodecal3.Face = "Top"
  1774. torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934719"
  1775. torsodecal4 = Instance.new("Decal",v)
  1776. torsodecal4.Face = "Back"
  1777. torsodecal4.Texture = "http://www.roblox.com/asset/?id=38936226"
  1778. torsodecal5 = Instance.new("Decal",v)
  1779. torsodecal5.Face = "Right"
  1780. torsodecal5.Texture = "http://www.roblox.com/asset/?id=38936255"
  1781. torsodecal6 = Instance.new("Decal",v)
  1782. torsodecal6.Face = "Front"
  1783. torsodecal6.Texture = "http://www.roblox.com/asset/?id=38936209"
  1784. elseif v.ClassName == "Part" and v.Name == "Left Arm" then
  1785. torsodecal1 = Instance.new("Decal",v)
  1786. torsodecal1.Face = "Left"
  1787. torsodecal1.Texture = "http://www.roblox.com/asset/?id=38934601"
  1788. torsodecal2 = Instance.new("Decal",v)
  1789. torsodecal2.Face = "Bottom"
  1790. torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934568"
  1791. torsodecal3 = Instance.new("Decal",v)
  1792. torsodecal3.Face = "Top"
  1793. torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934613"
  1794. torsodecal4 = Instance.new("Decal",v)
  1795. torsodecal4.Face = "Back"
  1796. torsodecal4.Texture = "http://www.roblox.com/asset/?id=38934560"
  1797. torsodecal5 = Instance.new("Decal",v)
  1798. torsodecal5.Face = "Right"
  1799. torsodecal5.Texture = "http://www.roblox.com/asset/?id=38934591"
  1800. torsodecal6 = Instance.new("Decal",v)
  1801. torsodecal6.Face = "Front"
  1802. torsodecal6.Texture = "http://www.roblox.com/asset/?id=38934581"
  1803. elseif v.ClassName == "Part" and v.Name == "Right Arm" then
  1804. torsodecal1 = Instance.new("Decal",v)
  1805. torsodecal1.Face = "Left"
  1806. torsodecal1.Texture = "http://www.roblox.com/asset/?id=38934601"
  1807. torsodecal2 = Instance.new("Decal",v)
  1808. torsodecal2.Face = "Bottom"
  1809. torsodecal2.Texture = "http://www.roblox.com/asset/?id=38934568"
  1810. torsodecal3 = Instance.new("Decal",v)
  1811. torsodecal3.Face = "Top"
  1812. torsodecal3.Texture = "http://www.roblox.com/asset/?id=38934613"
  1813. torsodecal4 = Instance.new("Decal",v)
  1814. torsodecal4.Face = "Back"
  1815. torsodecal4.Texture = "http://www.roblox.com/asset/?id=38934581"
  1816. torsodecal5 = Instance.new("Decal",v)
  1817. torsodecal5.Face = "Right"
  1818. torsodecal5.Texture = "http://www.roblox.com/asset/?id=38934591"
  1819. torsodecal6 = Instance.new("Decal",v)
  1820. torsodecal6.Face = "Front"
  1821. torsodecal6.Texture = "http://www.roblox.com/asset/?id=38934560"
  1822. diamondsword = Instance.new("Part",char)
  1823. diamondsword.Name = "Diamond Sword"
  1824. diamondsword.CanCollide = false
  1825. diamondsword.Size = Vector3.new(2.72, 0.17, 2.72)
  1826. diamondswordmesh = Instance.new("SpecialMesh",diamondsword)
  1827. diamondswordmesh.MeshId = 'rbxassetid://3676810102'
  1828. diamondswordmesh.Scale = Vector3.new(0.162, 0.162, 0.162)
  1829. diamondswordmesh.TextureId = 'rbxassetid://3676810220'
  1830. diamondswordweld = Instance.new("Weld",char)
  1831. diamondswordweld.Name = 'SwordWeld'
  1832. diamondswordweld.C0 = CFrame.new(0,-0.68,-1.2) * CFrame.Angles(-math.rad(45),-math.rad(0),-math.rad(-90))
  1833. diamondswordweld.Part0 = lArm
  1834. diamondswordweld.Part1 = diamondsword
  1835.  
  1836. Model0 = Instance.new("Model")
  1837. Part1 = Instance.new("Part")
  1838. Weld2 = Instance.new("Weld")
  1839. CFrameValue3 = Instance.new("CFrameValue")
  1840. Part4 = Instance.new("Part")
  1841. Weld5 = Instance.new("Weld")
  1842. CFrameValue6 = Instance.new("CFrameValue")
  1843. Part7 = Instance.new("Part")
  1844. Weld8 = Instance.new("Weld")
  1845. CFrameValue9 = Instance.new("CFrameValue")
  1846. Part10 = Instance.new("Part")
  1847. Weld11 = Instance.new("Weld")
  1848. CFrameValue12 = Instance.new("CFrameValue")
  1849. Part13 = Instance.new("Part")
  1850. Weld14 = Instance.new("Weld")
  1851. CFrameValue15 = Instance.new("CFrameValue")
  1852. Part16 = Instance.new("Part")
  1853. Weld17 = Instance.new("Weld")
  1854. CFrameValue18 = Instance.new("CFrameValue")
  1855. Part19 = Instance.new("Part")
  1856. Weld20 = Instance.new("Weld")
  1857. CFrameValue21 = Instance.new("CFrameValue")
  1858. Model22 = Instance.new("Model")
  1859. Part23 = Instance.new("Part")
  1860. Weld24 = Instance.new("Weld")
  1861. CFrameValue25 = Instance.new("CFrameValue")
  1862. Part26 = Instance.new("Part")
  1863. Weld27 = Instance.new("Weld")
  1864. CFrameValue28 = Instance.new("CFrameValue")
  1865. Part29 = Instance.new("Part")
  1866. Weld30 = Instance.new("Weld")
  1867. CFrameValue31 = Instance.new("CFrameValue")
  1868. Part32 = Instance.new("Part")
  1869. Weld33 = Instance.new("Weld")
  1870. CFrameValue34 = Instance.new("CFrameValue")
  1871. Model0.Parent = char
  1872. Part1.Name = "arm"
  1873. Part1.Parent = Model0
  1874. Part1.CFrame = CFrame.new(-104.449295, 3.47945023, 38.9690971, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1875. Part1.Orientation = Vector3.new(90, 0, 0)
  1876. Part1.Position = Vector3.new(-104.449295, 3.47945023, 38.9690971)
  1877. Part1.Rotation = Vector3.new(90, 0, 0)
  1878. Part1.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
  1879. Part1.BottomSurface = Enum.SurfaceType.Smooth
  1880. Part1.Material = Enum.Material.DiamondPlate
  1881. Part1.TopSurface = Enum.SurfaceType.Smooth
  1882. Weld2.Name = "qCFrameWeldThingy"
  1883. Weld2.Parent = Part1
  1884. Weld2.C1 = CFrame.new(-0.503372192, -1.33377743, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1885. Weld2.Part0 = rArm
  1886. Weld2.Part1 = Part1
  1887. Weld2.part1 = Part1
  1888. CFrameValue3.Name = "qRelativeCFrameWeldValue"
  1889. CFrameValue3.Parent = Part1
  1890. CFrameValue3.Value = CFrame.new(-0.503372192, -1.33377743, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1891. Part4.Parent = Model0
  1892. Part4.CFrame = CFrame.new(-104.449356, 2.60078335, 37.4313202, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1893. Part4.Orientation = Vector3.new(90, 0, 0)
  1894. Part4.Position = Vector3.new(-104.449356, 2.60078335, 37.4313202)
  1895. Part4.Rotation = Vector3.new(90, 0, 0)
  1896. Part4.Color = Color3.new(0.423529, 0.345098, 0.294118)
  1897. Part4.Size = Vector3.new(0.298142225, 3.45217299, 2.15760803)
  1898. Part4.BottomSurface = Enum.SurfaceType.Smooth
  1899. Part4.BrickColor = BrickColor.new("Pine Cone")
  1900. Part4.Material = Enum.Material.Wood
  1901. Part4.TopSurface = Enum.SurfaceType.Smooth
  1902. Part4.brickColor = BrickColor.new("Pine Cone")
  1903. Weld5.Name = "qCFrameWeldThingy"
  1904. Weld5.Parent = Part4
  1905. Weld5.C1 = CFrame.new(-0.503311157, 0.203998566, -0.324219704, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1906. Weld5.Part0 = rArm
  1907. Weld5.Part1 = Part4
  1908. Weld5.part1 = Part4
  1909. CFrameValue6.Name = "qRelativeCFrameWeldValue"
  1910. CFrameValue6.Parent = Part4
  1911. CFrameValue6.Value = CFrame.new(-0.503311157, 0.203998566, -0.324219704, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1912. Part7.Parent = Model0
  1913. Part7.CFrame = CFrame.new(-104.449295, 3.47944736, 37.5411606, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1914. Part7.Orientation = Vector3.new(90, 0, 0)
  1915. Part7.Position = Vector3.new(-104.449295, 3.47944736, 37.5411606)
  1916. Part7.Rotation = Vector3.new(90, 0, 0)
  1917. Part7.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
  1918. Part7.BottomSurface = Enum.SurfaceType.Smooth
  1919. Part7.Material = Enum.Material.DiamondPlate
  1920. Part7.TopSurface = Enum.SurfaceType.Smooth
  1921. Weld8.Name = "qCFrameWeldThingy"
  1922. Weld8.Parent = Part7
  1923. Weld8.C1 = CFrame.new(-0.503372192, 0.0941581726, 0.554444313, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1924. Weld8.Part0 = rArm
  1925. Weld8.Part1 = Part7
  1926. Weld8.part1 = Part7
  1927. CFrameValue9.Name = "qRelativeCFrameWeldValue"
  1928. CFrameValue9.Parent = Part7
  1929. CFrameValue9.Value = CFrame.new(-0.503372192, 0.0941581726, 0.554444313, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1930. Part10.Parent = Model0
  1931. Part10.CFrame = CFrame.new(-104.449265, 1.76126957, 36.003376, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1932. Part10.Orientation = Vector3.new(90, 0, 0)
  1933. Part10.Position = Vector3.new(-104.449265, 1.76126957, 36.003376)
  1934. Part10.Rotation = Vector3.new(90, 0, 0)
  1935. Part10.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
  1936. Part10.BottomSurface = Enum.SurfaceType.Smooth
  1937. Part10.Material = Enum.Material.DiamondPlate
  1938. Part10.TopSurface = Enum.SurfaceType.Smooth
  1939. Weld11.Name = "qCFrameWeldThingy"
  1940. Weld11.Parent = Part10
  1941. Weld11.C1 = CFrame.new(-0.50340271, 1.63194132, -1.16373348, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1942. Weld11.Part0 = rArm
  1943. Weld11.Part1 = Part10
  1944. Weld11.part1 = Part10
  1945. CFrameValue12.Name = "qRelativeCFrameWeldValue"
  1946. CFrameValue12.Parent = Part10
  1947. CFrameValue12.Value = CFrame.new(-0.50340271, 1.63194132, -1.16373348, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1948. Part13.Parent = Model0
  1949. Part13.CFrame = CFrame.new(-104.449265, 1.7612716, 37.541153, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1950. Part13.Orientation = Vector3.new(90, 0, 0)
  1951. Part13.Position = Vector3.new(-104.449265, 1.7612716, 37.541153)
  1952. Part13.Rotation = Vector3.new(90, 0, 0)
  1953. Part13.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
  1954. Part13.BottomSurface = Enum.SurfaceType.Smooth
  1955. Part13.Material = Enum.Material.DiamondPlate
  1956. Part13.TopSurface = Enum.SurfaceType.Smooth
  1957. Weld14.Name = "qCFrameWeldThingy"
  1958. Weld14.Parent = Part13
  1959. Weld14.C1 = CFrame.new(-0.50340271, 0.0941648483, -1.16373146, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1960. Weld14.Part0 = rArm
  1961. Weld14.Part1 = Part13
  1962. Weld14.part1 = Part13
  1963. CFrameValue15.Name = "qRelativeCFrameWeldValue"
  1964. CFrameValue15.Parent = Part13
  1965. CFrameValue15.Value = CFrame.new(-0.50340271, 0.0941648483, -1.16373146, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1966. Part16.Parent = Model0
  1967. Part16.CFrame = CFrame.new(-104.449265, 1.76126766, 38.9690971, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1968. Part16.Orientation = Vector3.new(90, 0, 0)
  1969. Part16.Position = Vector3.new(-104.449265, 1.76126766, 38.9690971)
  1970. Part16.Rotation = Vector3.new(90, 0, 0)
  1971. Part16.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
  1972. Part16.BottomSurface = Enum.SurfaceType.Smooth
  1973. Part16.Material = Enum.Material.DiamondPlate
  1974. Part16.TopSurface = Enum.SurfaceType.Smooth
  1975. Weld17.Name = "qCFrameWeldThingy"
  1976. Weld17.Parent = Part16
  1977. Weld17.C1 = CFrame.new(-0.50340271, -1.33377934, -1.16373539, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1978. Weld17.Part0 = rArm
  1979. Weld17.Part1 = Part16
  1980. Weld17.part1 = Part16
  1981. CFrameValue18.Name = "qRelativeCFrameWeldValue"
  1982. CFrameValue18.Parent = Part16
  1983. CFrameValue18.Value = CFrame.new(-0.50340271, -1.33377934, -1.16373539, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1984. Part19.Parent = Model0
  1985. Part19.CFrame = CFrame.new(-104.449295, 2.58501124, 37.431324, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  1986. Part19.Orientation = Vector3.new(90, 0, 0)
  1987. Part19.Position = Vector3.new(-104.449295, 2.58501124, 37.431324)
  1988. Part19.Rotation = Vector3.new(90, 0, 0)
  1989. Part19.Size = Vector3.new(0.282450527, 3.96999884, 2.42436695)
  1990. Part19.BottomSurface = Enum.SurfaceType.Smooth
  1991. Part19.Material = Enum.Material.DiamondPlate
  1992. Part19.TopSurface = Enum.SurfaceType.Smooth
  1993. Weld20.Name = "qCFrameWeldThingy"
  1994. Weld20.Parent = Part19
  1995. Weld20.C1 = CFrame.new(-0.503372192, 0.203993797, -0.339991808, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  1996. Weld20.Part0 = rArm
  1997. Weld20.Part1 = Part19
  1998. Weld20.part1 = Part19
  1999. CFrameValue21.Name = "qRelativeCFrameWeldValue"
  2000. CFrameValue21.Parent = Part19
  2001. CFrameValue21.Value = CFrame.new(-0.503372192, 0.203993797, -0.339991808, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  2002. Model22.Parent = Model0
  2003. Part23.Parent = Model22
  2004. Part23.CFrame = CFrame.new(-105.368912, 2.64785433, 37.6186333, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  2005. Part23.Orientation = Vector3.new(0, 180, 180)
  2006. Part23.Position = Vector3.new(-105.368912, 2.64785433, 37.6186333)
  2007. Part23.Rotation = Vector3.new(-180, 0, 0)
  2008. Part23.Size = Vector3.new(0.13337943, 0.0784584209, 0.794268548)
  2009. Part23.BottomSurface = Enum.SurfaceType.Smooth
  2010. Part23.Material = Enum.Material.DiamondPlate
  2011. Part23.TopSurface = Enum.SurfaceType.Smooth
  2012. Weld24.Name = "qCFrameWeldThingy"
  2013. Weld24.Parent = Part23
  2014. Weld24.C1 = CFrame.new(0.416244507, -0.277148724, -0.0166854858, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
  2015. Weld24.Part0 = rArm
  2016. Weld24.Part1 = Part23
  2017. Weld24.part1 = Part23
  2018. CFrameValue25.Name = "qRelativeCFrameWeldValue"
  2019. CFrameValue25.Parent = Part23
  2020. CFrameValue25.Value = CFrame.new(0.416244507, -0.277148724, -0.0166854858, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
  2021. Part26.Parent = Model22
  2022. Part26.CFrame = CFrame.new(-104.894287, 2.64785314, 38.0197792, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  2023. Part26.Orientation = Vector3.new(0, 180, 180)
  2024. Part26.Position = Vector3.new(-104.894287, 2.64785314, 38.0197792)
  2025. Part26.Rotation = Vector3.new(-180, 0, 0)
  2026. Part26.Size = Vector3.new(1.06258857, 0.0784584209, 0.101996109)
  2027. Part26.BottomSurface = Enum.SurfaceType.Smooth
  2028. Part26.Material = Enum.Material.DiamondPlate
  2029. Part26.TopSurface = Enum.SurfaceType.Smooth
  2030. Weld27.Name = "qCFrameWeldThingy"
  2031. Weld27.Parent = Part26
  2032. Weld27.C1 = CFrame.new(-0.058380127, -0.277149916, 0.384461403, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
  2033. Weld27.Part0 = rArm
  2034. Weld27.Part1 = Part26
  2035. Weld27.part1 = Part26
  2036. CFrameValue28.Name = "qRelativeCFrameWeldValue"
  2037. CFrameValue28.Parent = Part26
  2038. CFrameValue28.Value = CFrame.new(-0.058380127, -0.277149916, 0.384461403, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
  2039. Part29.Parent = Model22
  2040. Part29.CFrame = CFrame.new(-104.894409, 2.64785028, 37.2525597, 1, 0, 0, 0, -1, 0, 0, 0, -1)
  2041. Part29.Orientation = Vector3.new(0, 180, 180)
  2042. Part29.Position = Vector3.new(-104.894409, 2.64785028, 37.2525597)
  2043. Part29.Rotation = Vector3.new(-180, 0, 0)
  2044. Part29.Size = Vector3.new(1.06258821, 0.0784584209, 0.101996109)
  2045. Part29.BottomSurface = Enum.SurfaceType.Smooth
  2046. Part29.Material = Enum.Material.DiamondPlate
  2047. Part29.TopSurface = Enum.SurfaceType.Smooth
  2048. Weld30.Name = "qCFrameWeldThingy"
  2049. Weld30.Parent = Part29
  2050. Weld30.C1 = CFrame.new(-0.0582580566, -0.277152777, -0.382757664, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
  2051. Weld30.Part0 = rArm
  2052. Weld30.Part1 = Part29
  2053. Weld30.part1 = Part29
  2054. CFrameValue31.Name = "qRelativeCFrameWeldValue"
  2055. CFrameValue31.Parent = Part29
  2056. CFrameValue31.Value = CFrame.new(-0.0582580566, -0.277152777, -0.382757664, 1, 0, -8.74227766e-08, 0, -1, 0, -8.74227766e-08, 0, -1)
  2057. Part32.Parent = Model0
  2058. Part32.CFrame = CFrame.new(-104.449295, 3.47945023, 36.0033798, 1, 0, 0, 0, 0, -1, 0, 1, 0)
  2059. Part32.Orientation = Vector3.new(90, 0, 0)
  2060. Part32.Position = Vector3.new(-104.449295, 3.47945023, 36.0033798)
  2061. Part32.Rotation = Vector3.new(90, 0, 0)
  2062. Part32.Size = Vector3.new(0.32952562, 0.0784584209, 0.101996109)
  2063. Part32.BottomSurface = Enum.SurfaceType.Smooth
  2064. Part32.Material = Enum.Material.DiamondPlate
  2065. Part32.TopSurface = Enum.SurfaceType.Smooth
  2066. Weld33.Name = "qCFrameWeldThingy"
  2067. Weld33.Parent = Part32
  2068. Weld33.C1 = CFrame.new(-0.503372192, 1.63193941, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  2069. Weld33.Part0 = rArm
  2070. Weld33.Part1 = Part32
  2071. Weld33.part1 = Part32
  2072. CFrameValue34.Name = "qRelativeCFrameWeldValue"
  2073. CFrameValue34.Parent = Part32
  2074. CFrameValue34.Value = CFrame.new(-0.503372192, 1.63193941, 0.554447174, 1, 0, -8.74227766e-08, 8.74227766e-08, 0, 1, 0, -1, 0)
  2075. for i,v in pairs(Model0:GetDescendants()) do
  2076. if v.ClassName == "Part" then
  2077. v.Transparency = 1
  2078. v.CanCollide = false
  2079. v.Massless = true
  2080. end
  2081. end
  2082. end
  2083. end
  2084. shieldenabled = false
  2085. shieldblock = false
  2086.  
  2087. torso.Size = Vector3.new(1.3, 1.95, 0.65)
  2088. lArm.Size = Vector3.new(0.65, 1.95, 0.65)
  2089. rArm.Size = Vector3.new(0.65, 1.95, 0.65)
  2090. lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  2091. rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  2092. for _,p in pairs(char:GetChildren()) do
  2093. if p.ClassName == "Part" and p.Name ~= "DamagePart" and p.Name ~= "Diamond Sword" and p.Name ~= "HandItem" and p.Name ~= "HumanoidRootPart" and p.Name ~= "Left Arm" and p.Name ~= "Right Arm" then
  2094. local hit = Instance.new("Part", char)
  2095. hit.Name = "DamagePart"
  2096. hit.BrickColor = BrickColor.new("Bright red")
  2097. hit.Material = "SmoothPlastic"
  2098. hit.Transparency = 1
  2099. hit.Size = Vector3.new(p.Size.X + 0.001, p.Size.Y + 0.001, p.Size.Z + 0.001)
  2100. hit.CanCollide = false
  2101. weld = Instance.new("Weld",p)
  2102. weld.Part0 = p
  2103. weld.Part1 = hit
  2104. end
  2105. end
  2106. local hit0 = Instance.new("Part", char)
  2107. hit0.Name = "DamagePart"
  2108. hit0.BrickColor = BrickColor.new("Bright red")
  2109. hit0.Material = "SmoothPlastic"
  2110. hit0.Transparency = 1
  2111. hit0.Size = Vector3.new(lArm.Size.X + 0.001, lArm.Size.Y + 0.001, lArm.Size.Z + 0.001)
  2112. hit0.CanCollide = false
  2113. weldd = Instance.new("Weld",hit0)
  2114. weldd.Part0 = lArm
  2115. weldd.Part1 = hit0
  2116. local hit1 = Instance.new("Part", char)
  2117. hit1.Name = "DamagePart"
  2118. hit1.BrickColor = BrickColor.new("Bright red")
  2119. hit1.Material = "SmoothPlastic"
  2120. hit1.Transparency = 1
  2121. hit1.Size = Vector3.new(rArm.Size.X + 0.001, rArm.Size.Y + 0.001, rArm.Size.Z + 0.001)
  2122. hit1.CanCollide = false
  2123. welddd = Instance.new("Weld",hit1)
  2124. welddd.Part0 = rArm
  2125. welddd.Part1 = hit1
  2126. lS = Instance.new("Motor", torso)
  2127. lS.Name = "Left Shoulder"
  2128. lS.Part0 = lArm
  2129. lS.Part1 = torso
  2130. lS.C0 = CFrame.new(-0.325, 0.643, 0) * CFrame.Angles(0, 0, 0)
  2131. lS.C1 = CFrame.new(0.65, 0.643, 0)
  2132.  
  2133. rS = Instance.new("Motor", torso)
  2134. rS.Name = "Right Shoulder"
  2135. rS.Part0 = rArm
  2136. rS.Part1 = torso
  2137. rS.C0 = CFrame.new(-0.325, 0.643, 0) * CFrame.Angles(0, 0, 0)
  2138. rS.C1 = CFrame.new(-0.65, 0.643, 0) * CFrame.Angles(0, -math.rad(180), 0)
  2139.  
  2140. char.Humanoid:ClearAllChildren()
  2141. --char.Animate:Remove()
  2142. for _,cM in pairs(char:GetChildren()) do
  2143. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  2144. end
  2145. Instance.new("BlockMesh", torso)
  2146. Instance.new("BlockMesh", lLeg)
  2147. Instance.new("BlockMesh", rLeg)
  2148. blockmesharm = Instance.new("BlockMesh", lArm)
  2149. blockmesharm.Offset = Vector3.new(0,0.332,0)
  2150. blockmesharm2 = Instance.new("BlockMesh", rArm)
  2151. blockmesharm2.Offset = Vector3.new(0,0.332,0)
  2152. headdecal1 = Instance.new("Decal",head)
  2153. headdecal1.Face = "Left"
  2154. headdecal1.Texture = "http://www.roblox.com/asset/?id=36047323"
  2155. headdecal2 = Instance.new("Decal",head)
  2156. headdecal2.Face = "Bottom"
  2157. headdecal2.Texture = "http://www.roblox.com/asset/?id=36047347"
  2158. headdecal3 = Instance.new("Decal",head)
  2159. headdecal3.Face = "Top"
  2160. headdecal3.Texture = "http://www.roblox.com/asset/?id=36047341"
  2161. headdecal4 = Instance.new("Decal",head)
  2162. headdecal4.Face = "Back"
  2163. headdecal4.Texture = "http://www.roblox.com/asset/?id=36047330"
  2164. headdecal5 = Instance.new("Decal",head)
  2165. headdecal5.Face = "Right"
  2166. headdecal5.Texture = "http://www.roblox.com/asset/?id=36047315"
  2167. end
  2168. if headdecal6.Texture == "rbxassetid://295150002" then
  2169. torso.Size = Vector3.new(1.3, 1.95, 0.65)
  2170. lArm.Size = Vector3.new(0.58, 1.95, 0.65)
  2171. rArm.Size = Vector3.new(0.58, 1.95, 0.65)
  2172. lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  2173. rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  2174.  
  2175. --blockmesh1 = Instance.new("SpecialMesh", lArm)
  2176. --blockmesh1.Scale = Vector3.new(-0.7,1,1)
  2177. --blockmesh1.Offset = Vector3.new(-0.107, 0, 0)
  2178. --blockmesh2 = Instance.new("SpecialMesh", rArm)
  2179. --blockmesh2.Scale = Vector3.new(-0.7,1,1)
  2180. --blockmesh2.Offset = Vector3.new(-0.107, 0, 0)
  2181. char.Humanoid:ClearAllChildren()
  2182. --char.Animate:Remove()
  2183. char.Humanoid:ClearAllChildren()
  2184. --char.Animate:Remove()
  2185. for i,v in pairs(char:GetChildren()) do
  2186. if v.ClassName == "Shirt" and v.ClassName == "Pants" then
  2187. v:Destroy()
  2188. v.Parent = nil
  2189. end
  2190. end
  2191. wait(0.00)
  2192. alexshirt = Instance.new("Shirt",char)
  2193. alexshirt.ShirtTemplate = "rbxassetid://3977861054"
  2194. alexpants = Instance.new("Pants",char)
  2195. alexpants.PantsTemplate = "rbxassetid://2897639977"
  2196. for _,cM in pairs(char:GetChildren()) do
  2197. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  2198. end
  2199. lS = Instance.new("Motor", torso)
  2200. lS.Name = "Left Shoulder"
  2201. lS.Part0 = lArm
  2202. lS.Part1 = torso
  2203. lS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
  2204. lS.C1 = CFrame.new(0.58, 0.975, 0)
  2205. char:WaitForChild("Body Colors").HeadColor = BrickColor.new("Neon orange")
  2206. head.BrickColor = BrickColor.new("Neon orange")
  2207. head.Material = "SmoothPlastic"
  2208. rS = Instance.new("Motor", torso)
  2209. rS.Name = "Right Shoulder"
  2210. rS.Part0 = rArm
  2211. rS.Part1 = torso
  2212. rS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
  2213. diamondsword = Instance.new("Part",char)
  2214. diamondsword.Name = "Diamond Sword"
  2215. diamondsword.CanCollide = false
  2216. diamondsword.Size = Vector3.new(2.72, 0.17, 2.72)
  2217. diamondswordmesh = Instance.new("SpecialMesh",diamondsword)
  2218. diamondswordmesh.MeshId = 'rbxassetid://3676810102'
  2219. diamondswordmesh.Scale = Vector3.new(0.162, 0.162, 0.162)
  2220. diamondswordmesh.TextureId = 'rbxassetid://3676810220'
  2221. diamondswordweld = Instance.new("Weld",char)
  2222. diamondswordweld.Name = 'SwordWeld'
  2223. diamondswordweld.C0 = CFrame.new(0,-0.68,-1.2) * CFrame.Angles(-math.rad(45),-math.rad(0),-math.rad(-90))
  2224. diamondswordweld.Part0 = lArm
  2225. diamondswordweld.Part1 = diamondsword
  2226. rS.C1 = CFrame.new(-0.58, 0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
  2227. end
  2228. for _,p in pairs(char:GetChildren()) do
  2229. if p.ClassName == "Part" and p.Name ~= "DamagePart" and p.Name ~= "Diamond Sword" and p.Name ~= "HandItem" and p.Name ~= "HumanoidRootPart" and p.Name ~= "Left Arm" and p.Name ~= "Right Arm" then
  2230. local hit = Instance.new("Part", char)
  2231. hit.Name = "DamagePart"
  2232. hit.BrickColor = BrickColor.new("Bright red")
  2233. hit.Material = "SmoothPlastic"
  2234. hit.Transparency = 1
  2235. hit.Size = Vector3.new(p.Size.X + 0.001, p.Size.Y + 0.001, p.Size.Z + 0.001)
  2236. hit.CanCollide = false
  2237. weld = Instance.new("Weld",p)
  2238. weld.Part0 = p
  2239. weld.Part1 = hit
  2240. end
  2241. end
  2242. coroutine.resume(coroutine.create(function()
  2243. player = game.Players.LocalPlayer
  2244. char = player.Character
  2245. billnametag = Instance.new("BillboardGui",char.Head)
  2246. billnametag.StudsOffset = Vector3.new(0,1.5,0)
  2247. billnametag.ZIndexBehavior = "Global"
  2248. billnametag.LightInfluence = 1
  2249. billnametag.MaxDistance = math.huge
  2250. billnametag.AlwaysOnTop = true
  2251. frame = Instance.new("Frame",billnametag)
  2252. frame.AnchorPoint = Vector2.new(0, 0)
  2253. frame.Size = UDim2.new(1,0,1,0)
  2254. frame.BackgroundTransparency = 1
  2255. frame.BackgroundColor3 = Color3.new(0,0,0)
  2256. frame.Position = UDim2.new(0,0,0,0)
  2257. --billnametag.PlayerToHideFrom = player
  2258. textlabel = Instance.new("TextLabel",frame)
  2259. --textlabel.BorderSizePixel = 0
  2260. textlabel.Font = "Arcade"
  2261. textlabel.Size = UDim2.new(1,0,1,0)
  2262. textlabel.Position = UDim2.new(0,1,0,1)
  2263. textlabel.Text = player.Name
  2264. textlabel.BackgroundColor3 = Color3.new(0,0,0)
  2265. textlabel.TextColor3 = Color3.fromRGB(255,255,255)
  2266. textlabel.BackgroundTransparency = 0.5
  2267. textlabel.AnchorPoint = Vector2.new(0,0)
  2268. --textlabel.ClipsDescendants = true
  2269. --textlabel.TextScaled = true
  2270. textlabel.TextSize = 20
  2271. billnametag.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
  2272. frame.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
  2273. billnametag.SizeOffset = Vector2.new(-textlabel.TextBounds.X/200 + 0.5, 0)
  2274. if player.Name == "noah878786" or player.Name == "noah878788" then
  2275. textlabel.TextColor3 = Color3.fromRGB(255, 255, 0)
  2276. end
  2277. if player.Name == "guest712921" then
  2278. textlabel.TextColor3 = Color3.fromRGB(255, 255, 0)
  2279. textlabel.Text = textlabel.Text.. " (BETA TESTER!!!)"
  2280. frame.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
  2281. billnametag.SizeOffset = Vector2.new(-textlabel.TextBounds.X/200 + 0.5, 0)
  2282. while true do
  2283. i = 0
  2284. for n=1,0,-0.05 do
  2285. i = i + 0.05
  2286. textlabel.TextColor3 = Color3.new(i, 0, n)
  2287. wait()
  2288. end
  2289. i = 0
  2290. for n=1,0,-0.05 do
  2291. i = i + 0.05
  2292. textlabel.TextColor3 = Color3.new(n, i, 0)
  2293. wait()
  2294. end
  2295. i = 0
  2296. for n=1,0,-0.05 do
  2297. i = i + 0.05
  2298. textlabel.TextColor3 = Color3.new(0, n, i)
  2299. wait()
  2300. end
  2301. end
  2302. end
  2303. wait()
  2304. textlabel.TextScaled = true
  2305. textlabel.TextSize = 8
  2306. end))
  2307.  
  2308. -- now for the real stuff
  2309. -- |
  2310. -- |
  2311. -- V
  2312.  
  2313.  
  2314. local Mouse = player:GetMouse()
  2315.  
  2316.  
  2317. --[[local cameraHand = Instance.new("Part", camera)
  2318. cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
  2319. cameraHand.CanCollide = false
  2320. cameraHand.Anchored = true
  2321. cameraHand.Name = "CameraHand"
  2322.  
  2323. local cameraHandWeld = Instance.new("Motor6D", camPart)
  2324. cameraHandWeld.Part0 = camPart
  2325. cameraHandWeld.Part1 = cameraHand
  2326. cameraHandWeld.C0 = CFrame.new(5, 0, 0)
  2327. ]]--
  2328.  
  2329. local humanoid = char:WaitForChild("Humanoid")
  2330.  
  2331. -- Heart bar
  2332. local hpFrame = makeSquare(UDim2.new(0.5, -166, 1, -130), UDim2.new(0, 162, 0, 18),
  2333. Color3.new(0/255, 0/255, 0/255), 1, gui, 1)
  2334.  
  2335. local hearts = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 162, 0, 18),
  2336. Color3.new(0/255, 0/255, 0/255), 1, hpFrame, 1)
  2337. hearts.ClipsDescendants = true
  2338.  
  2339. for i = 1, 10 do
  2340. local heartImg = makeImage(UDim2.new(0, (i-1)*16, 0, 0), UDim2.new(0, 18, 0, 18),
  2341. "rbxassetid://1494233443", hearts, 2)
  2342.  
  2343. makeSquare(UDim2.new(0, 4, 0, 4), UDim2.new(0, 2, 0, 2),
  2344. Color3.new(255/255, 200/255, 200/255), 0, heartImg, 2)
  2345.  
  2346. heartImg.ImageColor3 = Color3.new(240/255, 0, 0)
  2347.  
  2348. local emptyHeart = makeImage(UDim2.new(0, (i-1)*16, 0, 0), UDim2.new(0, 18, 0, 18),
  2349. "rbxassetid://1494233443", hpFrame, 1)
  2350. emptyHeart.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
  2351.  
  2352. local outline = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 18, 0, 18),
  2353. "rbxassetid://1494176679", emptyHeart, 1)
  2354. outline.ImageColor3 = Color3.new(0, 0, 0)
  2355.  
  2356. local oldHP = humanoid.Health/humanoid.MaxHealth --SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8)
  2357. humanoid.Changed:connect(function()
  2358. local hp = humanoid.Health/humanoid.MaxHealth --SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8)
  2359. if SnapToGrid(oldHP*162, 8) < SnapToGrid(hp*162, 8) then
  2360. outline.ImageColor3 = Color3.new(1, 1, 1)
  2361. wait(0.1)
  2362. outline.ImageColor3 = Color3.new(0, 0, 0)
  2363. wait(0.1)
  2364. end
  2365. if oldHP > hp then
  2366. for i = 1, 2 do
  2367. outline.ImageColor3 = Color3.new(1, 1, 1)
  2368. wait(0.1)
  2369. outline.ImageColor3 = Color3.new(0, 0, 0)
  2370. wait(0.1)
  2371. end
  2372. end
  2373. oldHP = hp
  2374. end)
  2375. coroutine.resume(coroutine.create(function()
  2376. local yIncrease = 0
  2377. local originalY = emptyHeart.Position.Y.Offset
  2378.  
  2379. while wait() do
  2380. if humanoid.Health/humanoid.MaxHealth <= 0.27 then
  2381. if yIncrease <= 0 then
  2382. yIncrease = math.random(1, 2)
  2383. else
  2384. yIncrease = yIncrease - 1
  2385. end
  2386.  
  2387. heartImg.Position = UDim2.new(0, heartImg.Position.X.Offset, 0, -yIncrease)
  2388. emptyHeart.Position = UDim2.new(0, emptyHeart.Position.X.Offset, 0, -yIncrease)
  2389. else
  2390. if yIncrease >= 1 then
  2391. yIncrease = yIncrease - 1
  2392.  
  2393. heartImg.Position = UDim2.new(0, heartImg.Position.X.Offset, 0, -yIncrease)
  2394. emptyHeart.Position = UDim2.new(0, emptyHeart.Position.X.Offset, 0, -yIncrease)
  2395. end
  2396. end
  2397. end
  2398. end))
  2399. end
  2400.  
  2401.  
  2402. humanoid.BreakJointsOnDeath = false
  2403. humanoid.HipHeight = 0.3
  2404.  
  2405. local rootJoint = Instance.new("Motor6D", torso)
  2406. rootJoint.Name = "RootJoint"
  2407. rootJoint.Part0 = humRootPart
  2408. rootJoint.Part1 = torso
  2409. rootJoint.C1 = CFrame.new(0, 0.05, 0)
  2410. remoteevent = Instance.new("RemoteEvent",char)
  2411. remoteevent.Name = "SteveFunction"
  2412. local neck = torso:WaitForChild("Neck")
  2413. neck.Name = "Neck"
  2414. neck.Part0 = head
  2415. neck.Part1 = torso
  2416. remoteevent.OnServerEvent:Connect(function(plr,a,b)
  2417. necka = plr.Character.Torso.Neck
  2418. necka.C0 = a
  2419. necka.C1 = b
  2420. end)
  2421. NLS([[
  2422. -- NOTE (READ!!): This script doesn't work on voidacity's script builder
  2423. -- since it crashes your game, but it's usable on other
  2424. -- script builders like fancy dev's or nexure's.
  2425. -- (it just doesn't work on voidacity only)
  2426.  
  2427. -- Scroll down for changelog...
  2428.  
  2429. -- ORIGINAL CREATOR: Depr1
  2430.  
  2431. -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
  2432. -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
  2433. -- then this is not the original link of this script.
  2434.  
  2435. -- The original link of the script gets edited constantly for updates, if you use the original
  2436. -- link you will be able to enjoy the most recent updates of this script without changing to
  2437. -- another link which contains updated script.
  2438.  
  2439. -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks,
  2440. -- choose a empty slot if you want to remove a block, E to open creative
  2441. -- inventory, right-click to destroy a block in your toolbar in creative
  2442. -- inventory, R to make camera face your character's front or back.
  2443.  
  2444. -- You will become steve when you use this script, if you die after
  2445. -- using this script, keep trying to use it or wait 60 seconds
  2446. -- (it doesn't work at first but eventually it will)
  2447.  
  2448. -- Enjoy! :)
  2449.  
  2450. local updateHand = false
  2451.  
  2452. workspace:WaitForChild("Camera"):ClearAllChildren()
  2453. local RS = game:GetService("RunService").RenderStepped
  2454. local targetName = game.Players.LocalPlayer.Name
  2455. local player = owner
  2456.  
  2457.  
  2458. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  2459. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  2460. for i,f in pairs(faces) do
  2461. local decal = Instance.new(className, part)
  2462. if i == 1 then decal.Texture = frontF decal.Name = f end
  2463. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  2464. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  2465. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  2466. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  2467. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  2468. decal.Face = f
  2469. end
  2470. return part
  2471. end
  2472. function makeSquare(position, size, color, transparency, parent, zindex)
  2473. local label = Instance.new("TextLabel", parent)
  2474. label.Text = ""
  2475. label.BorderSizePixel = 0
  2476. label.BackgroundTransparency = transparency
  2477. label.Position = position
  2478. label.Size = size
  2479. label.BackgroundColor3 = color
  2480. if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
  2481. return label
  2482. end
  2483. function makeImage(position, size, image, parent, zindex)
  2484. local imglabel = Instance.new("ImageLabel", parent)
  2485. imglabel.BorderSizePixel = 0
  2486. imglabel.BackgroundTransparency = 1
  2487. imglabel.Position = position
  2488. imglabel.Size = size
  2489. imglabel.Image = image
  2490. if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
  2491. return imglabel
  2492. end
  2493. function putInventorySlot(position, image, parent, zindex)
  2494. local button = Instance.new("TextButton", parent)
  2495. button.Position = position
  2496. button.Size = UDim2.new(0, 36, 0, 36)
  2497. button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
  2498. button.Text = ""
  2499. button.BorderSizePixel = 0
  2500. button.ZIndex = zindex
  2501. local imageLabel = Instance.new("ImageLabel", button)
  2502. imageLabel.BackgroundTransparency = 0.9
  2503. imageLabel.Position = UDim2.new(0, 2, 0, 2)
  2504. imageLabel.Size = UDim2.new(0, 32, 0, 32)
  2505. imageLabel.Image = image
  2506. imageLabel.BorderSizePixel = 0
  2507. imageLabel.ZIndex = zindex
  2508. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
  2509. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  2510. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
  2511. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  2512. makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
  2513. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  2514. makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
  2515. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  2516. return button
  2517. end
  2518.  
  2519. function AngleDifference(Angle1, Angle2)
  2520. local Difference = {X = 0, Y = 0, Z = 0}
  2521. Difference.X = Angle2.X - Angle1.X
  2522.  
  2523. if (Difference.X > 180) then
  2524. Difference.X = Difference.X - 360
  2525. elseif (Difference.X < -180) then
  2526. Difference.X = Difference.X + 360
  2527. end
  2528.  
  2529. Difference.Y = Angle2.Y - Angle1.Y
  2530.  
  2531. if (Difference.Y > 180) then
  2532. Difference.Y = Difference.Y - 360
  2533. elseif (Difference.Y < -180) then
  2534. Difference.Y = Difference.Y + 360
  2535. end
  2536.  
  2537. Difference.Z = Angle2.Z - Angle1.Z
  2538.  
  2539. if (Difference.Z > 180) then
  2540. Difference.Z = Difference.Z - 360
  2541. elseif (Difference.Z < -180) then
  2542. Difference.Z = Difference.Z + 360
  2543. end
  2544.  
  2545. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  2546. end
  2547. local creativeInventory = {
  2548. {
  2549. name = "Dirt",
  2550. size = Vector3.new(2.6, 2.6, 2.6),
  2551. transparency = 0;
  2552. frontTex = "rbxassetid://152569532",
  2553. backTex = "rbxassetid://152569532",
  2554. topTex = "rbxassetid://152569532",
  2555. bottomTex = "rbxassetid://152569532",
  2556. leftTex = "rbxassetid://152569532",
  2557. rightTex = "rbxassetid://152569532",
  2558. displayTex = "",
  2559. sound = "rbxassetid://1102186681",
  2560. soundVol = 1.25,
  2561. hasGravity = false,
  2562. objectType = "Block"
  2563. },
  2564. {
  2565. name = "Grass",
  2566. size = Vector3.new(2.6, 2.6, 2.6),
  2567. transparency = 0;
  2568. frontTex = "rbxassetid://96430337",
  2569. backTex = "rbxassetid://96430337",
  2570. topTex = "rbxassetid://96430265",
  2571. bottomTex = "rbxassetid://179655033",
  2572. leftTex = "rbxassetid://96430337",
  2573. rightTex = "rbxassetid://96430337",
  2574. displayTex = "",
  2575. sound = "rbxassetid://1102186681",
  2576. soundVol = 1.25,
  2577. hasGravity = false,
  2578. objectType = "Block"
  2579. },
  2580. {
  2581. name = "Sand",
  2582. size = Vector3.new(2.6, 2.6, 2.6),
  2583. transparency = 0;
  2584. frontTex = "rbxassetid://347007448",
  2585. backTex = "rbxassetid://347007448",
  2586. topTex = "rbxassetid://347007448",
  2587. bottomTex = "rbxassetid://347007448",
  2588. leftTex = "rbxassetid://347007448",
  2589. rightTex = "rbxassetid://347007448",
  2590. displayTex = "",
  2591. sound = "rbxassetid://1102186681",
  2592. soundVol = 1.25,
  2593. hasGravity = true,
  2594. objectType = "Block"
  2595. },
  2596. {
  2597. name = "Gravel",
  2598. size = Vector3.new(2.6, 2.6, 2.6),
  2599. transparency = 0;
  2600. frontTex = "rbxassetid://151701568",
  2601. backTex = "rbxassetid://151701568",
  2602. topTex = "rbxassetid://151701568",
  2603. bottomTex = "rbxassetid://151701568",
  2604. leftTex = "rbxassetid://151701568",
  2605. rightTex = "rbxassetid://151701568",
  2606. displayTex = "",
  2607. sound = "rbxassetid://1102186681",
  2608. soundVol = 1.25,
  2609. hasGravity = true,
  2610. objectType = "Block"
  2611. },
  2612. {
  2613. name = "Stone",
  2614. size = Vector3.new(2.6, 2.6, 2.6),
  2615. transparency = 0;
  2616. frontTex = "rbxassetid://75880927",
  2617. backTex = "rbxassetid://75880927",
  2618. topTex = "rbxassetid://75880927",
  2619. bottomTex = "rbxassetid://75880927",
  2620. leftTex = "rbxassetid://75880927",
  2621. rightTex = "rbxassetid://75880927",
  2622. displayTex = "",
  2623. sound = "rbxassetid://1016978163",
  2624. soundVol = 2,
  2625. hasGravity = false,
  2626. objectType = "Block"
  2627. },
  2628. {
  2629. name = "Diamond Ore",
  2630. size = Vector3.new(2.6, 2.6, 2.6),
  2631. transparency = 0;
  2632. frontTex = "rbxassetid://57928490",
  2633. backTex = "rbxassetid://57928490",
  2634. topTex = "rbxassetid://57928490",
  2635. bottomTex = "rbxassetid://57928490",
  2636. leftTex = "rbxassetid://57928490",
  2637. rightTex = "rbxassetid://57928490",
  2638. displayTex = "",
  2639. sound = "rbxassetid://1016978163",
  2640. soundVol = 2,
  2641. hasGravity = false,
  2642. objectType = "Block"
  2643. },
  2644. {
  2645. name = "Diamond Block",
  2646. size = Vector3.new(2.6, 2.6, 2.6),
  2647. transparency = 0;
  2648. frontTex = "rbxassetid://56749955",
  2649. backTex = "rbxassetid://56749955",
  2650. topTex = "rbxassetid://56749955",
  2651. bottomTex = "rbxassetid://56749955",
  2652. leftTex = "rbxassetid://56749955",
  2653. rightTex = "rbxassetid://56749955",
  2654. displayTex = "",
  2655. sound = "rbxassetid://1016978163",
  2656. soundVol = 2,
  2657. hasGravity = false,
  2658. objectType = "Block"
  2659. },
  2660. {
  2661. name = "Emerald Block",
  2662. size = Vector3.new(2.6, 2.6, 2.6),
  2663. transparency = 0;
  2664. frontTex = "rbxassetid://152410853",
  2665. backTex = "rbxassetid://152410853",
  2666. topTex = "rbxassetid://152410853",
  2667. bottomTex = "rbxassetid://152410853",
  2668. leftTex = "rbxassetid://152410853",
  2669. rightTex = "rbxassetid://152410853",
  2670. displayTex = "",
  2671. sound = "rbxassetid://1016978163",
  2672. soundVol = 2,
  2673. hasGravity = false,
  2674. objectType = "Block"
  2675. },
  2676. {
  2677. name = "Emerald Ore",
  2678. size = Vector3.new(2.6, 2.6, 2.6),
  2679. transparency = 0;
  2680. frontTex = "rbxassetid://152410868",
  2681. backTex = "rbxassetid://152410868",
  2682. topTex = "rbxassetid://152410868",
  2683. bottomTex = "rbxassetid://152410868",
  2684. leftTex = "rbxassetid://152410868",
  2685. rightTex = "rbxassetid://152410868",
  2686. displayTex = "",
  2687. sound = "rbxassetid://1016978163",
  2688. soundVol = 2,
  2689. hasGravity = false,
  2690. objectType = "Block"
  2691. },
  2692. {
  2693. name = "Obsidian",
  2694. size = Vector3.new(2.6, 2.6, 2.6),
  2695. transparency = 0;
  2696. frontTex = "rbxassetid://112560322",
  2697. backTex = "rbxassetid://112560322",
  2698. topTex = "rbxassetid://112560322",
  2699. bottomTex = "rbxassetid://112560322",
  2700. leftTex = "rbxassetid://112560322",
  2701. rightTex = "rbxassetid://112560322",
  2702. displayTex = "",
  2703. sound = "rbxassetid://1016978163",
  2704. soundVol = 2,
  2705. hasGravity = false,
  2706. objectType = "Block"
  2707. },
  2708. {
  2709. name = "Gold Block",
  2710. size = Vector3.new(2.6, 2.6, 2.6),
  2711. transparency = 0;
  2712. frontTex = "rbxassetid://152572128",
  2713. backTex = "rbxassetid://152572128",
  2714. topTex = "rbxassetid://152572128",
  2715. bottomTex = "rbxassetid://152572128",
  2716. leftTex = "rbxassetid://152572128",
  2717. rightTex = "rbxassetid://152572128",
  2718. displayTex = "",
  2719. sound = "rbxassetid://1016978163",
  2720. soundVol = 2,
  2721. hasGravity = false,
  2722. objectType = "Block"
  2723. },
  2724. {
  2725. name = "Gold Ore",
  2726. size = Vector3.new(2.6, 2.6, 2.6),
  2727. transparency = 0;
  2728. frontTex = "rbxassetid://152572121",
  2729. backTex = "rbxassetid://152572121",
  2730. topTex = "rbxassetid://152572121",
  2731. bottomTex = "rbxassetid://152572121",
  2732. leftTex = "rbxassetid://152572121",
  2733. rightTex = "rbxassetid://152572121",
  2734. displayTex = "",
  2735. sound = "rbxassetid://1016978163",
  2736. soundVol = 2,
  2737. hasGravity = false,
  2738. objectType = "Block"
  2739. },
  2740. {
  2741. name = "Iron Block",
  2742. size = Vector3.new(2.6, 2.6, 2.6),
  2743. transparency = 0;
  2744. frontTex = "rbxassetid://152572134",
  2745. backTex = "rbxassetid://152572134",
  2746. topTex = "rbxassetid://152572134",
  2747. bottomTex = "rbxassetid://152572134",
  2748. leftTex = "rbxassetid://152572134",
  2749. rightTex = "rbxassetid://152572134",
  2750. displayTex = "",
  2751. sound = "rbxassetid://1016978163",
  2752. soundVol = 2,
  2753. hasGravity = false,
  2754. objectType = "Block"
  2755. },
  2756. {
  2757. name = "Iron Ore",
  2758. size = Vector3.new(2.6, 2.6, 2.6),
  2759. transparency = 0;
  2760. frontTex = "rbxassetid://132879562",
  2761. backTex = "rbxassetid://132879562",
  2762. topTex = "rbxassetid://132879562",
  2763. bottomTex = "rbxassetid://132879562",
  2764. leftTex = "rbxassetid://132879562",
  2765. rightTex = "rbxassetid://132879562",
  2766. displayTex = "",
  2767. sound = "rbxassetid://1016978163",
  2768. soundVol = 2,
  2769. hasGravity = false,
  2770. objectType = "Block"
  2771. },
  2772. {
  2773. name = "Redstone Block",
  2774. size = Vector3.new(2.6, 2.6, 2.6),
  2775. transparency = 0;
  2776. frontTex = "rbxassetid://136260219",
  2777. backTex = "rbxassetid://136260219",
  2778. topTex = "rbxassetid://136260219",
  2779. bottomTex = "rbxassetid://136260219",
  2780. leftTex = "rbxassetid://136260219",
  2781. rightTex = "rbxassetid://136260219",
  2782. sound = "rbxassetid://1016978163",
  2783. soundVol = 2,
  2784. hasGravity = false,
  2785. objectType = "Block"
  2786. },
  2787. {
  2788. name = "TNT",
  2789. size = Vector3.new(2.6, 2.6, 2.6),
  2790. transparency = 0;
  2791. frontTex = "rbxassetid://48005067",
  2792. backTex = "rbxassetid://48005067",
  2793. topTex = "rbxassetid://48005073",
  2794. bottomTex = "rbxassetid://48005064",
  2795. leftTex = "rbxassetid://48005067",
  2796. rightTex = "rbxassetid://48005067",
  2797. displayTex = "",
  2798. sound = "rbxassetid://1102186681",
  2799. soundVol = 2,
  2800. hasGravity = false,
  2801. objectType = "Block"
  2802. },
  2803. {
  2804. name = "Coal Block",
  2805. size = Vector3.new(2.6, 2.6, 2.6),
  2806. transparency = 0;
  2807. frontTex = "rbxassetid://152527418",
  2808. backTex = "rbxassetid://152527418",
  2809. topTex = "rbxassetid://152527418",
  2810. bottomTex = "rbxassetid://152527418",
  2811. leftTex = "rbxassetid://152527418",
  2812. rightTex = "rbxassetid://152527418",
  2813. displayTex = "",
  2814. sound = "rbxassetid://1016978163",
  2815. soundVol = 2,
  2816. hasGravity = false,
  2817. objectType = "Block"
  2818. },
  2819. {
  2820. name = "Coal Ore",
  2821. size = Vector3.new(2.6, 2.6, 2.6),
  2822. transparency = 0;
  2823. frontTex = "rbxassetid://152572101",
  2824. backTex = "rbxassetid://152572101",
  2825. topTex = "rbxassetid://152572101",
  2826. bottomTex = "rbxassetid://152572101",
  2827. leftTex = "rbxassetid://152572101",
  2828. rightTex = "rbxassetid://152572101",
  2829. displayTex = "",
  2830. sound = "rbxassetid://1016978163",
  2831. soundVol = 2,
  2832. hasGravity = false,
  2833. objectType = "Block"
  2834. },
  2835. {
  2836. name = "Bedrock",
  2837. size = Vector3.new(2.6, 2.6, 2.6),
  2838. transparency = 0;
  2839. frontTex = "rbxassetid://75881126",
  2840. backTex = "rbxassetid://75881126",
  2841. topTex = "rbxassetid://75881126",
  2842. bottomTex = "rbxassetid://75881126",
  2843. leftTex = "rbxassetid://75881126",
  2844. rightTex = "rbxassetid://75881126",
  2845. displayTex = "",
  2846. sound = "rbxassetid://1016978163",
  2847. soundVol = 2,
  2848. hasGravity = false,
  2849. objectType = "Block"
  2850. },
  2851. {
  2852. name = "Cobblestone",
  2853. size = Vector3.new(2.6, 2.6, 2.6),
  2854. transparency = 0;
  2855. frontTex = "rbxassetid://152572105",
  2856. backTex = "rbxassetid://152572105",
  2857. topTex = "rbxassetid://152572105",
  2858. bottomTex = "rbxassetid://152572105",
  2859. leftTex = "rbxassetid://152572105",
  2860. rightTex = "rbxassetid://152572105",
  2861. displayTex = "",
  2862. sound = "rbxassetid://1016978163",
  2863. soundVol = 2,
  2864. hasGravity = false,
  2865. objectType = "Block"
  2866. },
  2867. {
  2868. name = "Mossy Stone Brick",
  2869. size = Vector3.new(2.6, 2.6, 2.6),
  2870. transparency = 0;
  2871. frontTex = "rbxassetid://61826751",
  2872. backTex = "rbxassetid://61826751",
  2873. topTex = "rbxassetid://61826751",
  2874. bottomTex = "rbxassetid://61826751",
  2875. leftTex = "rbxassetid://61826751",
  2876. rightTex = "rbxassetid://61826751",
  2877. displayTex = "",
  2878. sound = "rbxassetid://1016978163",
  2879. soundVol = 2,
  2880. hasGravity = false,
  2881. objectType = "Block"
  2882. },
  2883. {
  2884. name = "Cracked Stone Brick",
  2885. size = Vector3.new(2.6, 2.6, 2.6),
  2886. transparency = 0;
  2887. frontTex = "rbxassetid://151802087",
  2888. backTex = "rbxassetid://151802087",
  2889. topTex = "rbxassetid://151802087",
  2890. bottomTex = "rbxassetid://151802087",
  2891. leftTex = "rbxassetid://151802087",
  2892. rightTex = "rbxassetid://151802087",
  2893. displayTex = "",
  2894. sound = "rbxassetid://1016978163",
  2895. soundVol = 2,
  2896. hasGravity = false,
  2897. objectType = "Block"
  2898. },
  2899. {
  2900. name = "Chiseled Stone Brick",
  2901. size = Vector3.new(2.6, 2.6, 2.6),
  2902. transparency = 0;
  2903. frontTex = "rbxassetid://151802074",
  2904. backTex = "rbxassetid://151802074",
  2905. topTex = "rbxassetid://151802074",
  2906. bottomTex = "rbxassetid://151802074",
  2907. leftTex = "rbxassetid://151802074",
  2908. rightTex = "rbxassetid://151802074",
  2909. displayTex = "",
  2910. sound = "rbxassetid://1016978163",
  2911. soundVol = 2,
  2912. hasGravity = false,
  2913. objectType = "Block"
  2914. },
  2915. {
  2916. name = "Stone Brick",
  2917. size = Vector3.new(2.6, 2.6, 2.6),
  2918. transparency = 0;
  2919. frontTex = "rbxassetid://61826773",
  2920. backTex = "rbxassetid://61826773",
  2921. topTex = "rbxassetid://61826773",
  2922. bottomTex = "rbxassetid://61826773",
  2923. leftTex = "rbxassetid://61826773",
  2924. rightTex = "rbxassetid://61826773",
  2925. displayTex = "",
  2926. sound = "rbxassetid://1016978163",
  2927. soundVol = 2,
  2928. hasGravity = false,
  2929. objectType = "Block"
  2930. },
  2931. {
  2932. name = "Nether Brick",
  2933. size = Vector3.new(2.6, 2.6, 2.6),
  2934. transparency = 0;
  2935. frontTex = "rbxassetid://151802104",
  2936. backTex = "rbxassetid://151802104",
  2937. topTex = "rbxassetid://151802104",
  2938. bottomTex = "rbxassetid://151802104",
  2939. leftTex = "rbxassetid://151802104",
  2940. rightTex = "rbxassetid://151802104",
  2941. displayTex = "",
  2942. sound = "rbxassetid://1016978163",
  2943. soundVol = 2,
  2944. hasGravity = false,
  2945. objectType = "Block"
  2946. },
  2947. {
  2948. name = "Granite",
  2949. size = Vector3.new(2.6, 2.6, 2.6),
  2950. transparency = 0;
  2951. frontTex = "rbxassetid://151776467",
  2952. backTex = "rbxassetid://151776467",
  2953. topTex = "rbxassetid://151776467",
  2954. bottomTex = "rbxassetid://151776467",
  2955. leftTex = "rbxassetid://151776467",
  2956. rightTex = "rbxassetid://151776467",
  2957. displayTex = "",
  2958. sound = "rbxassetid://1016978163",
  2959. soundVol = 2,
  2960. hasGravity = false,
  2961. objectType = "Block"
  2962. },
  2963. {
  2964. name = "Diorite",
  2965. size = Vector3.new(2.6, 2.6, 2.6),
  2966. transparency = 0;
  2967. frontTex = "rbxassetid://151776452",
  2968. backTex = "rbxassetid://151776452",
  2969. topTex = "rbxassetid://151776452",
  2970. bottomTex = "rbxassetid://151776452",
  2971. leftTex = "rbxassetid://151776452",
  2972. rightTex = "rbxassetid://151776452",
  2973. sound = "rbxassetid://1016978163",
  2974. soundVol = 2,
  2975. hasGravity = false,
  2976. objectType = "Block"
  2977. },
  2978. {
  2979. name = "Andesite",
  2980. size = Vector3.new(2.6, 2.6, 2.6),
  2981. transparency = 0;
  2982. frontTex = "rbxassetid://151776422",
  2983. backTex = "rbxassetid://151776422",
  2984. topTex = "rbxassetid://151776422",
  2985. bottomTex = "rbxassetid://151776422",
  2986. leftTex = "rbxassetid://151776422",
  2987. rightTex = "rbxassetid://151776422",
  2988. displayTex = "",
  2989. sound = "rbxassetid://1016978163",
  2990. soundVol = 2,
  2991. hasGravity = false,
  2992. objectType = "Block"
  2993. },
  2994. {
  2995. name = "Polished Granite",
  2996. size = Vector3.new(2.6, 2.6, 2.6),
  2997. transparency = 0;
  2998. frontTex = "rbxassetid://151776506",
  2999. backTex = "rbxassetid://151776506",
  3000. topTex = "rbxassetid://151776506",
  3001. bottomTex = "rbxassetid://151776506",
  3002. leftTex = "rbxassetid://151776506",
  3003. rightTex = "rbxassetid://151776506",
  3004. displayTex = "",
  3005. sound = "rbxassetid://1016978163",
  3006. soundVol = 2,
  3007. hasGravity = false,
  3008. objectType = "Block"
  3009. },
  3010. {
  3011. name = "Polished Diorite",
  3012. size = Vector3.new(2.6, 2.6, 2.6),
  3013. transparency = 0;
  3014. frontTex = "rbxassetid://151776533",
  3015. backTex = "rbxassetid://151776533",
  3016. topTex = "rbxassetid://151776533",
  3017. bottomTex = "rbxassetid://151776533",
  3018. leftTex = "rbxassetid://151776533",
  3019. rightTex = "rbxassetid://151776533",
  3020. displayTex = "",
  3021. sound = "rbxassetid://1016978163",
  3022. soundVol = 2,
  3023. hasGravity = false,
  3024. objectType = "Block"
  3025. },
  3026. {
  3027. name = "Polished Andesite",
  3028. size = Vector3.new(2.6, 2.6, 2.6),
  3029. transparency = 0;
  3030. frontTex = "rbxassetid://151776506",
  3031. backTex = "rbxassetid://151776506",
  3032. topTex = "rbxassetid://151776506",
  3033. bottomTex = "rbxassetid://151776506",
  3034. leftTex = "rbxassetid://151776506",
  3035. rightTex = "rbxassetid://151776506",
  3036. displayTex = "",
  3037. sound = "rbxassetid://1016978163",
  3038. soundVol = 2,
  3039. hasGravity = false,
  3040. objectType = "Block"
  3041. },
  3042. {
  3043. name = "Brick Block",
  3044. size = Vector3.new(2.6, 2.6, 2.6),
  3045. transparency = 0;
  3046. frontTex = "rbxassetid://59389191",
  3047. backTex = "rbxassetid://59389191",
  3048. topTex = "rbxassetid://59389191",
  3049. bottomTex = "rbxassetid://59389191",
  3050. leftTex = "rbxassetid://59389191",
  3051. rightTex = "rbxassetid://59389191",
  3052. displayTex = "",
  3053. sound = "rbxassetid://1016978163",
  3054. soundVol = 2,
  3055. hasGravity = false,
  3056. objectType = "Block"
  3057. },
  3058. {
  3059. name = "Packed Ice",
  3060. size = Vector3.new(2.6, 2.6, 2.6),
  3061. transparency = 0;
  3062. frontTex = "rbxassetid://152528023",
  3063. backTex = "rbxassetid://152528023",
  3064. topTex = "rbxassetid://152528023",
  3065. bottomTex = "rbxassetid://152528023",
  3066. leftTex = "rbxassetid://152528023",
  3067. rightTex = "rbxassetid://152528023",
  3068. displayTex = "",
  3069. sound = "rbxassetid://1016978163",
  3070. soundVol = 2,
  3071. hasGravity = false,
  3072. objectType = "Block"
  3073. },
  3074. {
  3075. name = "Ice Block",
  3076. size = Vector3.new(2.6, 2.6, 2.6),
  3077. transparency = 1;
  3078. frontTex = "rbxassetid://118555586",
  3079. backTex = "rbxassetid://118555586",
  3080. topTex = "rbxassetid://118555586",
  3081. bottomTex = "rbxassetid://118555586",
  3082. leftTex = "rbxassetid://118555586",
  3083. rightTex = "rbxassetid://118555586",
  3084. displayTex = "",
  3085. sound = "rbxassetid://1016978163",
  3086. soundVol = 2,
  3087. hasGravity = false,
  3088. objectType = "Block"
  3089. },
  3090. {
  3091. name = "Netherrack",
  3092. size = Vector3.new(2.6, 2.6, 2.6),
  3093. transparency = 0;
  3094. frontTex = "rbxassetid://151802119",
  3095. backTex = "rbxassetid://151802119",
  3096. topTex = "rbxassetid://151802119",
  3097. bottomTex = "rbxassetid://151802119",
  3098. leftTex = "rbxassetid://151802119",
  3099. rightTex = "rbxassetid://151802119",
  3100. displayTex = "",
  3101. sound = "rbxassetid://1016978163",
  3102. soundVol = 2,
  3103. hasGravity = false,
  3104. objectType = "Block"
  3105. },
  3106. {
  3107. name = "End Stone",
  3108. size = Vector3.new(2.6, 2.6, 2.6),
  3109. transparency = 0;
  3110. frontTex = "rbxassetid://151802091",
  3111. backTex = "rbxassetid://151802091",
  3112. topTex = "rbxassetid://151802091",
  3113. bottomTex = "rbxassetid://151802091",
  3114. leftTex = "rbxassetid://151802091",
  3115. rightTex = "rbxassetid://151802091",
  3116. displayTex = "",
  3117. sound = "rbxassetid://1016978163",
  3118. soundVol = 2,
  3119. hasGravity = false,
  3120. objectType = "Block"
  3121. },
  3122. {
  3123. name = "Glass Block",
  3124. size = Vector3.new(2.6, 2.6, 2.6),
  3125. transparency = 1;
  3126. frontTex = "rbxassetid://152239003",
  3127. backTex = "rbxassetid://152239003",
  3128. topTex = "rbxassetid://152239003",
  3129. bottomTex = "rbxassetid://152239003",
  3130. leftTex = "rbxassetid://152239003",
  3131. rightTex = "rbxassetid://152239003",
  3132. displayTex = "",
  3133. sound = "rbxassetid://1016978163",
  3134. soundVol = 2,
  3135. hasGravity = false,
  3136. objectType = "Block"
  3137. },
  3138. {
  3139. name = "Glowstone",
  3140. size = Vector3.new(2.6, 2.6, 2.6),
  3141. transparency = 0;
  3142. frontTex = "rbxassetid://54790811",
  3143. backTex = "rbxassetid://54790811",
  3144. topTex = "rbxassetid://54790811",
  3145. bottomTex = "rbxassetid://54790811",
  3146. leftTex = "rbxassetid://54790811",
  3147. rightTex = "rbxassetid://54790811",
  3148. displayTex = "",
  3149. sound = "rbxassetid://1016978163",
  3150. soundVol = 2,
  3151. hasGravity = false,
  3152. objectType = "Block"
  3153. },
  3154. {
  3155. name = "Bookshelf",
  3156. size = Vector3.new(2.6, 2.6, 2.6),
  3157. transparency = 0;
  3158. frontTex = "rbxassetid://118554092",
  3159. backTex = "rbxassetid://118554092",
  3160. topTex = "rbxassetid://346201871",
  3161. bottomTex = "rbxassetid://346201871",
  3162. leftTex = "rbxassetid://118554092",
  3163. rightTex = "rbxassetid://118554092",
  3164. displayTex = "",
  3165. sound = "rbxassetid://507863457",
  3166. soundVol = 2,
  3167. hasGravity = false,
  3168. objectType = "Block"
  3169. },
  3170. {
  3171. name = "Oak Wood Planks",
  3172. size = Vector3.new(2.6, 2.6, 2.6),
  3173. transparency = 0;
  3174. frontTex = "rbxassetid://346201871",
  3175. backTex = "rbxassetid://346201871",
  3176. topTex = "rbxassetid://346201871",
  3177. bottomTex = "rbxassetid://346201871",
  3178. leftTex = "rbxassetid://346201871",
  3179. rightTex = "rbxassetid://346201871",
  3180. displayTex = "",
  3181. sound = "rbxassetid://507863457",
  3182. soundVol = 2,
  3183. hasGravity = false,
  3184. objectType = "Block"
  3185. },
  3186. {
  3187. name = "Oak Log",
  3188. size = Vector3.new(2.6, 2.6, 2.6),
  3189. transparency = 0;
  3190. frontTex = "rbxassetid://71445924",
  3191. backTex = "rbxassetid://71445924",
  3192. topTex = "rbxassetid://152538557",
  3193. bottomTex = "rbxassetid://152538557",
  3194. leftTex = "rbxassetid://71445924",
  3195. rightTex = "rbxassetid://71445924",
  3196. displayTex = "",
  3197. sound = "rbxassetid://507863457",
  3198. soundVol = 2,
  3199. hasGravity = false,
  3200. objectType = "Block"
  3201. },
  3202. {
  3203. name = "Oak Leaves",
  3204. size = Vector3.new(2.6, 2.6, 2.6),
  3205. transparency = 1;
  3206. frontTex = "rbxassetid://151708391",
  3207. backTex = "rbxassetid://151708391",
  3208. topTex = "rbxassetid://151708391",
  3209. bottomTex = "rbxassetid://151708391",
  3210. leftTex = "rbxassetid://151708391",
  3211. rightTex = "rbxassetid://151708391",
  3212. displayTex = "",
  3213. sound = "rbxassetid://507863457",
  3214. -- couldn't find a leaves sound for this one, sorry lol
  3215. soundVol = 2,
  3216. hasGravity = false,
  3217. objectType = "Block"
  3218. }
  3219. }
  3220. local toolBar = {
  3221. {
  3222. name = "Dirt Block",
  3223. size = Vector3.new(2.6, 2.6, 2.6),
  3224. transparency = 0;
  3225. frontTex = "rbxassetid://152569532",
  3226. backTex = "rbxassetid://152569532",
  3227. topTex = "rbxassetid://152569532",
  3228. bottomTex = "rbxassetid://152569532",
  3229. leftTex = "rbxassetid://152569532",
  3230. rightTex = "rbxassetid://152569532",
  3231. displayTex = "",
  3232. sound = "rbxassetid://1102186681",
  3233. soundVol = 1.25,
  3234. hasGravity = false,
  3235. objectType = "Block"
  3236. },
  3237. {
  3238. name = "Grass Block",
  3239. size = Vector3.new(2.6, 2.6, 2.6),
  3240. transparency = 0;
  3241. frontTex = "rbxassetid://96430337",
  3242. backTex = "rbxassetid://96430337",
  3243. topTex = "rbxassetid://96430265",
  3244. bottomTex = "rbxassetid://179655033",
  3245. leftTex = "rbxassetid://96430337",
  3246. rightTex = "rbxassetid://96430337",
  3247. displayTex = "",
  3248. sound = "rbxassetid://1102186681",
  3249. soundVol = 1.25,
  3250. hasGravity = false,
  3251. objectType = "Block"
  3252. },
  3253. {
  3254. name = "Stone",
  3255. size = Vector3.new(2.6, 2.6, 2.6),
  3256. transparency = 0;
  3257. frontTex = "rbxassetid://75880927",
  3258. backTex = "rbxassetid://75880927",
  3259. topTex = "rbxassetid://75880927",
  3260. bottomTex = "rbxassetid://75880927",
  3261. leftTex = "rbxassetid://75880927",
  3262. rightTex = "rbxassetid://75880927",
  3263. displayTex = "",
  3264. sound = "rbxassetid://1016978163",
  3265. soundVol = 2,
  3266. hasGravity = false,
  3267. objectType = "Block"
  3268. },
  3269. {
  3270. name = "Diamond Ore",
  3271. size = Vector3.new(2.6, 2.6, 2.6),
  3272. transparency = 0;
  3273. frontTex = "rbxassetid://152572119",
  3274. backTex = "rbxassetid://152572119",
  3275. topTex = "rbxassetid://152572119",
  3276. bottomTex = "rbxassetid://152572119",
  3277. leftTex = "rbxassetid://152572119",
  3278. rightTex = "rbxassetid://152572119",
  3279. displayTex = "",
  3280. sound = "rbxassetid://1016978163",
  3281. soundVol = 2,
  3282. hasGravity = false,
  3283. objectType = "Block"
  3284. },
  3285. {
  3286. name = "Diamond Block",
  3287. size = Vector3.new(2.6, 2.6, 2.6),
  3288. transparency = 0;
  3289. frontTex = "rbxassetid://56749955",
  3290. backTex = "rbxassetid://56749955",
  3291. topTex = "rbxassetid://56749955",
  3292. bottomTex = "rbxassetid://56749955",
  3293. leftTex = "rbxassetid://56749955",
  3294. rightTex = "rbxassetid://56749955",
  3295. displayTex = "",
  3296. sound = "rbxassetid://1016978163",
  3297. soundVol = 2,
  3298. hasGravity = false,
  3299. objectType = "Block"
  3300. },
  3301. {
  3302. name = "Oak Wood Planks",
  3303. size = Vector3.new(2.6, 2.6, 2.6),
  3304. transparency = 0;
  3305. frontTex = "rbxassetid://346201871",
  3306. backTex = "rbxassetid://346201871",
  3307. topTex = "rbxassetid://346201871",
  3308. bottomTex = "rbxassetid://346201871",
  3309. leftTex = "rbxassetid://346201871",
  3310. rightTex = "rbxassetid://346201871",
  3311. displayTex = "",
  3312. sound = "rbxassetid://507863457",
  3313. soundVol = 2,
  3314. hasGravity = false,
  3315. objectType = "Block"
  3316. },
  3317. {
  3318. name = "Oak Log",
  3319. size = Vector3.new(2.6, 2.6, 2.6),
  3320. transparency = 0;
  3321. frontTex = "rbxassetid://71445924",
  3322. backTex = "rbxassetid://71445924",
  3323. topTex = "rbxassetid://152538557",
  3324. bottomTex = "rbxassetid://152538557",
  3325. leftTex = "rbxassetid://71445924",
  3326. rightTex = "rbxassetid://71445924",
  3327. displayTex = "",
  3328. sound = "rbxassetid://507863457",
  3329. soundVol = 2,
  3330. hasGravity = false,
  3331. objectType = "Block"
  3332. }
  3333. }
  3334. local draggingBlock = nil
  3335. function divide(x, d)
  3336. if x ~= 0 and d ~= 0 then
  3337. return x/d
  3338. else
  3339. return x
  3340. end
  3341. end -- so it doesn't divide by zero
  3342. function getDistance(v1, v2)
  3343. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  3344. end
  3345. function SnapToGrid(x, gridX)
  3346. local x = math.floor((x / gridX) + 0.5) * gridX
  3347. return x
  3348. end
  3349. function round(x)
  3350. if x%2 ~= 0.5 then
  3351. return math.floor(x+0.5)
  3352. end
  3353. return x-0.5
  3354. end
  3355. function weldTo(part1, part2)
  3356. local weld = Instance.new("Weld", part1)
  3357. weld.Part0 = part1
  3358. weld.Part1 = part2
  3359. return weld
  3360. end
  3361. function getMagnitudeXZ(velocity)
  3362. return math.sqrt(math.abs(velocity.X)^2 + math.abs(velocity.Z)^2)
  3363. end
  3364. function findHumanoid(inst)
  3365. local find = inst
  3366. local hum = nil
  3367. repeat
  3368. if find.Name == "Workspace" then return nil end
  3369. find = find.Parent
  3370. hum = find:FindFirstChild("Humanoid")
  3371. until hum
  3372. --if hum then print("found!!") else print("aw... not found") end
  3373. --if hum.ClassName ~= "Humanoid" then hum = nil end
  3374. return hum
  3375. end
  3376. function getSideByLocation(loc)
  3377. local side = nil
  3378. if loc.X < 0 then side = "Left" end
  3379. if loc.X > 0 then side = "Right" end
  3380. if loc.Y > 0 then side = "Top" end
  3381. if loc.Y < 0 then side = "Bottom" end
  3382. if loc.Z < 0 then side = "Front" end
  3383. if loc.Z > 0 then side = "Back" end
  3384.  
  3385. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  3386. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  3387. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  3388. then
  3389. return nil
  3390. end
  3391. return side
  3392. end
  3393. function getSideByLocationRedstone(loc)
  3394. local side = nil
  3395. if loc.X < 0 then side = "Left" end
  3396. if loc.X > 0 then side = "Right" end
  3397. if loc.Y > 0 then side = "Top" end
  3398. if loc.Y < 0 then side = "Bottom" end
  3399. if loc.Z < 0 then side = "Front" end
  3400. if loc.Z > 0 then side = "Back" end
  3401.  
  3402. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  3403. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  3404. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  3405. then
  3406. return nil
  3407. end
  3408. return side
  3409. end
  3410. function getBlockAtRegion(region)
  3411. local blockFound = nil
  3412. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  3413. local usePart = true
  3414. if part.Name == "Debris" then usePart = false end
  3415. if usePart == true then
  3416. blockFound = part
  3417. break
  3418. end
  3419. end
  3420. return blockFound
  3421. end
  3422. function getRedstoneAtRegion(region)
  3423. local blockFound = nil
  3424. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  3425. if isRedstone(part) then
  3426. blockFound = part
  3427. break
  3428. end
  3429. end
  3430. return blockFound
  3431. end
  3432. function isRedstone(block)
  3433. local objType = block:FindFirstChild("ObjectType")
  3434. if objType then
  3435. if objType.Value == "Redstone Dust" then
  3436. return true
  3437. else
  3438. return false
  3439. end
  3440. end
  3441. end
  3442. function updateRedstoneDust(dust, leftBlk, rightBlk, topBlk, bottomBlk, frontBlk, backBlk, recursion)
  3443. local objType = nil
  3444. if dust then
  3445. objType = dust:FindFirstChild("ObjectType")
  3446. end
  3447.  
  3448. local redstoneDust = "rbxassetid://151911305"
  3449. local redstoneLine = "rbxassetid://151907047"
  3450. local redstoneCorner = "rbxassetid://151907106"
  3451. local redstoneT = "rbxassetid://151907156"
  3452. local redstoneCross = "rbxassetid://151906997"
  3453.  
  3454. local Rotation = 0
  3455.  
  3456. local theresRedstoneAtLeft = false
  3457. local theresRedstoneAtRight = false
  3458. local theresRedstoneAtFront = false
  3459. local theresRedstoneAtBack = false
  3460.  
  3461. if leftBlk then theresRedstoneAtLeft = isRedstone(leftBlk) end
  3462. if rightBlk then theresRedstoneAtRight = isRedstone(rightBlk) end
  3463. if frontBlk then theresRedstoneAtFront = isRedstone(frontBlk) end
  3464. if backBlk then theresRedstoneAtBack = isRedstone(backBlk) end
  3465.  
  3466. if objType then
  3467. if objType.Value == "Redstone Dust" then
  3468. local topDecal = dust:FindFirstChild("Top")
  3469. if topDecal then
  3470. if theresRedstoneAtBack == false and theresRedstoneAtFront == false and
  3471. theresRedstoneAtLeft == false and theresRedstoneAtRight == false then
  3472. topDecal.Texture = redstoneDust
  3473. Rotation = 0
  3474. end
  3475.  
  3476. if theresRedstoneAtLeft == true or theresRedstoneAtRight == true then
  3477. topDecal.Texture = redstoneLine
  3478. Rotation = 0
  3479. end
  3480.  
  3481. if theresRedstoneAtFront == true or theresRedstoneAtBack == true then
  3482. topDecal.Texture = redstoneLine
  3483. Rotation = 90
  3484. end
  3485.  
  3486. if theresRedstoneAtLeft == true and theresRedstoneAtBack == true then
  3487. topDecal.Texture = redstoneCorner
  3488. Rotation = 0
  3489. end
  3490.  
  3491. if theresRedstoneAtBack == true and theresRedstoneAtRight == true then
  3492. topDecal.Texture = redstoneCorner
  3493. Rotation = 90
  3494. end
  3495.  
  3496. if theresRedstoneAtRight == true and theresRedstoneAtFront == true then
  3497. topDecal.Texture = redstoneCorner
  3498. Rotation = 180
  3499. end
  3500.  
  3501. if theresRedstoneAtFront == true and theresRedstoneAtLeft == true then
  3502. topDecal.Texture = redstoneCorner
  3503. Rotation = -90
  3504. end
  3505.  
  3506. if theresRedstoneAtBack == true and theresRedstoneAtLeft == true
  3507. and theresRedstoneAtFront == true then
  3508. topDecal.Texture = redstoneT
  3509. Rotation = -90
  3510. end
  3511.  
  3512. if theresRedstoneAtLeft == true and theresRedstoneAtFront == true
  3513. and theresRedstoneAtRight == true then
  3514. topDecal.Texture = redstoneT
  3515. Rotation = -180
  3516. end
  3517.  
  3518. if theresRedstoneAtFront == true and theresRedstoneAtRight == true
  3519. and theresRedstoneAtBack == true then
  3520. topDecal.Texture = redstoneT
  3521. Rotation = 90
  3522. end
  3523.  
  3524. if theresRedstoneAtRight == true and theresRedstoneAtBack == true
  3525. and theresRedstoneAtLeft == true then
  3526. topDecal.Texture = redstoneT
  3527. Rotation = 0
  3528. end
  3529.  
  3530. if theresRedstoneAtLeft == true and theresRedstoneAtRight == true and
  3531. theresRedstoneAtFront == true and theresRedstoneAtBack == true then
  3532. topDecal.Texture = redstoneCross
  3533. Rotation = 0
  3534. end
  3535. end
  3536. else
  3537. error("Not redstone dust.")
  3538. end
  3539. end
  3540.  
  3541. if recursion == true then
  3542. local function updateTex(blockTarget)
  3543. local leftSide = nil
  3544. local rightSide = nil
  3545. local frontSide = nil
  3546. local backSide = nil
  3547.  
  3548. local Point1 = blockTarget.CFrame.p - Vector3.new(2.6, 0.1, 2.6)
  3549. local Point2 = blockTarget.CFrame.p + Vector3.new(2.6, 0.1, 2.6)
  3550. local Region = Region3.new(Point1, Point2)
  3551. for _,part in pairs(game.Workspace:FindPartsInRegion3(
  3552. Region,
  3553. nil,
  3554. math.huge
  3555. )) do
  3556. local objType = part:FindFirstChild("ObjectType")
  3557. if isRedstone(part) then
  3558. local side = getSideByLocationRedstone(blockTarget.CFrame.p - part.CFrame.p)
  3559. if side == "Left" then
  3560. leftSide = part
  3561. elseif side == "Right" then
  3562. rightSide = part
  3563. elseif side == "Front" then
  3564. frontSide = part
  3565. elseif side == "Back" then
  3566. backSide = part
  3567. elseif side == "Left Top" then
  3568. leftSide = part
  3569. elseif side == "Right Top" then
  3570. rightSide = part
  3571. elseif side == "Front Top" then
  3572. frontSide = part
  3573. elseif side == "Back Top" then
  3574. backSide = part
  3575. elseif side == "Left Bottom" then
  3576. leftSide = part
  3577. elseif side == "Right Bottom" then
  3578. rightSide = part
  3579. elseif side == "Front Bottom" then
  3580. frontSide = part
  3581. elseif side == "Back Bottom" then
  3582. backSide = part
  3583. end
  3584. end
  3585. end
  3586.  
  3587. updateRedstoneDust(blockTarget, leftSide, rightSide, nil, nil, frontSide, backSide, false)
  3588. end
  3589. if leftBlk and theresRedstoneAtLeft then updateTex(leftBlk) end
  3590. if rightBlk and theresRedstoneAtRight then updateTex(rightBlk) end
  3591. if frontBlk and theresRedstoneAtFront then updateTex(frontBlk) end
  3592. if backBlk and theresRedstoneAtBack then updateTex(backBlk) end
  3593. end
  3594.  
  3595. if dust then dust.CFrame = CFrame.new(dust.CFrame.p.X, dust.CFrame.p.Y, dust.CFrame.p.Z) * CFrame.Angles(0, math.rad(Rotation), 0) end
  3596. end
  3597. if player then
  3598. local char = player.Character
  3599. if char then
  3600. for _,cM in pairs(char:GetChildren()) do
  3601. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  3602. end
  3603.  
  3604. --[]
  3605.  
  3606. local humRootPart = char:WaitForChild("HumanoidRootPart")
  3607. local head = char:WaitForChild("Head")
  3608. local torso = char:WaitForChild("Torso")
  3609. local lArm = char:WaitForChild("Left Arm")
  3610. local rArm = char:WaitForChild("Right Arm")
  3611. local lLeg = char:WaitForChild("Left Leg")
  3612. local rLeg = char:WaitForChild("Right Leg")
  3613.  
  3614. local humanoid = char:WaitForChild("Humanoid")
  3615.  
  3616. local camera = workspace.CurrentCamera
  3617.  
  3618. local camPart = Instance.new("Part", camera)
  3619. camPart.Name = "CamPart Local"
  3620. camPart.Size = Vector3.new(0, 0, 0)
  3621. camPart.CFrame = camera.CFrame
  3622. camPart.CanCollide = false
  3623. camPart.Anchored = true
  3624. camPart.Transparency = 1
  3625. local cameraHand = Instance.new("Part", camera)
  3626. cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
  3627. cameraHand.CanCollide = false
  3628. cameraHand.Anchored = true
  3629. cameraHand.Name = "CameraHand"
  3630. putTexture(cameraHand, "rbxassetid://38934560", "rbxassetid://38934581",
  3631. "rbxassetid://38934613", "rbxassetid://38934568",
  3632. "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
  3633.  
  3634. local cameraHandItem = Instance.new("Part", camera)
  3635. cameraHandItem.Name = "CameraHandItem"
  3636. cameraHandItem.Size = Vector3.new(1.1, 1.1, 1.1)
  3637. cameraHandItem.Anchored = true
  3638. cameraHandItem.CanCollide = false
  3639. cameraHandItem.Transparency = 1
  3640.  
  3641. -- welding doesn't really work.
  3642. --local cameraHandWeld = Instance.new("Motor6D", camPart)
  3643. --cameraHandWeld.Part0 = camPart
  3644. --cameraHandWeld.Part1 = cameraHand
  3645. --cameraHandWeld.C0 = CFrame.new(5, 0, 0)
  3646.  
  3647. wait(0.25)
  3648.  
  3649. -- local billNameTag = Instance.new("BillboardGui", char)
  3650. -- billNameTag.Size = UDim2.new(1, 0, 1, 0)
  3651. -- billNameTag.Adornee = head
  3652. -- billNameTag.PlayerToHideFrom = player
  3653. --
  3654. -- local textLabel = Instance.new("TextLabel", billNameTag)
  3655. -- textLabel.Font = "Arcade"
  3656. -- --textLabel.Size = UDim2.new(1, 0, 1, 0)
  3657. -- textLabel.TextScaled = true
  3658. -- --textLabel.TextSize = 100
  3659. -- textLabel.Text = targetName
  3660. -- textLabel.Size = UDim2.new(textLabel.TextBounds.X/100, 0, 0.75, 0)
  3661. -- textLabel.BorderSizePixel = 0
  3662. -- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  3663. -- textLabel.TextColor3 = Color3.new(1, 1, 1)
  3664. -- textLabel.BackgroundTransparency = 0.5
  3665. --
  3666. -- if textLabel.Text == "Depr1" then
  3667. -- textLabel.TextColor3 = Color3.new(1, 0.75, 0)
  3668. -- end
  3669. --
  3670. -- billNameTag.SizeOffset = Vector2.new(-textLabel.TextBounds.X/200 + 0.5, 0)
  3671. -- billNameTag.StudsOffset = Vector3.new(0, 1.5, 0)
  3672.  
  3673.  
  3674. humanoid.Parent = char
  3675.  
  3676. local ticks = 0
  3677. local times = 0
  3678.  
  3679. local walkAnim = 0
  3680. local increaseWalkAnim = 1
  3681.  
  3682. local idleAnimRotX = 0
  3683. local idleAnimRotZ = 0
  3684. local sneaking = 0
  3685.  
  3686. --local RS = game:GetService("RunService").RenderStepped
  3687. local Mouse = player:GetMouse()
  3688.  
  3689. local oldHP = humanoid.Health
  3690. local damageTime = 0
  3691.  
  3692. local punchRotX = 0
  3693. local punchRotY = 0
  3694. local punchRotZ = 0
  3695. local punchRotXcam = 0
  3696. local punchRotYcam = 0
  3697. local punchRotZcam = 0
  3698. local punchSpeed = 0
  3699. local punching = 0
  3700. local selectedBlock = 8
  3701. local punchEnded = 1
  3702. local itemOnHand = nil
  3703.  
  3704. local selectBox = Instance.new("SelectionBox", camera)
  3705. selectBox.Transparency = 0.5
  3706. selectBox.Color3 = Color3.new(0, 0, 0)
  3707. selectBox.LineThickness = 0
  3708.  
  3709.  
  3710. local sound = Instance.new("Sound", char)
  3711. sound.Name = "Hurt"
  3712. sound.Volume = 10
  3713. sound.SoundId = "rbxassetid://535690488"
  3714.  
  3715. local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
  3716. punchneeded = false
  3717. local camCurrentZoom = (camera.CFrame.p - head.Position).magnitude
  3718. Mouse.Button1Down:connect(function()
  3719. punchneeded = true
  3720. end)
  3721. Mouse.Button1Up:connect(function()
  3722. punchneeded = false
  3723. end)
  3724. Mouse.KeyDown:connect(function(key)
  3725. if key == "b" then
  3726. if punchEnded == 1 then punching = 1 end
  3727. end
  3728. end)
  3729.  
  3730. local changedItem = false
  3731. local hasItemOnHand = 0
  3732. local hi = 0
  3733. -- selection thingy
  3734.  
  3735. --
  3736. handitemthingy = char.HandItem
  3737. local oldItemOnHand = itemOnHand
  3738. function updateItemOnHand()
  3739. for _,d in pairs(cameraHandItem:GetChildren()) do
  3740. d:Destroy()
  3741. end
  3742. if handitemthingy ~= nil then
  3743.  
  3744. putTexture(cameraHandItem, handitemthingy.Front, handitemthingy.Back,
  3745. handitemthingy, handitemthingy.Bottom,
  3746. handitemthingy.Left, handitemthingy.Right, "Texture")
  3747.  
  3748. for _,f in pairs(facesToResize) do
  3749. cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
  3750. cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
  3751. end
  3752.  
  3753. cameraHand.Transparency = 1
  3754. for _,f in pairs(facesToResize) do
  3755. cameraHand:WaitForChild(f).Transparency = 1
  3756. cameraHand:WaitForChild(f).Transparency = 1
  3757. end
  3758. else
  3759. cameraHand.Transparency = 0
  3760. for _,f in pairs(facesToResize) do
  3761. cameraHand:WaitForChild(f).Transparency = 0
  3762. cameraHand:WaitForChild(f).Transparency = 0
  3763. end
  3764. end
  3765. if oldItemOnHand ~= itemOnHand then
  3766. changedItem = true
  3767. end
  3768. end
  3769.  
  3770. local pressedWTimes = 0
  3771. local sprintingNum = 0
  3772. local sprinting = false
  3773. Mouse.KeyDown:connect(function(key)
  3774. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  3775. if (key == "w" and sprinting == false and sneaking == 0) then
  3776. if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
  3777. sprinting = true
  3778. --humanoid.WalkSpeed = humanoid.WalkSpeed * 1.5
  3779. pressedWTimes = 0
  3780. coroutine.resume(coroutine.create(function()
  3781. for i = 1, 24 do
  3782. camera.FieldOfView = camera.FieldOfView + ((24-i)/10)
  3783. RS:wait()
  3784. end
  3785. end))
  3786. end
  3787. pressedWTimes = pressedWTimes + 1
  3788. coroutine.resume(coroutine.create(function()
  3789. for i = 1, 9 do
  3790. if sprinting == true then break end
  3791. wait()
  3792. end
  3793. pressedWTimes = 0
  3794. end))
  3795. end
  3796. if key == "e" then
  3797. if selectedBlock == 8 then
  3798. selectedBlock = -1
  3799. end
  3800.  
  3801. selectedBlock = selectedBlock + 1
  3802. oldItemOnHand = itemOnHand
  3803. itemOnHand = toolBar[selectedBlock + 2]
  3804. coroutine.resume(coroutine.create(function()
  3805. for _,d in pairs(cameraHandItem:GetChildren()) do
  3806. d:Destroy()
  3807. end
  3808. if itemOnHand ~= nil then
  3809.  
  3810. putTexture(cameraHandItem, itemOnHand.frontTex, itemOnHand.backTex,
  3811. itemOnHand.topTex, itemOnHand.bottomTex,
  3812. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  3813.  
  3814. for _,f in pairs(facesToResize) do
  3815. cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
  3816. cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
  3817. end
  3818.  
  3819. cameraHand.Transparency = 1
  3820. for _,f in pairs(facesToResize) do
  3821. cameraHand:WaitForChild(f).Transparency = 1
  3822. cameraHand:WaitForChild(f).Transparency = 1
  3823. end
  3824. else
  3825. cameraHand.Transparency = 0
  3826. for _,f in pairs(facesToResize) do
  3827. cameraHand:WaitForChild(f).Transparency = 0
  3828. cameraHand:WaitForChild(f).Transparency = 0
  3829. end
  3830. end
  3831. if oldItemOnHand ~= itemOnHand then
  3832. changedItem = true
  3833. end
  3834. end))
  3835. if hasItemOnHand == 0 and itemOnHand then hi = 1 end
  3836. if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
  3837. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  3838. end
  3839. end)
  3840. Mouse.KeyUp:connect(function(key)
  3841. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  3842. if (key == "w" and sprinting == true and sneaking == 0) then
  3843. sprinting = false
  3844. --humanoid.WalkSpeed = humanoid.WalkSpeed / 1.5
  3845. coroutine.resume(coroutine.create(function()
  3846. for i = 1, 24 do
  3847. camera.FieldOfView = camera.FieldOfView - ((24-i)/10)
  3848. RS:wait()
  3849. end
  3850. end))
  3851. end
  3852. end)
  3853. firstperson = false
  3854. Mouse.KeyUp:connect(function(key)
  3855. if key == "k" then
  3856. if firstperson == true then
  3857. firstperson = false
  3858. else
  3859. firstperson = true
  3860. end
  3861. end
  3862. end)
  3863. local interrump = false
  3864. game:GetService('RunService'):BindToRenderStep('Camera', Enum.RenderPriority.Camera.Value, function()
  3865. if humanoid.Health < oldHP then
  3866. interrump = true
  3867. RS:wait()
  3868. interrump = false
  3869. for i = 1, 15 do
  3870. if interrump == true then interrump = false break end
  3871. camera.CFrame = camera.CFrame * CFrame.Angles(0, 0, -math.rad(15-i))
  3872. RS:wait()
  3873. end
  3874. end
  3875. end)
  3876.  
  3877. Mouse.TargetFilter = camera
  3878.  
  3879. local dead = false
  3880. local humOffset = CFrame.new(0, 0, 0)
  3881. local camHandY = 0
  3882. local camHandZ = 0
  3883. local cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  3884. --cameraHandWeld = Instance.new("Weld",head)
  3885. --cameraHandWeld.Part0 = head
  3886. --cameraHandWeld.Part1 = cameraHand
  3887. --cameraHandWeld.C0 = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  3888. local bodyRot = CFrame.new(0, 0, 0)
  3889. --local lastCamRot = camPart.Orientation
  3890. while RS:wait() do
  3891. if firstperson == true then
  3892. player.CameraMode = Enum.CameraMode.LockFirstPerson
  3893. else
  3894. player.CameraMode = Enum.CameraMode.Classic
  3895. end
  3896. if punchneeded == true then
  3897. if punchEnded == 1 then punching = 1 end
  3898. end
  3899. --cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  3900. cameraHand.CFrame = camPart.CFrame * cameraHandCFrame
  3901. cameraHandItem.CFrame = cameraHand.CFrame * CFrame.new(0, -0.5, 0) * CFrame.Angles(math.rad(-210), math.rad(-40), math.rad(-100)) * CFrame.new(0, -0.35, 0)
  3902.  
  3903. camCurrentZoom = ((CFrame.new(0, -1*sneaking, 0) * camera.CFrame).p - head.Position).magnitude
  3904. if itemOnHand ~= nil then
  3905. hasItemOnHand = 1
  3906. else
  3907. hasItemOnHand = 0
  3908. end
  3909. if humanoid.Health < oldHP then
  3910. damageTime = 60
  3911. --sound:Play()
  3912. end
  3913. oldHP = humanoid.Health
  3914. if damageTime > 0 and humanoid.Health > 0 then
  3915. for _,p in pairs(char:GetChildren()) do
  3916. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  3917. if p.Name == "DamagePart" then
  3918. p.Transparency = 0.5
  3919. end
  3920. end
  3921. end
  3922. damageTime = damageTime - 2
  3923. if damageTime <= 0 then
  3924. for _,p in pairs(char:GetChildren()) do
  3925. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  3926. if p.Name == "DamagePart" then
  3927. p.Transparency = 1
  3928. end
  3929. end
  3930. end
  3931. end
  3932. end
  3933. camPart.CFrame = camera.CFrame
  3934.  
  3935. if getMagnitudeXZ(torso.Velocity) > 1 then
  3936. if walkAnim >= 1 then
  3937. increaseWalkAnim = -1
  3938. elseif walkAnim <= -1 then
  3939. increaseWalkAnim = 1
  3940. end
  3941. walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
  3942. else
  3943. walkAnim = 0
  3944. end
  3945.  
  3946. --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  3947. --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  3948. --
  3949. --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  3950. --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
  3951. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
  3952. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
  3953. --print("-45")
  3954. --end
  3955. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
  3956. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
  3957. --print("45")
  3958. --end
  3959.  
  3960. if changedItem then
  3961. changedItem = false
  3962. coroutine.resume(coroutine.create(function()
  3963. for i = 1, 8 do
  3964. camHandY = camHandY - 0.2
  3965. RS:wait()
  3966. end
  3967. for i = 1, 8 do
  3968. camHandY = camHandY + 0.2
  3969. RS:wait()
  3970. end
  3971. end))
  3972. end
  3973.  
  3974. --move these arms
  3975.  
  3976. if Mouse.Target and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  3977. if Mouse.Target.Parent:FindFirstChild("Humanoid") == nil and Mouse.Target.Parent ~= camera then
  3978. selectBox.Adornee = Mouse.Target
  3979. else
  3980. selectBox.Adornee = nil
  3981. end
  3982. else
  3983. selectBox.Adornee = nil
  3984. end
  3985.  
  3986. --local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  3987.  
  3988. --neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
  3989. --neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
  3990.  
  3991. --print(AngleDifference(camPart.Orientation, torso.Orientation).Y)
  3992.  
  3993. local negate = 1
  3994. if torso.Velocity.Y < 0 then
  3995. negate = -1
  3996. end
  3997.  
  3998. --local vel = math.log(math.abs(torso.Velocity.Y))*negate
  3999. --if vel == math.huge or vel == -math.huge then vel = 0.1 end
  4000. --local vel = torso.Velocity.Y^0.6
  4001.  
  4002. local BobbingY = walkAnim*2
  4003. if BobbingY >= 1 then BobbingY = 1 BobbingY = -BobbingY end
  4004.  
  4005. --local rotationSpeed = AngleDifference(camPart.Orientation, lastCamRot)
  4006.  
  4007. local BobbingX = -0.5 + walkAnim
  4008.  
  4009. --cameraHandCFrame = cameraHandCFrame:lerp(CFrame.new(1.15*1.3 + (walkAnim/2 - (walkAnim/4)), -1.35*1.3 + camHandY + (-BobbingY/8) + 0, -0.45 + -camHandZ + ((camera.FieldOfView/45)-1.6)*1.3) * CFrame.Angles(math.rad(punchRotXcam), math.rad(punchRotYcam), math.rad(punchRotZcam)) * CFrame.new(0, 0, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(85), math.rad(55), math.rad(22.5)), 0.25)
  4010. cameraHandCFrame = cameraHandCFrame:lerp( CFrame.new(1.15*1.3 + (BobbingX/3.5), -1.35*1.3 + camHandY + ((0.4-BobbingY)/7) + 0, -0.45 + -camHandZ + ((camera.FieldOfView/45)-1.6)*1.3) * CFrame.Angles(math.rad(punchRotXcam), math.rad(punchRotYcam), math.rad(punchRotZcam)) * CFrame.new(0, 0, -1.75) * CFrame.fromEulerAnglesXYZ(math.rad(85), math.rad(55), math.rad(22.5)), 0.25)
  4011.  
  4012. humOffset = humOffset:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  4013. humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
  4014.  
  4015. if player.CameraMode == Enum.CameraMode.Classic then
  4016. cameraHand.Transparency = 1
  4017. for _,t in pairs(cameraHand:GetChildren()) do
  4018. if t.Transparency == 0 then
  4019. t.Transparency = 1
  4020. end
  4021. end
  4022. for _,t in pairs(cameraHandItem:GetChildren()) do
  4023. if t.Transparency == 0 then
  4024. t.Transparency = 1
  4025. end
  4026. end
  4027. else
  4028. changedPerspective = 0
  4029. cameraHand.Transparency = hasItemOnHand
  4030. for _,t in pairs(cameraHand:GetChildren()) do
  4031. if t.Transparency == 1 then
  4032. t.Transparency = hasItemOnHand
  4033. end
  4034. end
  4035. for _,t in pairs(cameraHandItem:GetChildren()) do
  4036. if t.Transparency == 1 then
  4037. t.Transparency = 0
  4038. end
  4039. end
  4040. end
  4041.  
  4042. if updateHand == true then
  4043. updateHand = false
  4044. updateItemOnHand()
  4045. end
  4046.  
  4047. if punching == 1 and punchEnded == 1 then
  4048. punching = 0
  4049. --print("steve uses punch!!")
  4050. local coPunchCam = coroutine.wrap(function()
  4051. local mult = 2.25
  4052. punchRotXcam = 40/2*mult
  4053. punchRotYcam = 25/2*mult
  4054. camHandZ = 2.5
  4055. wait(0.075/4)
  4056. punchRotXcam = 50/2*mult
  4057. punchRotYcam = 25*mult
  4058. punchRotZcam = -10*mult
  4059. camHandZ = 1
  4060. wait(0.075/4)
  4061. punchRotYcam = 50/1.5*mult
  4062. punchRotXcam = -10*mult
  4063. --wait(0.075/2)
  4064. --punchRotYcam = 50
  4065. --punchRotXcam = -10
  4066. wait(0.02)
  4067. punchRotXcam = -20*mult
  4068. wait(0.055)
  4069. camHandZ = 0
  4070. punchRotXcam = 0
  4071. punchRotYcam = 0
  4072. punchRotZcam = 0
  4073. end)
  4074. local coPunch = coroutine.wrap(function()
  4075. punchEnded = 0
  4076. punchSpeed = 1
  4077. punchRotX = -60
  4078. punchRotY = -8
  4079. punchRotZ = -35
  4080.  
  4081. wait(0.075/1.3)
  4082. punchSpeed = 1
  4083. punchRotX = -75
  4084. punchRotY = 8
  4085. punchRotZ = 40
  4086. wait(0.075/1.3)
  4087. punchSpeed = 1
  4088. punchRotX = -20
  4089. punchRotZ = 40
  4090. wait(0.075/1.3)
  4091. punchSpeed = 3.5
  4092. punchRotX = 0
  4093. punchRotY = 0
  4094. punchRotZ = 0
  4095.  
  4096. punchRotXcam = 0
  4097. punchRotYcam = 0
  4098. punchRotZcam = 0
  4099.  
  4100. punchEnded = 1
  4101. wait(0.06/1.3)
  4102. punchSpeed = 0
  4103. end)
  4104. coPunch()
  4105. coPunchCam()
  4106. end
  4107. if ticks > 20 then
  4108. ticks = 0
  4109. if times == 0 then
  4110. times = times + 1
  4111. idleAnimRotX = -1
  4112. idleAnimRotZ = 0
  4113. elseif times == 1 then
  4114. times = times + 1
  4115. idleAnimRotX = -0.75
  4116. idleAnimRotZ = -0.75
  4117. elseif times == 2 then
  4118. times = times + 1
  4119. idleAnimRotX = 0
  4120. idleAnimRotZ = -1
  4121. elseif times == 3 then
  4122. times = times + 1
  4123. idleAnimRotX = 0.75
  4124. idleAnimRotZ = -0.75
  4125. --idleAnimRotX = 0.75
  4126. --idleAnimRotZ = -0
  4127. elseif times == 4 then
  4128. times = times + 1
  4129. idleAnimRotX = 1
  4130. idleAnimRotZ = 0
  4131. --idleAnimRotX = 1
  4132. --idleAnimRotZ = 0
  4133. elseif times == 5 then
  4134. times = times + 1
  4135. idleAnimRotX = 0.75
  4136. idleAnimRotZ = 0.75
  4137. elseif times == 6 then
  4138. times = times + 1
  4139. idleAnimRotX = 0
  4140. idleAnimRotZ = 1
  4141. elseif times == 7 then
  4142. times = 0
  4143. idleAnimRotX = -0.75
  4144. idleAnimRotZ = 0.75
  4145. end
  4146. end
  4147.  
  4148. if hi == 1 then hi = 0 end
  4149. end
  4150. end
  4151. end
  4152. ]],char)
  4153. NLS([[
  4154. local sneaking = 0
  4155. local ticks = 0
  4156. local RS = game:GetService("RunService").RenderStepped
  4157. local player = owner
  4158. local bodyRot = CFrame.new(0, 0, 0)
  4159. local mouse = player:GetMouse()
  4160. keyq = false
  4161. mouse.KeyDown:Connect(function(key)
  4162. if key == "q" then
  4163. sneaking = 1
  4164. keyq = true
  4165. end
  4166. end)
  4167. mouse.KeyUp:Connect(function(key)
  4168. if key == "q" then
  4169. sneaking = 0
  4170. keyq = false
  4171. end
  4172. end)
  4173. char = player.Character
  4174. local head = char:WaitForChild("Head")
  4175. local remoteevent = char:WaitForChild("SteveFunction")
  4176. remoteevent.Name = "SteveEvent"
  4177. local torso = char:WaitForChild("Torso")
  4178. local humanoid = char:WaitForChild("Humanoid")
  4179. humanoid.AutoRotate = false
  4180. neck = torso:WaitForChild("Neck")
  4181. local humRootPart = char:WaitForChild("HumanoidRootPart")
  4182. camera = workspace.CurrentCamera
  4183. local camPart = Instance.new("Part", char)
  4184. camPart.Size = Vector3.new(0, 0, 0)
  4185. camPart.CFrame = camera.CFrame
  4186. camPart.CanCollide = false
  4187. camPart.Anchored = true
  4188. camPart.Transparency = 1
  4189. local lastCamRot = camPart.Orientation
  4190. function AngleDifference(Angle1, Angle2)
  4191. local Difference = {X = 0, Y = 0, Z = 0}
  4192. Difference.X = Angle2.X - Angle1.X
  4193.  
  4194. if (Difference.X > 180) then
  4195. Difference.X = Difference.X - 360
  4196. elseif (Difference.X < -180) then
  4197. Difference.X = Difference.X + 360
  4198. end
  4199.  
  4200. Difference.Y = Angle2.Y - Angle1.Y
  4201.  
  4202. if (Difference.Y > 180) then
  4203. Difference.Y = Difference.Y - 360
  4204. elseif (Difference.Y < -180) then
  4205. Difference.Y = Difference.Y + 360
  4206. end
  4207.  
  4208. Difference.Z = Angle2.Z - Angle1.Z
  4209.  
  4210. if (Difference.Z > 180) then
  4211. Difference.Z = Difference.Z - 360
  4212. elseif (Difference.Z < -180) then
  4213. Difference.Z = Difference.Z + 360
  4214. end
  4215.  
  4216. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  4217. end
  4218. game:GetService("RunService").RenderStepped:Connect(function()
  4219. if char:FindFirstChild("MobileCrouching") and keyq == false then
  4220. sneaking = 1
  4221. elseif char:FindFirstChild("MobileCrouching") == nil and keyq == false then
  4222. sneaking = 0
  4223. end
  4224. local remoteevent = char:WaitForChild("SteveEvent")
  4225. camPart.CFrame = camera.CFrame
  4226. local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  4227. local rotX = math.deg(math.atan2(humanoid.MoveDirection.Z, humanoid.MoveDirection.X)) + 90
  4228. if humanoid.MoveDirection ~= Vector3.new(0, 0, 0) then
  4229. --print(rotX)
  4230. bodyRot = bodyRot:lerp(CFrame.Angles(0, -math.rad(rotX), 0), 0.125)
  4231. humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * bodyRot
  4232. end
  4233. local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  4234. neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
  4235. neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
  4236.  
  4237. local oldTorsoOrientation = torso.Orientation
  4238. if AngleDifference(camPart.Orientation, torso.Orientation).Y > 45 then
  4239. humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * CFrame.Angles(0, math.rad(head.Orientation.Y + 45), 0)
  4240. bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y + 45), 0)
  4241. --print("-45")
  4242. elseif AngleDifference(camPart.Orientation, torso.Orientation).Y < -45 then
  4243. humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * CFrame.Angles(0, math.rad(head.Orientation.Y - 45), 0)
  4244. bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y - 45), 0)
  4245. --print("45")
  4246. end
  4247.  
  4248. lastCamRot = camPart.Orientation
  4249. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(0, -math.rad(AngleDifference(oldTorsoOrientation, torso.Orientation).Y), 0)
  4250. ticks = ticks + 1
  4251. if owner.Character:WaitForChild("SteveEvent") then
  4252. owner.Character.SteveEvent:FireServer (neck.C0,neck.C1)
  4253. end
  4254. end)
  4255. ]], char)
  4256. local lH = Instance.new("Motor", torso)
  4257. lH.Name = "Left Hip"
  4258. lH.Part0 = lLeg
  4259. lH.Part1 = torso
  4260. lH.C0 = CFrame.new(0, 0.975, 0)
  4261. lH.C1 = CFrame.new(0.325, -0.975, 0) * CFrame.Angles(0, 0, 0)
  4262. local rH = Instance.new("Motor", torso)
  4263. rH.Name = "Right Hip"
  4264. rH.Part0 = rLeg
  4265. rH.Part1 = torso
  4266. rH.C0 = CFrame.new(0, 0.975, 0)
  4267. rH.C1 = CFrame.new(-0.325, -0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
  4268.  
  4269. local ticks = 0
  4270. local times = 0
  4271.  
  4272. local walkAnim = 0
  4273. local increaseWalkAnim = 1
  4274.  
  4275. local idleAnimRotX = 0
  4276. local idleAnimRotZ = 0
  4277. local sneaking = 0
  4278. Mouse.KeyDown:Connect(function(key)
  4279. if key == "h" then
  4280. if shieldenabled == false then
  4281. shieldenabled = true
  4282. else
  4283. shieldenabled = false
  4284. end
  4285. end
  4286. end)
  4287.  
  4288.  
  4289. function crack(part, face)
  4290. mas = part
  4291. SurfaceGui0 = Instance.new("SurfaceGui")
  4292. Frame1 = Instance.new("Frame")
  4293. Frame2 = Instance.new("Frame")
  4294. Frame3 = Instance.new("Frame")
  4295. Frame4 = Instance.new("Frame")
  4296. Frame5 = Instance.new("Frame")
  4297. Frame6 = Instance.new("Frame")
  4298. Frame7 = Instance.new("Frame")
  4299. Frame8 = Instance.new("Frame")
  4300. Frame9 = Instance.new("Frame")
  4301. Frame10 = Instance.new("Frame")
  4302. Frame11 = Instance.new("Frame")
  4303. Frame12 = Instance.new("Frame")
  4304. Frame13 = Instance.new("Frame")
  4305. Frame14 = Instance.new("Frame")
  4306. Frame15 = Instance.new("Frame")
  4307. Frame16 = Instance.new("Frame")
  4308. Frame17 = Instance.new("Frame")
  4309. Frame18 = Instance.new("Frame")
  4310. Frame19 = Instance.new("Frame")
  4311. Frame20 = Instance.new("Frame")
  4312. Frame21 = Instance.new("Frame")
  4313. Frame22 = Instance.new("Frame")
  4314. Frame23 = Instance.new("Frame")
  4315. Frame24 = Instance.new("Frame")
  4316. Frame25 = Instance.new("Frame")
  4317. Frame26 = Instance.new("Frame")
  4318. Frame27 = Instance.new("Frame")
  4319. Frame28 = Instance.new("Frame")
  4320. Frame29 = Instance.new("Frame")
  4321. Frame30 = Instance.new("Frame")
  4322. Frame31 = Instance.new("Frame")
  4323. Frame32 = Instance.new("Frame")
  4324. Frame33 = Instance.new("Frame")
  4325. Frame34 = Instance.new("Frame")
  4326. Frame35 = Instance.new("Frame")
  4327. Frame36 = Instance.new("Frame")
  4328. Frame37 = Instance.new("Frame")
  4329. Frame38 = Instance.new("Frame")
  4330. Frame39 = Instance.new("Frame")
  4331. Frame40 = Instance.new("Frame")
  4332. Frame41 = Instance.new("Frame")
  4333. Frame42 = Instance.new("Frame")
  4334. Frame43 = Instance.new("Frame")
  4335. Frame44 = Instance.new("Frame")
  4336. Frame45 = Instance.new("Frame")
  4337. Frame46 = Instance.new("Frame")
  4338. Frame47 = Instance.new("Frame")
  4339. Frame48 = Instance.new("Frame")
  4340. Frame49 = Instance.new("Frame")
  4341. Frame50 = Instance.new("Frame")
  4342. Frame51 = Instance.new("Frame")
  4343. Frame52 = Instance.new("Frame")
  4344. Frame53 = Instance.new("Frame")
  4345. Frame54 = Instance.new("Frame")
  4346. Frame55 = Instance.new("Frame")
  4347. Frame56 = Instance.new("Frame")
  4348. Frame57 = Instance.new("Frame")
  4349. Frame58 = Instance.new("Frame")
  4350. Frame59 = Instance.new("Frame")
  4351. Frame60 = Instance.new("Frame")
  4352. Frame61 = Instance.new("Frame")
  4353. Frame62 = Instance.new("Frame")
  4354. Frame63 = Instance.new("Frame")
  4355. SurfaceGui0.Name = "BreakSG"
  4356. SurfaceGui0.Parent = mas
  4357. SurfaceGui0.LightInfluence = 1
  4358. SurfaceGui0.Face = face
  4359. SurfaceGui0.ClipsDescendants = true
  4360. SurfaceGui0.CanvasSize = Vector2.new(16, 16)
  4361. SurfaceGui0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  4362. SurfaceGui0.Adornee = nil
  4363. SurfaceGui0.AlwaysOnTop = false
  4364. Frame1.Name = "Stage1"
  4365. Frame1.Parent = SurfaceGui0
  4366. Frame1.Size = UDim2.new(1, 0, 1, 0)
  4367. Frame1.BackgroundColor = BrickColor.new("Institutional white")
  4368. Frame1.BackgroundColor3 = Color3.new(1, 1, 1)
  4369. Frame1.BackgroundTransparency = 1
  4370. Frame1.BorderSizePixel = 0
  4371. Frame1.ZIndex = 2
  4372. Frame2.Name = "DarkP"
  4373. Frame2.Parent = Frame1
  4374. Frame2.Position = UDim2.new(0, 8, 0, 8)
  4375. Frame2.Size = UDim2.new(0, 1, 0, 2)
  4376. Frame2.BackgroundColor = BrickColor.new("Really black")
  4377. Frame2.BackgroundColor3 = Color3.new(0, 0, 0)
  4378. Frame2.BackgroundTransparency = 0.2392156869173
  4379. Frame2.BorderSizePixel = 0
  4380. Frame3.Name = "LightP"
  4381. Frame3.Parent = Frame1
  4382. Frame3.Position = UDim2.new(0, 8, 0, 10)
  4383. Frame3.Size = UDim2.new(0, 1, 0, 1)
  4384. Frame3.BackgroundColor = BrickColor.new("Really black")
  4385. Frame3.BackgroundColor3 = Color3.new(0, 0, 0)
  4386. Frame3.BackgroundTransparency = 0.60784316062927
  4387. Frame3.BorderSizePixel = 0
  4388. Frame4.Name = "DarkP"
  4389. Frame4.Parent = Frame1
  4390. Frame4.Position = UDim2.new(0, 6, 0, 5)
  4391. Frame4.Size = UDim2.new(0, 1, 0, 2)
  4392. Frame4.BackgroundColor = BrickColor.new("Really black")
  4393. Frame4.BackgroundColor3 = Color3.new(0, 0, 0)
  4394. Frame4.BackgroundTransparency = 0.2392156869173
  4395. Frame4.BorderSizePixel = 0
  4396. Frame5.Name = "LightP"
  4397. Frame5.Parent = Frame1
  4398. Frame5.Position = UDim2.new(0, 6, 0, 7)
  4399. Frame5.Size = UDim2.new(0, 1, 0, 1)
  4400. Frame5.BackgroundColor = BrickColor.new("Really black")
  4401. Frame5.BackgroundColor3 = Color3.new(0, 0, 0)
  4402. Frame5.BackgroundTransparency = 0.60784316062927
  4403. Frame5.BorderSizePixel = 0
  4404. Frame6.Name = "LightP"
  4405. Frame6.Parent = Frame1
  4406. Frame6.Position = UDim2.new(0, 9, 0, 8)
  4407. Frame6.Size = UDim2.new(0, 1, 0, 1)
  4408. Frame6.BackgroundColor = BrickColor.new("Really black")
  4409. Frame6.BackgroundColor3 = Color3.new(0, 0, 0)
  4410. Frame6.BackgroundTransparency = 0.60784316062927
  4411. Frame6.BorderSizePixel = 0
  4412. Frame7.Name = "DarkP"
  4413. Frame7.Parent = Frame1
  4414. Frame7.Position = UDim2.new(0, 9, 0, 7)
  4415. Frame7.Size = UDim2.new(0, 1, 0, 1)
  4416. Frame7.BackgroundColor = BrickColor.new("Really black")
  4417. Frame7.BackgroundColor3 = Color3.new(0, 0, 0)
  4418. Frame7.BackgroundTransparency = 0.2392156869173
  4419. Frame7.BorderSizePixel = 0
  4420. Frame8.Name = "Stage2"
  4421. Frame8.Parent = SurfaceGui0
  4422. Frame8.Size = UDim2.new(1, 0, 1, 0)
  4423. Frame8.BackgroundColor = BrickColor.new("Institutional white")
  4424. Frame8.BackgroundColor3 = Color3.new(1, 1, 1)
  4425. Frame8.BackgroundTransparency = 1
  4426. Frame8.BorderSizePixel = 0
  4427. Frame8.ZIndex = 3
  4428. Frame9.Name = "DarkP"
  4429. Frame9.Parent = Frame8
  4430. Frame9.Position = UDim2.new(0, 8, 0, 8)
  4431. Frame9.Size = UDim2.new(0, 1, 0, 3)
  4432. Frame9.BackgroundColor = BrickColor.new("Really black")
  4433. Frame9.BackgroundColor3 = Color3.new(0, 0, 0)
  4434. Frame9.BackgroundTransparency = 0.2392156869173
  4435. Frame9.BorderSizePixel = 0
  4436. Frame10.Name = "LightP"
  4437. Frame10.Parent = Frame8
  4438. Frame10.Position = UDim2.new(0, 8, 0, 11)
  4439. Frame10.Size = UDim2.new(0, 1, 0, 1)
  4440. Frame10.BackgroundColor = BrickColor.new("Really black")
  4441. Frame10.BackgroundColor3 = Color3.new(0, 0, 0)
  4442. Frame10.BackgroundTransparency = 0.60784316062927
  4443. Frame10.BorderSizePixel = 0
  4444. Frame11.Name = "LightP"
  4445. Frame11.Parent = Frame8
  4446. Frame11.Position = UDim2.new(0, 7, 0, 12)
  4447. Frame11.Size = UDim2.new(0, 1, 0, 1)
  4448. Frame11.BackgroundColor = BrickColor.new("Really black")
  4449. Frame11.BackgroundColor3 = Color3.new(0, 0, 0)
  4450. Frame11.BackgroundTransparency = 0.60784316062927
  4451. Frame11.BorderSizePixel = 0
  4452. Frame12.Name = "DarkP"
  4453. Frame12.Parent = Frame8
  4454. Frame12.Position = UDim2.new(0, 7, 0, 11)
  4455. Frame12.Size = UDim2.new(0, 1, 0, 1)
  4456. Frame12.BackgroundColor = BrickColor.new("Really black")
  4457. Frame12.BackgroundColor3 = Color3.new(0, 0, 0)
  4458. Frame12.BackgroundTransparency = 0.2392156869173
  4459. Frame12.BorderSizePixel = 0
  4460. Frame13.Name = "DarkP"
  4461. Frame13.Parent = Frame8
  4462. Frame13.Position = UDim2.new(0, 6, 0, 4)
  4463. Frame13.Size = UDim2.new(0, 1, 0, 3)
  4464. Frame13.BackgroundColor = BrickColor.new("Really black")
  4465. Frame13.BackgroundColor3 = Color3.new(0, 0, 0)
  4466. Frame13.BackgroundTransparency = 0.2392156869173
  4467. Frame13.BorderSizePixel = 0
  4468. Frame14.Name = "DarkP"
  4469. Frame14.Parent = Frame8
  4470. Frame14.Position = UDim2.new(0, 10, 0, 6)
  4471. Frame14.Size = UDim2.new(0, 2, 0, 1)
  4472. Frame14.BackgroundColor = BrickColor.new("Really black")
  4473. Frame14.BackgroundColor3 = Color3.new(0, 0, 0)
  4474. Frame14.BackgroundTransparency = 0.2392156869173
  4475. Frame14.BorderSizePixel = 0
  4476. Frame15.Name = "LightP"
  4477. Frame15.Parent = Frame8
  4478. Frame15.Position = UDim2.new(0, 10, 0, 7)
  4479. Frame15.Size = UDim2.new(0, 2, 0, 1)
  4480. Frame15.BackgroundColor = BrickColor.new("Really black")
  4481. Frame15.BackgroundColor3 = Color3.new(0, 0, 0)
  4482. Frame15.BackgroundTransparency = 0.60784316062927
  4483. Frame15.BorderSizePixel = 0
  4484. Frame16.Name = "Stage3"
  4485. Frame16.Parent = SurfaceGui0
  4486. Frame16.Size = UDim2.new(1, 0, 1, 0)
  4487. Frame16.BackgroundColor = BrickColor.new("Institutional white")
  4488. Frame16.BackgroundColor3 = Color3.new(1, 1, 1)
  4489. Frame16.BackgroundTransparency = 1
  4490. Frame16.BorderSizePixel = 0
  4491. Frame16.ZIndex = 4
  4492. Frame17.Name = "LightP"
  4493. Frame17.Parent = Frame16
  4494. Frame17.Position = UDim2.new(0, 5, 0, 7)
  4495. Frame17.Size = UDim2.new(0, 1, 0, 1)
  4496. Frame17.BackgroundColor = BrickColor.new("Really black")
  4497. Frame17.BackgroundColor3 = Color3.new(0, 0, 0)
  4498. Frame17.BackgroundTransparency = 0.60784316062927
  4499. Frame17.BorderSizePixel = 0
  4500. Frame18.Name = "DarkP"
  4501. Frame18.Parent = Frame16
  4502. Frame18.Position = UDim2.new(0, 5, 0, 6)
  4503. Frame18.Size = UDim2.new(0, 1, 0, 1)
  4504. Frame18.BackgroundColor = BrickColor.new("Really black")
  4505. Frame18.BackgroundColor3 = Color3.new(0, 0, 0)
  4506. Frame18.BackgroundTransparency = 0.2392156869173
  4507. Frame18.BorderSizePixel = 0
  4508. Frame19.Name = "LightP"
  4509. Frame19.Parent = Frame16
  4510. Frame19.Position = UDim2.new(0, 7, 0, 4)
  4511. Frame19.Size = UDim2.new(0, 1, 0, 1)
  4512. Frame19.BackgroundColor = BrickColor.new("Really black")
  4513. Frame19.BackgroundColor3 = Color3.new(0, 0, 0)
  4514. Frame19.BackgroundTransparency = 0.60784316062927
  4515. Frame19.BorderSizePixel = 0
  4516. Frame20.Name = "DarkP"
  4517. Frame20.Parent = Frame16
  4518. Frame20.Position = UDim2.new(0, 7, 0, 3)
  4519. Frame20.Size = UDim2.new(0, 1, 0, 1)
  4520. Frame20.BackgroundColor = BrickColor.new("Really black")
  4521. Frame20.BackgroundColor3 = Color3.new(0, 0, 0)
  4522. Frame20.BackgroundTransparency = 0.2392156869173
  4523. Frame20.BorderSizePixel = 0
  4524. Frame21.Name = "DarkP"
  4525. Frame21.Parent = Frame16
  4526. Frame21.Position = UDim2.new(0, 9, 0, 5)
  4527. Frame21.Size = UDim2.new(0, 1, 0, 1)
  4528. Frame21.BackgroundColor = BrickColor.new("Really black")
  4529. Frame21.BackgroundColor3 = Color3.new(0, 0, 0)
  4530. Frame21.BackgroundTransparency = 0.2392156869173
  4531. Frame21.BorderSizePixel = 0
  4532. Frame22.Name = "LightP"
  4533. Frame22.Parent = Frame16
  4534. Frame22.Position = UDim2.new(0, 9, 0, 6)
  4535. Frame22.Size = UDim2.new(0, 1, 0, 1)
  4536. Frame22.BackgroundColor = BrickColor.new("Really black")
  4537. Frame22.BackgroundColor3 = Color3.new(0, 0, 0)
  4538. Frame22.BackgroundTransparency = 0.60784316062927
  4539. Frame22.BorderSizePixel = 0
  4540. Frame23.Name = "LightP"
  4541. Frame23.Parent = Frame16
  4542. Frame23.Position = UDim2.new(0, 12, 0, 6)
  4543. Frame23.Size = UDim2.new(0, 1, 0, 1)
  4544. Frame23.BackgroundColor = BrickColor.new("Really black")
  4545. Frame23.BackgroundColor3 = Color3.new(0, 0, 0)
  4546. Frame23.BackgroundTransparency = 0.60784316062927
  4547. Frame23.BorderSizePixel = 0
  4548. Frame24.Name = "DarkP"
  4549. Frame24.Parent = Frame16
  4550. Frame24.Position = UDim2.new(0, 12, 0, 5)
  4551. Frame24.Size = UDim2.new(0, 1, 0, 1)
  4552. Frame24.BackgroundColor = BrickColor.new("Really black")
  4553. Frame24.BackgroundColor3 = Color3.new(0, 0, 0)
  4554. Frame24.BackgroundTransparency = 0.2392156869173
  4555. Frame24.BorderSizePixel = 0
  4556. Frame25.Name = "LightP"
  4557. Frame25.Parent = Frame16
  4558. Frame25.Position = UDim2.new(0, 6, 0, 12)
  4559. Frame25.Size = UDim2.new(0, 1, 0, 1)
  4560. Frame25.BackgroundColor = BrickColor.new("Really black")
  4561. Frame25.BackgroundColor3 = Color3.new(0, 0, 0)
  4562. Frame25.BackgroundTransparency = 0.60784316062927
  4563. Frame25.BorderSizePixel = 0
  4564. Frame26.Name = "DarkP"
  4565. Frame26.Parent = Frame16
  4566. Frame26.Position = UDim2.new(0, 6, 0, 11)
  4567. Frame26.Size = UDim2.new(0, 1, 0, 1)
  4568. Frame26.BackgroundColor = BrickColor.new("Really black")
  4569. Frame26.BackgroundColor3 = Color3.new(0, 0, 0)
  4570. Frame26.BackgroundTransparency = 0.2392156869173
  4571. Frame26.BorderSizePixel = 0
  4572. Frame27.Name = "Stage4"
  4573. Frame27.Parent = SurfaceGui0
  4574. Frame27.Size = UDim2.new(1, 0, 1, 0)
  4575. Frame27.BackgroundColor = BrickColor.new("Institutional white")
  4576. Frame27.BackgroundColor3 = Color3.new(1, 1, 1)
  4577. Frame27.BackgroundTransparency = 1
  4578. Frame27.BorderSizePixel = 0
  4579. Frame27.ZIndex = 5
  4580. Frame28.Name = "LightP"
  4581. Frame28.Parent = Frame27
  4582. Frame28.Position = UDim2.new(0, 4, 0, 7)
  4583. Frame28.Size = UDim2.new(0, 1, 0, 1)
  4584. Frame28.BackgroundColor = BrickColor.new("Really black")
  4585. Frame28.BackgroundColor3 = Color3.new(0, 0, 0)
  4586. Frame28.BackgroundTransparency = 0.60784316062927
  4587. Frame28.BorderSizePixel = 0
  4588. Frame29.Name = "DarkP"
  4589. Frame29.Parent = Frame27
  4590. Frame29.Position = UDim2.new(0, 4, 0, 6)
  4591. Frame29.Size = UDim2.new(0, 1, 0, 1)
  4592. Frame29.BackgroundColor = BrickColor.new("Really black")
  4593. Frame29.BackgroundColor3 = Color3.new(0, 0, 0)
  4594. Frame29.BackgroundTransparency = 0.2392156869173
  4595. Frame29.BorderSizePixel = 0
  4596. Frame30.Name = "LightP"
  4597. Frame30.Parent = Frame27
  4598. Frame30.Position = UDim2.new(0, 8, 0, 3)
  4599. Frame30.Size = UDim2.new(0, 1, 0, 1)
  4600. Frame30.BackgroundColor = BrickColor.new("Really black")
  4601. Frame30.BackgroundColor3 = Color3.new(0, 0, 0)
  4602. Frame30.BackgroundTransparency = 0.60784316062927
  4603. Frame30.BorderSizePixel = 0
  4604. Frame31.Name = "DarkP"
  4605. Frame31.Parent = Frame27
  4606. Frame31.Position = UDim2.new(0, 8, 0, 2)
  4607. Frame31.Size = UDim2.new(0, 1, 0, 1)
  4608. Frame31.BackgroundColor = BrickColor.new("Really black")
  4609. Frame31.BackgroundColor3 = Color3.new(0, 0, 0)
  4610. Frame31.BackgroundTransparency = 0.2392156869173
  4611. Frame31.BorderSizePixel = 0
  4612. Frame32.Name = "DarkP"
  4613. Frame32.Parent = Frame27
  4614. Frame32.Position = UDim2.new(0, 9, 0, 4)
  4615. Frame32.Size = UDim2.new(0, 1, 0, 1)
  4616. Frame32.BackgroundColor = BrickColor.new("Really black")
  4617. Frame32.BackgroundColor3 = Color3.new(0, 0, 0)
  4618. Frame32.BackgroundTransparency = 0.2392156869173
  4619. Frame32.BorderSizePixel = 0
  4620. Frame33.Name = "LightP"
  4621. Frame33.Parent = Frame27
  4622. Frame33.Position = UDim2.new(0, 12, 0, 6)
  4623. Frame33.Size = UDim2.new(0, 1, 0, 1)
  4624. Frame33.BackgroundColor = BrickColor.new("Really black")
  4625. Frame33.BackgroundColor3 = Color3.new(0, 0, 0)
  4626. Frame33.BackgroundTransparency = 0.60784316062927
  4627. Frame33.BorderSizePixel = 0
  4628. Frame34.Name = "DarkP"
  4629. Frame34.Parent = Frame27
  4630. Frame34.Position = UDim2.new(0, 12, 0, 5)
  4631. Frame34.Size = UDim2.new(0, 1, 0, 1)
  4632. Frame34.BackgroundColor = BrickColor.new("Really black")
  4633. Frame34.BackgroundColor3 = Color3.new(0, 0, 0)
  4634. Frame34.BackgroundTransparency = 0.2392156869173
  4635. Frame34.BorderSizePixel = 0
  4636. Frame35.Name = "LightP"
  4637. Frame35.Parent = Frame27
  4638. Frame35.Position = UDim2.new(0, 5, 0, 12)
  4639. Frame35.Size = UDim2.new(0, 1, 0, 1)
  4640. Frame35.BackgroundColor = BrickColor.new("Really black")
  4641. Frame35.BackgroundColor3 = Color3.new(0, 0, 0)
  4642. Frame35.BackgroundTransparency = 0.60784316062927
  4643. Frame35.BorderSizePixel = 0
  4644. Frame36.Name = "DarkP"
  4645. Frame36.Parent = Frame27
  4646. Frame36.Position = UDim2.new(0, 5, 0, 11)
  4647. Frame36.Size = UDim2.new(0, 1, 0, 1)
  4648. Frame36.BackgroundColor = BrickColor.new("Really black")
  4649. Frame36.BackgroundColor3 = Color3.new(0, 0, 0)
  4650. Frame36.BackgroundTransparency = 0.2392156869173
  4651. Frame36.BorderSizePixel = 0
  4652. Frame37.Name = "DarkP"
  4653. Frame37.Parent = Frame27
  4654. Frame37.Position = UDim2.new(0, 8, 0, 12)
  4655. Frame37.Size = UDim2.new(0, 1, 0, 1)
  4656. Frame37.BackgroundColor = BrickColor.new("Really black")
  4657. Frame37.BackgroundColor3 = Color3.new(0, 0, 0)
  4658. Frame37.BackgroundTransparency = 0.2392156869173
  4659. Frame37.BorderSizePixel = 0
  4660. Frame38.Name = "LightP"
  4661. Frame38.Parent = Frame27
  4662. Frame38.Position = UDim2.new(0, 8, 0, 13)
  4663. Frame38.Size = UDim2.new(0, 1, 0, 1)
  4664. Frame38.BackgroundColor = BrickColor.new("Really black")
  4665. Frame38.BackgroundColor3 = Color3.new(0, 0, 0)
  4666. Frame38.BackgroundTransparency = 0.60784316062927
  4667. Frame38.BorderSizePixel = 0
  4668. Frame39.Name = "LightP"
  4669. Frame39.Parent = Frame27
  4670. Frame39.Position = UDim2.new(0, 13, 0, 5)
  4671. Frame39.Size = UDim2.new(0, 1, 0, 1)
  4672. Frame39.BackgroundColor = BrickColor.new("Really black")
  4673. Frame39.BackgroundColor3 = Color3.new(0, 0, 0)
  4674. Frame39.BackgroundTransparency = 0.60784316062927
  4675. Frame39.BorderSizePixel = 0
  4676. Frame40.Name = "DarkP"
  4677. Frame40.Parent = Frame27
  4678. Frame40.Position = UDim2.new(0, 13, 0, 4)
  4679. Frame40.Size = UDim2.new(0, 1, 0, 1)
  4680. Frame40.BackgroundColor = BrickColor.new("Really black")
  4681. Frame40.BackgroundColor3 = Color3.new(0, 0, 0)
  4682. Frame40.BackgroundTransparency = 0.2392156869173
  4683. Frame40.BorderSizePixel = 0
  4684. Frame41.Name = "DarkP"
  4685. Frame41.Parent = Frame27
  4686. Frame41.Position = UDim2.new(0, 3, 0, 7)
  4687. Frame41.Size = UDim2.new(0, 1, 0, 1)
  4688. Frame41.BackgroundColor = BrickColor.new("Really black")
  4689. Frame41.BackgroundColor3 = Color3.new(0, 0, 0)
  4690. Frame41.BackgroundTransparency = 0.2392156869173
  4691. Frame41.BorderSizePixel = 0
  4692. Frame42.Name = "LightP"
  4693. Frame42.Parent = Frame27
  4694. Frame42.Position = UDim2.new(0, 3, 0, 8)
  4695. Frame42.Size = UDim2.new(0, 1, 0, 1)
  4696. Frame42.BackgroundColor = BrickColor.new("Really black")
  4697. Frame42.BackgroundColor3 = Color3.new(0, 0, 0)
  4698. Frame42.BackgroundTransparency = 0.60784316062927
  4699. Frame42.BorderSizePixel = 0
  4700. Frame43.Name = "Stage5"
  4701. Frame43.Parent = SurfaceGui0
  4702. Frame43.Visible = false
  4703. Frame43.Size = UDim2.new(1, 0, 1, 0)
  4704. Frame43.BackgroundColor = BrickColor.new("Institutional white")
  4705. Frame43.BackgroundColor3 = Color3.new(1, 1, 1)
  4706. Frame43.BackgroundTransparency = 1
  4707. Frame43.BorderSizePixel = 0
  4708. Frame43.ZIndex = 6
  4709. Frame44.Name = "DarkP"
  4710. Frame44.Parent = Frame43
  4711. Frame44.Position = UDim2.new(0, 4, 0, 5)
  4712. Frame44.Size = UDim2.new(0, 1, 0, 1)
  4713. Frame44.BackgroundColor = BrickColor.new("Really black")
  4714. Frame44.BackgroundColor3 = Color3.new(0, 0, 0)
  4715. Frame44.BackgroundTransparency = 0.2392156869173
  4716. Frame44.BorderSizePixel = 0
  4717. Frame45.Name = "LightP"
  4718. Frame45.Parent = Frame43
  4719. Frame45.Position = UDim2.new(0, 9, 0, 3)
  4720. Frame45.Size = UDim2.new(0, 1, 0, 1)
  4721. Frame45.BackgroundColor = BrickColor.new("Really black")
  4722. Frame45.BackgroundColor3 = Color3.new(0, 0, 0)
  4723. Frame45.BackgroundTransparency = 0.60784316062927
  4724. Frame45.BorderSizePixel = 0
  4725. Frame46.Name = "DarkP"
  4726. Frame46.Parent = Frame43
  4727. Frame46.Position = UDim2.new(0, 9, 0, 2)
  4728. Frame46.Size = UDim2.new(0, 1, 0, 1)
  4729. Frame46.BackgroundColor = BrickColor.new("Really black")
  4730. Frame46.BackgroundColor3 = Color3.new(0, 0, 0)
  4731. Frame46.BackgroundTransparency = 0.2392156869173
  4732. Frame46.BorderSizePixel = 0
  4733. Frame47.Name = "LightP"
  4734. Frame47.Parent = Frame43
  4735. Frame47.Position = UDim2.new(0, 5, 0, 12)
  4736. Frame47.Size = UDim2.new(0, 1, 0, 1)
  4737. Frame47.BackgroundColor = BrickColor.new("Really black")
  4738. Frame47.BackgroundColor3 = Color3.new(0, 0, 0)
  4739. Frame47.BackgroundTransparency = 0.60784316062927
  4740. Frame47.BorderSizePixel = 0
  4741. Frame48.Name = "DarkP"
  4742. Frame48.Parent = Frame43
  4743. Frame48.Position = UDim2.new(0, 4, 0, 12)
  4744. Frame48.Size = UDim2.new(0, 1, 0, 1)
  4745. Frame48.BackgroundColor = BrickColor.new("Really black")
  4746. Frame48.BackgroundColor3 = Color3.new(0, 0, 0)
  4747. Frame48.BackgroundTransparency = 0.2392156869173
  4748. Frame48.BorderSizePixel = 0
  4749. Frame49.Name = "DarkP"
  4750. Frame49.Parent = Frame43
  4751. Frame49.Position = UDim2.new(0, 9, 0, 13)
  4752. Frame49.Size = UDim2.new(0, 1, 0, 1)
  4753. Frame49.BackgroundColor = BrickColor.new("Really black")
  4754. Frame49.BackgroundColor3 = Color3.new(0, 0, 0)
  4755. Frame49.BackgroundTransparency = 0.2392156869173
  4756. Frame49.BorderSizePixel = 0
  4757. Frame50.Name = "LightP"
  4758. Frame50.Parent = Frame43
  4759. Frame50.Position = UDim2.new(0, 9, 0, 14)
  4760. Frame50.Size = UDim2.new(0, 1, 0, 1)
  4761. Frame50.BackgroundColor = BrickColor.new("Really black")
  4762. Frame50.BackgroundColor3 = Color3.new(0, 0, 0)
  4763. Frame50.BackgroundTransparency = 0.60784316062927
  4764. Frame50.BorderSizePixel = 0
  4765. Frame51.Name = "LightP"
  4766. Frame51.Parent = Frame43
  4767. Frame51.Position = UDim2.new(0, 14, 0, 5)
  4768. Frame51.Size = UDim2.new(0, 1, 0, 1)
  4769. Frame51.BackgroundColor = BrickColor.new("Really black")
  4770. Frame51.BackgroundColor3 = Color3.new(0, 0, 0)
  4771. Frame51.BackgroundTransparency = 0.60784316062927
  4772. Frame51.BorderSizePixel = 0
  4773. Frame52.Name = "DarkP"
  4774. Frame52.Parent = Frame43
  4775. Frame52.Position = UDim2.new(0, 14, 0, 4)
  4776. Frame52.Size = UDim2.new(0, 1, 0, 1)
  4777. Frame52.BackgroundColor = BrickColor.new("Really black")
  4778. Frame52.BackgroundColor3 = Color3.new(0, 0, 0)
  4779. Frame52.BackgroundTransparency = 0.2392156869173
  4780. Frame52.BorderSizePixel = 0
  4781. Frame53.Name = "LightP"
  4782. Frame53.Parent = Frame43
  4783. Frame53.Position = UDim2.new(0, 4, 0, 13)
  4784. Frame53.Size = UDim2.new(0, 1, 0, 1)
  4785. Frame53.BackgroundColor = BrickColor.new("Really black")
  4786. Frame53.BackgroundColor3 = Color3.new(0, 0, 0)
  4787. Frame53.BackgroundTransparency = 0.60784316062927
  4788. Frame53.BorderSizePixel = 0
  4789. Frame54.Name = "DarkP"
  4790. Frame54.Parent = Frame43
  4791. Frame54.Position = UDim2.new(0, 5, 0, 10)
  4792. Frame54.Size = UDim2.new(0, 1, 0, 1)
  4793. Frame54.BackgroundColor = BrickColor.new("Really black")
  4794. Frame54.BackgroundColor3 = Color3.new(0, 0, 0)
  4795. Frame54.BackgroundTransparency = 0.2392156869173
  4796. Frame54.BorderSizePixel = 0
  4797. Frame55.Name = "DarkP"
  4798. Frame55.Parent = Frame43
  4799. Frame55.Position = UDim2.new(0, 2, 0, 8)
  4800. Frame55.Size = UDim2.new(0, 1, 0, 1)
  4801. Frame55.BackgroundColor = BrickColor.new("Really black")
  4802. Frame55.BackgroundColor3 = Color3.new(0, 0, 0)
  4803. Frame55.BackgroundTransparency = 0.2392156869173
  4804. Frame55.BorderSizePixel = 0
  4805. Frame56.Name = "LightP"
  4806. Frame56.Parent = Frame43
  4807. Frame56.Position = UDim2.new(0, 2, 0, 9)
  4808. Frame56.Size = UDim2.new(0, 1, 0, 1)
  4809. Frame56.BackgroundColor = BrickColor.new("Really black")
  4810. Frame56.BackgroundColor3 = Color3.new(0, 0, 0)
  4811. Frame56.BackgroundTransparency = 0.60784316062927
  4812. Frame56.BorderSizePixel = 0
  4813. Frame57.Name = "DarkP"
  4814. Frame57.Parent = Frame43
  4815. Frame57.Position = UDim2.new(0, 6, 0, 2)
  4816. Frame57.Size = UDim2.new(0, 1, 0, 1)
  4817. Frame57.BackgroundColor = BrickColor.new("Really black")
  4818. Frame57.BackgroundColor3 = Color3.new(0, 0, 0)
  4819. Frame57.BackgroundTransparency = 0.2392156869173
  4820. Frame57.BorderSizePixel = 0
  4821. Frame58.Name = "LightP"
  4822. Frame58.Parent = Frame43
  4823. Frame58.Position = UDim2.new(0, 6, 0, 3)
  4824. Frame58.Size = UDim2.new(0, 1, 0, 1)
  4825. Frame58.BackgroundColor = BrickColor.new("Really black")
  4826. Frame58.BackgroundColor3 = Color3.new(0, 0, 0)
  4827. Frame58.BackgroundTransparency = 0.60784316062927
  4828. Frame58.BorderSizePixel = 0
  4829. Frame59.Name = "Stage0"
  4830. Frame59.Parent = SurfaceGui0
  4831. Frame59.Size = UDim2.new(1, 0, 1, 0)
  4832. Frame59.BackgroundColor = BrickColor.new("Institutional white")
  4833. Frame59.BackgroundColor3 = Color3.new(1, 1, 1)
  4834. Frame59.BackgroundTransparency = 1
  4835. Frame59.BorderSizePixel = 0
  4836. Frame60.Name = "DarkP"
  4837. Frame60.Parent = Frame59
  4838. Frame60.Position = UDim2.new(0, 7, 0, 7)
  4839. Frame60.Size = UDim2.new(0, 1, 0, 1)
  4840. Frame60.BackgroundColor = BrickColor.new("Really black")
  4841. Frame60.BackgroundColor3 = Color3.new(0, 0, 0)
  4842. Frame60.BackgroundTransparency = 0.2392156869173
  4843. Frame60.BorderSizePixel = 0
  4844. Frame61.Name = "DarkP"
  4845. Frame61.Parent = Frame59
  4846. Frame61.Position = UDim2.new(0, 8, 0, 8)
  4847. Frame61.Size = UDim2.new(0, 1, 0, 1)
  4848. Frame61.BackgroundColor = BrickColor.new("Really black")
  4849. Frame61.BackgroundColor3 = Color3.new(0, 0, 0)
  4850. Frame61.BackgroundTransparency = 0.2392156869173
  4851. Frame61.BorderSizePixel = 0
  4852. Frame62.Name = "LightP"
  4853. Frame62.Parent = Frame59
  4854. Frame62.Position = UDim2.new(0, 8, 0, 9)
  4855. Frame62.Size = UDim2.new(0, 1, 0, 1)
  4856. Frame62.BackgroundColor = BrickColor.new("Really black")
  4857. Frame62.BackgroundColor3 = Color3.new(0, 0, 0)
  4858. Frame62.BackgroundTransparency = 0.60784316062927
  4859. Frame62.BorderSizePixel = 0
  4860. Frame63.Name = "LightP"
  4861. Frame63.Parent = Frame59
  4862. Frame63.Position = UDim2.new(0, 7, 0, 8)
  4863. Frame63.Size = UDim2.new(0, 1, 0, 1)
  4864. Frame63.BackgroundColor = BrickColor.new("Really black")
  4865. Frame63.BackgroundColor3 = Color3.new(0, 0, 0)
  4866. Frame63.BackgroundTransparency = 0.60784316062927
  4867. Frame63.BorderSizePixel = 0
  4868.  
  4869. end
  4870. local oldHP = humanoid.Health
  4871.  
  4872. local damageTime = 0
  4873. neededtopunch = false
  4874. punchdelay = false
  4875. local punchRotX = 0
  4876. local punchRotY = 0
  4877. local punchRotZ = 0
  4878. local punchSpeed = 0
  4879. local punching = 0
  4880. local selectedBlock = 0
  4881. local punchEnded = 1
  4882. local itemOnHand = nil
  4883. local selectBox = Instance.new("SelectionBox", char)
  4884. selectBox.Adornee = nil
  4885. selectBox.Transparency = 0.5
  4886. selectBox.Color3 = Color3.new(0, 0, 0)
  4887. selectBox.LineThickness = 0
  4888.  
  4889. local handItem = Instance.new("Part", char)
  4890. handItem.Name = "HandItem"
  4891. handItem.Size = Vector3.new(0.52, 0.52, 0.52)
  4892. handItem.Transparency = 1
  4893. handItem.CanCollide = false
  4894.  
  4895. local handItemWeld = Instance.new("Weld", char)
  4896. handItemWeld.Part0 = handItem
  4897. handItemWeld.Part1 = lArm
  4898. handItemWeld.C1 = CFrame.new(0, -0.9, -0.6) * CFrame.Angles(math.rad(-10), math.rad(45), 0)
  4899.  
  4900. local sound = Instance.new("Sound", char)
  4901. sound.Name = "Hurt"
  4902. sound.Volume = 10
  4903. sound.SoundId = "rbxassetid://3362346832"
  4904. if humanoid.Health < oldHP then
  4905. damageTime = 60
  4906. sound:Play()
  4907. end
  4908. reallyispunching = false
  4909. breakingblock = false
  4910. local breaker = nil
  4911. local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
  4912. Mouse.Button1Down:connect(function()
  4913. neededtopunch = true
  4914. reallyispunching = true
  4915. if Mouse.Target and reallyispunching == true then
  4916. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  4917. if Mouse.Target.Name ~= "Baseplate" and Mouse.Target.Name ~= "Debris" and Mouse.Target.Name ~= "Base" then
  4918. local humanoid = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  4919. if humanoid then
  4920. if diamondswordtoggled == false then
  4921. humanoid.Health = humanoid.Health - 10
  4922. else
  4923. humanoid.Health = humanoid.Health - 35
  4924. end
  4925. local parts = Mouse.Target.Parent:GetChildren()
  4926. party = Instance.new("Part")
  4927. party.Anchored = true
  4928. party.CFrame = humanoid.Parent.HumanoidRootPart.CFrame * CFrame.new(0,0,0)
  4929. party.CFrame = party.CFrame * CFrame.new(0,0,-2)
  4930. bodyvel = Instance.new("BodyPosition",humanoid.Parent.HumanoidRootPart)
  4931. bodyvel.Position = party.Position
  4932. coroutine.resume(coroutine.create(function()
  4933. wait(0.3)
  4934. bodyvel:Destroy()
  4935. end))
  4936. for _,p in pairs(parts) do
  4937. if p.ClassName == "Part" then
  4938. p.Velocity = char.Head.CFrame.LookVector * 20 * p.Mass
  4939.  
  4940. --p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
  4941. end
  4942. end
  4943. return
  4944. end
  4945. local blkTar = Mouse.Target
  4946. if blkTar and blkTar.Name ~= "TNTBlock" then
  4947. breakingblock = true
  4948. if not workspace:FindFirstChild("BlockCrack") then
  4949. blkTarCrack = Instance.new("Part",workspace)
  4950. blkTarCrack.Name = "BlockCrack"
  4951. blkTarCrack.Transparency = 1
  4952. blkTarCrack.CanCollide = false
  4953. blkTarCrack.Size = blkTar.Size + Vector3.new(0.005,0.005,0.005)
  4954. local blkTarCrackWeld = Instance.new("Weld",blkTarCrack)
  4955. blkTarCrackWeld.Part0 = blkTar
  4956. blkTarCrackWeld.Part1 = blkTarCrack
  4957. end
  4958. coroutine.resume(coroutine.create(function()
  4959. while wait() do
  4960. if breakingblock == false then
  4961. blkTarCrack:Destroy()
  4962. end
  4963. end
  4964. end))
  4965. crack(blkTar,"Front")
  4966. crack(blkTar,"Back")
  4967. crack(blkTar,"Top")
  4968. crack(blkTar,"Bottom")
  4969. crack(blkTar,"Left")
  4970. crack(blkTar,"Right")
  4971. if breakingblock == false then
  4972. --blkTarCrack:Destroy()
  4973. end
  4974. for i,v in pairs(breaker:GetChildren()) do
  4975. if v.Name == "BreakSG" then
  4976. for i,frame in pairs(v:GetChildren()) do
  4977. if v.ClassName == "Frame" then
  4978. if v.Name ~= "Stage0" then
  4979. v.Visible = false
  4980. else
  4981. v.Visible = true
  4982. end
  4983. end
  4984. end
  4985. end
  4986. end
  4987. wait(0.7)
  4988. for i,v in pairs(breaker:GetChildren()) do
  4989. if v.Name == "BreakSG" then
  4990. for i,frame in pairs(v:GetChildren()) do
  4991. if v.ClassName == "Frame" then
  4992. if v.Name ~= "Stage1" then
  4993. v.Visible = false
  4994. else
  4995. v.Visible = true
  4996. end
  4997. end
  4998. end
  4999. end
  5000. end
  5001. wait(0.7)
  5002. for i,v in pairs(breaker:GetChildren()) do
  5003. if v.Name == "BreakSG" then
  5004. for i,frame in pairs(v:GetChildren()) do
  5005. if v.ClassName == "Frame" then
  5006. if v.Name ~= "Stage2" then
  5007. v.Visible = false
  5008. else
  5009. v.Visible = true
  5010. end
  5011. end
  5012. end
  5013. end
  5014. end
  5015. wait(0.7)
  5016. for i,v in pairs(breaker:GetChildren()) do
  5017. if v.Name == "BreakSG" then
  5018. for i,frame in pairs(v:GetChildren()) do
  5019. if v.ClassName == "Frame" then
  5020. if v.Name ~= "Stage3" then
  5021. v.Visible = false
  5022. else
  5023. v.Visible = true
  5024. end
  5025. end
  5026. end
  5027. end
  5028. end
  5029. wait(0.7)
  5030. for i,v in pairs(breaker:GetChildren()) do
  5031. if v.Name == "BreakSG" then
  5032. for i,frame in pairs(v:GetChildren()) do
  5033. if v.ClassName == "Frame" then
  5034. if v.Name ~= "Stage4" then
  5035. v.Visible = false
  5036. else
  5037. v.Visible = true
  5038. end
  5039. end
  5040. end
  5041. end
  5042. end
  5043. wait(0.7)
  5044. for i,v in pairs(breaker:GetChildren()) do
  5045. if v.Name == "BreakSG" then
  5046. for i,frame in pairs(v:GetChildren()) do
  5047. if v.ClassName == "Frame" then
  5048. if v.Name ~= "Stage5" then
  5049. v.Visible = false
  5050. else
  5051. v.Visible = true
  5052. end
  5053. end
  5054. end
  5055. end
  5056. end
  5057. if breakingblock == true and blkTarCrack then
  5058. wait(0.7)
  5059. blkTar:Destroy()
  5060. blkTarCrack.Parent = nil
  5061. for i,v in pairs(blkTarCrack:GetChildren()) do
  5062. v:Destroy()
  5063. end
  5064. for i = 1, 9 do
  5065. local part = Instance.new("Part", workspace)
  5066. part.Size = Vector3.new(0, 0, 0)
  5067. part.Transparency = 1
  5068. part.CanCollide = false
  5069. part.Velocity = Vector3.new(math.random(-5, 5), 5, math.random(-5, 5))
  5070. part.Name = "Debris"
  5071.  
  5072. part.CFrame =
  5073. Mouse.Target.CFrame *
  5074. CFrame.new(math.random(-blkTar.Size.X/2, blkTar.Size.X/2), math.random(-blkTar.Size.Y/2, blkTar.Size.Y/2), math.random(-blkTar.Size.Z/2, blkTar.Size.Z/2))
  5075.  
  5076. part.CustomPhysicalProperties = PhysicalProperties.new(0, 0.2, 0, 100, 100)
  5077.  
  5078. local billboard = Instance.new("BillboardGui", part)
  5079. billboard.Size = UDim2.new(1.2, 0, 1.2, 0)
  5080.  
  5081. local clipDescendant = Instance.new("TextLabel", billboard)
  5082. clipDescendant.Size = UDim2.new(0.5, 0, 0.5, 0)
  5083. clipDescendant.BackgroundTransparency = 1
  5084. clipDescendant.Text = ""
  5085. clipDescendant.ClipsDescendants = true
  5086.  
  5087. local img = Instance.new("ImageLabel", clipDescendant)
  5088. img.Size = UDim2.new(2, 0, 2, 0)
  5089. img.BackgroundTransparency = 1
  5090. img.Position = UDim2.new(math.random(-70, 70)/100, 0, math.random(-70, 70)/100, 0)
  5091.  
  5092. local tex = blkTar:FindFirstChild("Front")
  5093. if tex then
  5094. img.Image = tex.Texture
  5095. else
  5096. img.Image = "rbxassetid://744949545"
  5097. end
  5098.  
  5099. if img.Image == "rbxassetid://744949545" then
  5100. img.ImageColor3 = blkTar.Color
  5101. end
  5102.  
  5103. part.Touched:connect(function(prt)
  5104. if prt ~= blkTar then
  5105. part.CanCollide = true
  5106. end
  5107. end)
  5108.  
  5109. coroutine.resume(coroutine.create(function()
  5110. wait(math.random(50, 65)/100)
  5111. part:Destroy()
  5112. end))
  5113. --part.Anchored = false
  5114. end
  5115. end
  5116.  
  5117. while wait() do
  5118. if breakingblock == false then
  5119. blkTarCrack:Destroy()
  5120. end
  5121. end
  5122. end
  5123.  
  5124. local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
  5125. if humanoid then
  5126. humanoid.Health = humanoid.Health - damage
  5127. --humanoid.Health:TakeDamage(10)
  5128. local parts = Mouse.Target.Parent:GetChildren()
  5129. for _,p in pairs(parts) do
  5130. if p.ClassName == "Part" then
  5131. p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
  5132. end
  5133. end
  5134. return
  5135. end
  5136. local x = Mouse.Target.CFrame.p.X
  5137. local y = Mouse.Target.CFrame.p.Y
  5138. local z = Mouse.Target.CFrame.p.Z
  5139. if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
  5140. if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
  5141. if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
  5142. if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
  5143. if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
  5144. if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
  5145. if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
  5146. x = Mouse.Hit.p.X
  5147. y = Mouse.Hit.p.Y
  5148. z = Mouse.Hit.p.Z
  5149. end
  5150. -- local x = round(math.abs(mouseX)/2.6)*2.6
  5151. -- local y = round(math.abs(mouseY)/2.6)*2.6
  5152. -- local z = round(math.abs(mouseZ)/2.6)*2.6
  5153. -- if Mouse.Hit.p.X < 0 then x = x * -1 end
  5154. -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
  5155. -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
  5156. end
  5157. end
  5158. end
  5159. end)
  5160. Mouse.Button1Up:connect(function()
  5161. reallyispunching = false
  5162. breakingblock = false
  5163. neededtopunch = false
  5164. end)
  5165. signcooldown = false
  5166. function placeSign()
  5167. if signcooldown == false then
  5168. signcooldown = true
  5169. if char:FindFirstChild("SignRemote") then
  5170. char:FindFirstChild("SignRemote"):Destroy()
  5171. end
  5172. signremote = Instance.new("RemoteEvent",char)
  5173. signremote.Name = "SignRemote"
  5174. NLS([[
  5175. thesignguiisthere = true
  5176. local signgui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
  5177. local Frame = Instance.new("Frame",signgui)
  5178. local closebutton = Instance.new("TextButton",Frame)
  5179. local signguitext = Instance.new("TextBox",Frame)
  5180. Frame.BackgroundTransparency = 1
  5181. Frame.Size = UDim2.new(1, 0,1, 0)
  5182. Frame.Position = UDim2.new(0, 0,0, 0)
  5183. signguitext.PlaceholderText = "Text Here for sign"
  5184. signguitext.ClearTextOnFocus = false
  5185. signguitext.Font = "Arcade"
  5186. signguitext.Position = UDim2.new(0, 50,0, -1)
  5187. signguitext.Size = UDim2.new(1, 0,0.50, 0)
  5188. signguitext.TextColor3 = Color3.fromRGB(255, 255, 255)
  5189. signguitext.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  5190. signguitext.TextStrokeTransparency = 1
  5191. signguitext.BackgroundTransparency = 0.5
  5192. signguitext.TextSize = 100
  5193. signguitext.Text = ""
  5194. signguitext.TextWrapped = true
  5195. signguitext.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  5196. signguitext.Changed:Connect(function(property)
  5197. if property == "Text" then
  5198. game.Players.LocalPlayer.Character.SignRemote:FireServer(signguitext.Text)
  5199. end
  5200. end)
  5201. closebutton.Text = "close sign gui"
  5202. closebutton.Font = "Arcade"
  5203. closebutton.Position = UDim2.new(0, 1,0, 1)
  5204. closebutton.Size = UDim2.new(0.10, 0,0.10, 0)
  5205. closebutton.TextColor3 = Color3.fromRGB(255, 255, 255)
  5206. closebutton.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  5207. closebutton.TextStrokeTransparency = 1
  5208. closebutton.BackgroundTransparency = 0
  5209. closebutton.TextScaled = true
  5210. closebutton.BackgroundColor3 = Color3.fromRGB(255, 148, 148)
  5211. closebutton.MouseButton1Click:Connect(function()
  5212. signgui:Destroy()
  5213. thesignguiisthere = false
  5214. end)
  5215. ]],char)
  5216. local signmodel = Instance.new("Model",workspace:WaitForChild("Signs"))
  5217. local Signpart1 = Instance.new("Part", signmodel)
  5218. putTexture(Signpart1, "rbxassetid://3258599312", "rbxassetid://3258599312",
  5219. "rbxassetid://3258599312","rbxassetid://3258599312",
  5220. "rbxassetid://3258599312","rbxassetid://3258599312", "Texture")
  5221. Signpart1.Anchored = true
  5222. Signpart1.Size = Vector3.new(0.332, 1.83, 0.332)
  5223. local Signpart2 = Instance.new("Part", signmodel)
  5224. putTexture(Signpart2, "rbxassetid://152572161", "rbxassetid://152572161",
  5225. "rbxassetid://152572161","rbxassetid://152572161",
  5226. "rbxassetid://152572161","rbxassetid://152572161", "Texture")
  5227. Signpart2.Anchored = false
  5228. local signtext = Instance.new("SurfaceGui",Signpart2)
  5229. local signtext2 = Instance.new("TextLabel",signtext)
  5230. signtext.Face = "Back"
  5231. Signpart2.Size = Vector3.new(2.988, 1.996, 0.332)
  5232. signtext2.Size = UDim2.new(1,0,1,0)
  5233. signtext2.BackgroundTransparency = 1
  5234. signtext2.TextSize = 100
  5235. signtext2.Font = "Arcade"
  5236. signtext2.Text = ""
  5237. signtext2.TextYAlignment = Enum.TextYAlignment.Top
  5238. signtext2.TextWrapped = true
  5239. signremote.OnServerEvent:Connect(function(player,text)
  5240. signtext2.Text = text
  5241. end)
  5242. signremote.OnServerEvent:Connect(function(b1)
  5243. signtext2.Text = b1
  5244. end)
  5245. Signpart1.CFrame = torso.CFrame * CFrame.new(0,-torso.Size.Y,-3)
  5246. for _,f in pairs(facesToResize) do
  5247. Signpart1:WaitForChild(f).StudsPerTileU = 2.6
  5248. Signpart1:WaitForChild(f).StudsPerTileV = 2.6
  5249. end
  5250. for _,f in pairs(facesToResize) do
  5251. Signpart2:WaitForChild(f).StudsPerTileU = 2.6
  5252. Signpart2:WaitForChild(f).StudsPerTileV = 2.6
  5253. end
  5254. wait(0.00)
  5255. Signpart1.Anchored = true
  5256. Signpart1.CFrame = CFrame.new(SnapToGrid(Signpart1.CFrame.X, 2.6), SnapToGrid(Signpart1.CFrame.Y, 2.6), SnapToGrid(Signpart1.CFrame.Z, 2.6))
  5257. Signpart1.Orientation = Vector3.new(0,torso.Orientation.Y,0)
  5258. signweld = Instance.new("Weld",Signpart1)
  5259. signweld.Part0 = Signpart1
  5260. signweld.Part1 = Signpart2
  5261. signweld.C0 = CFrame.new(0, 1.91, 0)
  5262. Signpart1.CFrame = Signpart1.CFrame * CFrame.new(0,0.915,0)
  5263. coroutine.resume(coroutine.create(function()
  5264. wait()
  5265. signcooldown = false
  5266. end))
  5267. end
  5268. end
  5269. function placeBlock(block, cFPos)
  5270. local blockPlaced = Instance.new("Part", workspace)
  5271. if block.name ~= "TNT" then
  5272. blockPlaced.Material = "Granite"
  5273. else
  5274. blockPlaced.Material = "SmoothPlastic"
  5275. end
  5276. blockPlaced.Anchored = false
  5277. blockPlaced.Size = block.size
  5278. blockPlaced.CFrame = cFPos
  5279. if block.name ~= "TNT" then
  5280. blockPlaced.Transparency = 1
  5281. end
  5282. local blockvalue = Instance.new("BoolValue",blockPlaced)
  5283. blockvalue.Name = "IsBlock"
  5284. blockvalue.Value = true
  5285. if block.name == "TNT" then
  5286. Part0 = blockPlaced
  5287. Part0.Anchored = true
  5288. Decal1 = Instance.new("Decal")
  5289. Decal2 = Instance.new("Decal")
  5290. Decal3 = Instance.new("Decal")
  5291. Decal4 = Instance.new("Decal")
  5292. Decal5 = Instance.new("Decal")
  5293. Decal6 = Instance.new("Decal")
  5294. Sound8 = Instance.new("Sound")
  5295. Sound9 = Instance.new("Sound")
  5296. Camera10 = Instance.new("Camera")
  5297. ParticleEmitter11 = Instance.new("ParticleEmitter")
  5298. Part0.Name = "TNTBlock"
  5299. Part0.Color = Color3.new(0.972549, 0.972549, 0.972549)
  5300. Part0.Size = Vector3.new(3, 3, 3)
  5301. Part0.BottomSurface = Enum.SurfaceType.Smooth
  5302. Part0.BrickColor = BrickColor.new("Institutional white")
  5303. Part0.Material = Enum.Material.Fabric
  5304. Part0.TopSurface = Enum.SurfaceType.Smooth
  5305. Part0.brickColor = BrickColor.new("Institutional white")
  5306. Part0.Anchored = true
  5307. Decal1.Name = "TNT Bottom"
  5308. Decal1.Parent = Part0
  5309. Decal1.Texture = "http://www.roblox.com/asset/?id=118557091"
  5310. Decal1.Face = Enum.NormalId.Bottom
  5311. Decal2.Name = "TNT TOP"
  5312. Decal2.Parent = Part0
  5313. Decal2.Texture = "http://www.roblox.com/asset/?id=2748239465"
  5314. Decal2.Face = Enum.NormalId.Top
  5315. Decal3.Name = "tnt side"
  5316. Decal3.Parent = Part0
  5317. Decal3.Texture = "http://www.roblox.com/asset/?id=3891642918"
  5318. Decal3.Face = Enum.NormalId.Right
  5319. Decal4.Name = "tnt side"
  5320. Decal4.Parent = Part0
  5321. Decal4.Texture = "http://www.roblox.com/asset/?id=3891642918"
  5322. Decal5.Name = "tnt side"
  5323. Decal5.Parent = Part0
  5324. Decal5.Texture = "http://www.roblox.com/asset/?id=3891642918"
  5325. Decal5.Face = Enum.NormalId.Left
  5326. Decal6.Name = "tnt side"
  5327. Decal6.Parent = Part0
  5328. Decal6.Texture = "http://www.roblox.com/asset/?id=3891642918"
  5329. Decal6.Face = Enum.NormalId.Back
  5330. Sound8.Name = "Creeper Hissing"
  5331. Sound8.Parent = Part0
  5332. Sound8.SoundId = "rbxassetid://907668984"
  5333. Sound9.Name = "TNT_BOOM"
  5334. Sound9.Parent = Part0
  5335. Sound9.TimePosition = 2
  5336. Sound9.SoundId = "rbxassetid://3542426596"
  5337. Camera10.Name = "ThumbnailCamera"
  5338. Camera10.Parent = Part0
  5339. Camera10.CFrame = CFrame.new(-83.3922195, 4.62437677, 36.390995, -0.703318119, -0.36768654, 0.608399868, 1.49011594e-08, 0.855846167, 0.51723069, -0.710875332, 0.363777727, -0.601932049)
  5340. Camera10.CoordinateFrame = CFrame.new(-83.3922195, 4.62437677, 36.390995, -0.703318119, -0.36768654, 0.608399868, 1.49011594e-08, 0.855846167, 0.51723069, -0.710875332, 0.363777727, -0.601932049)
  5341. Camera10.Focus = CFrame.new(-84.6090164, 3.5899179, 37.5948563, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  5342. Camera10.focus = CFrame.new(-84.6090164, 3.5899179, 37.5948563, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  5343. ParticleEmitter11.Parent = Part0
  5344. ParticleEmitter11.Speed = NumberRange.new(9, 9)
  5345. ParticleEmitter11.Enabled = false
  5346. ParticleEmitter11.Texture = "rbxassetid://1494734425"
  5347. ParticleEmitter11.Size = NumberSequence.new(4,4)
  5348. ParticleEmitter11.Lifetime = NumberRange.new(1, 1)
  5349. ParticleEmitter11.Rate = 500
  5350. ParticleEmitter11.SpreadAngle = Vector2.new(3050, 30)
  5351. ParticleEmitter11.VelocitySpread = 3050
  5352. ifixtnt(Part0)
  5353. end
  5354. if block.hasGravity == true then
  5355. local connectedTo = Instance.new("ObjectValue", blockPlaced)
  5356. connectedTo.Name = "ConnectedTo"
  5357. blockPlaced.Anchored = false
  5358. blockPlaced.CanCollide = false
  5359. local detector = Instance.new("Part", workspace:WaitForChild("Camera"))
  5360. detector.Transparency = 1
  5361. detector.CanCollide = false
  5362. detector.Size = Vector3.new(1, 0, 1)
  5363. local weldDetector = Instance.new("Motor6D", detector)
  5364. weldDetector.Part0 = detector
  5365. weldDetector.Part1 = blockPlaced
  5366. weldDetector.C1 = CFrame.new(0, -blockPlaced.Size.Y/2, 0)
  5367. local landed = false
  5368. local function fallingBlock()
  5369. coroutine.resume(coroutine.create(function()
  5370. local falling = blockPlaced:FindFirstChild("IsFalling") or Instance.new("CFrameValue", blockPlaced)
  5371. falling.Name = "IsFalling"
  5372. local grav = 0
  5373. while RS:wait() do
  5374. if landed then falling:Destroy() break end
  5375. grav = math.max(-1, grav - 0.0025)
  5376. --blockPlaced.CFrame = CFrame.new(cFPos.X, blockPlaced.CFrame.Y + grav, cFPos.Z)
  5377. end
  5378. end))
  5379. end
  5380. fallingBlock()
  5381. detector.Touched:connect(function(part)
  5382. if blockPlaced.Anchored == false and part ~= blockPlaced and part.Name ~= "Debris" and part:FindFirstChild("IsFalling") == nil and findHumanoid(part) == nil then
  5383. landed = true
  5384. blockPlaced.CanCollide = true
  5385. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  5386. blockPlaced.Anchored = true
  5387. connectedTo.Value = part
  5388. local yOrigin = part.CFrame.Y + (blockPlaced.Size.Y/2) + (part.Size.Y/2)
  5389. blockPlaced.CFrame = CFrame.new(cFPos.X, yOrigin, cFPos.Z)
  5390. --detector:Destroy()
  5391. local falling = false
  5392. part.Changed:connect(function()
  5393. if part.Position.Y ~= yOrigin and falling == false then
  5394. falling = true
  5395. wait(0.075)
  5396. landed = false
  5397. blockPlaced.Anchored = false
  5398. blockPlaced.CanCollide = false
  5399. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  5400. fallingBlock()
  5401. falling = false
  5402. end
  5403. end)
  5404. workspace.ChildRemoved:connect(function()
  5405. --print("hi")
  5406. if connectedTo.Value.Parent == nil and falling == false then
  5407. falling = true
  5408. landed = false
  5409. blockPlaced.Anchored = false
  5410. blockPlaced.CanCollide = false
  5411. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  5412. fallingBlock()
  5413. end
  5414. end)
  5415. end
  5416. end)
  5417. end
  5418. if block.name ~= "TNT" then
  5419. putTexture(blockPlaced, block.frontTex, block.backTex,
  5420. block.topTex, block.bottomTex, block.leftTex, block.rightTex, "Texture")
  5421. end
  5422. local blockSound = Instance.new("Sound", blockPlaced)
  5423. blockSound.SoundId = block.sound
  5424. blockSound.Volume = block.soundVol
  5425. blockSound.Pitch = math.random(95, 105)/100
  5426. blockSound.PlayOnRemove = true
  5427. blockSound:Play()
  5428. return blockPlaced
  5429. end
  5430. changevalue = Instance.new("RemoteEvent",char)
  5431. changevalue.Name = "buildthing"
  5432. x = Instance.new("CFrameValue",char)
  5433. x.Name = "x"
  5434. y = Instance.new("CFrameValue",char)
  5435. y.Name = "y"
  5436. z = Instance.new("CFrameValue",char)
  5437. z.Name = "z"
  5438. changevalue.OnServerEvent:Connect(function(player,part,cframe)
  5439. part.CFrame = cframe
  5440. part.Name = "Part"
  5441. end)
  5442. NLS([[
  5443. blockcooldowna = false
  5444. function SnapToGrid(x, gridX)
  5445. local x = math.floor((x / gridX) + 0.5) * gridX
  5446. return x
  5447. end
  5448. Mouse = game.Players.LocalPlayer:GetMouse()
  5449. changevaluee = game.Players.LocalPlayer.Character.buildthing
  5450. head = owner.Character.Head
  5451. function getDistance(v1, v2)
  5452. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  5453. end
  5454. Mouse.KeyDown:connect(function(key)
  5455. if key == "b" then
  5456. if blockcooldowna == false then
  5457. blockcooldowna = true
  5458. if Mouse.Target then
  5459. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  5460. local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
  5461. if humanoid then
  5462. humanoid.Health = humanoid.Health - 10
  5463. local parts = Mouse.Target.Parent:GetChildren()
  5464. for _,p in pairs(parts) do
  5465. if p.ClassName == "Part" then
  5466. p.Velocity = Vector3.new(p.Velocity.X + (head.CFrame.lookVector.X * 18), p.Velocity.Y + (head.CFrame.lookVector.Y * 18) + 8, p.Velocity.Z + (head.CFrame.lookVector.Z * 18))
  5467. end
  5468. end
  5469. return
  5470. end
  5471. local x = Mouse.Target.CFrame.p.X
  5472. local y = Mouse.Target.CFrame.p.Y
  5473. local z = Mouse.Target.CFrame.p.Z
  5474. if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
  5475. if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
  5476. if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
  5477. if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
  5478. if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
  5479. if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
  5480. if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
  5481. x = Mouse.Hit.p.X
  5482. y = Mouse.Hit.p.Y
  5483. z = Mouse.Hit.p.Z
  5484. end
  5485. -- local x = round(math.abs(mouseX)/2.6)*2.6
  5486. -- local y = round(math.abs(mouseY)/2.6)*2.6
  5487. -- local z = round(math.abs(mouseZ)/2.6)*2.6
  5488. -- if Mouse.Hit.p.X < 0 then x = x * -1 end
  5489. -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
  5490. -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
  5491. block = Instance.new("Part",workspace)
  5492. block.Size = Vector3.new(2.6,2.6,2.6)
  5493. block.Transparency = 1
  5494. block.Anchored = true
  5495. block.CFrame = CFrame.new(SnapToGrid(x, 2.6), SnapToGrid(y, 2.6), SnapToGrid(z, 2.6))
  5496. changevaluee:FireServer(workspace:WaitForChild(""..owner.Name.."'s Blocks"):WaitForChild("NewBlock"),block.CFrame)
  5497. end
  5498. end
  5499. end
  5500. wait()
  5501. block:Destroy()
  5502. blockcooldowna = false
  5503. end
  5504. end)
  5505. ]],char)
  5506. Mouse.KeyDown:Connect(function(key)
  5507. if key == "b" then
  5508. if blockcooldown == false then
  5509. blockcooldown = true
  5510.  
  5511. if not workspace:FindFirstChild(""..owner.Name.."'s Blocks") then
  5512. local folder = Instance.new("Folder",workspace)
  5513. folder.Name = ""..owner.Name.."'s Blocks"
  5514. end
  5515. if punchEnded == 1 then punching = 1 end
  5516. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  5517. blka = placeBlock(toolBar[selectedBlock + 1], CFrame.new(x.Value, y.Value, z.Value))
  5518. blka.Name = "NewBlock"
  5519. blka.Parent = workspace:WaitForChild(""..owner.Name.."'s Blocks")
  5520. for _,f in pairs(facesToResize) do
  5521. blka:WaitForChild(f).StudsPerTileU = 2.6
  5522. blka:WaitForChild(f).StudsPerTileV = 2.6
  5523. end
  5524. blka.Anchored = true
  5525. --blk.CFrame = CFrame.new(SnapToGrid(blk.CFrame.X, 2.6), SnapToGrid(blk.CFrame.Y, 2.6), SnapToGrid(blk.CFrame.Z, 2.6))
  5526. end
  5527. end
  5528. wait()
  5529. blockcooldown = false
  5530. end
  5531. end)
  5532. blockcooldown = false
  5533. diamondswordselected = false
  5534. function snap(part)
  5535. coroutine.resume(coroutine.create(function()
  5536. part.Name = "Dust"
  5537. part.Anchored = true
  5538. part.CanCollide = true
  5539. local smoke = Instance.new("ParticleEmitter", part)
  5540. smoke.Size = NumberSequence.new({
  5541. NumberSequenceKeypoint.new(0, 0.6),
  5542. NumberSequenceKeypoint.new(1, 0.6)
  5543. })
  5544. coroutine.resume(coroutine.create(function()
  5545. while wait(0.1) do
  5546. part.Transparency = part.Transparency + 1
  5547. end
  5548. end))
  5549. smoke.Texture = "rbxassetid://1494734425"
  5550. smoke.Rate = 100
  5551. smoke.Lifetime = NumberRange.new(0.6, 1.2)
  5552. smoke.Speed = NumberRange.new(2, 5)
  5553. smoke.SpreadAngle = Vector2.new(-30, 30)
  5554.  
  5555. wait(0.07)
  5556.  
  5557. smoke.Enabled = false
  5558.  
  5559. wait(2)
  5560.  
  5561. part:Destroy()
  5562. end))
  5563. end
  5564. Mouse.KeyDown:Connect(function(key)
  5565. if key == "n" and player.Name == "noah878786" or player.Name == "noah878788" then
  5566. if Mouse.Target.Parent.ClassName == "Accessory" then
  5567. accessory = Mouse.Target.Parent
  5568. if accessory.Parent:FindFirstChildOfClass("Humanoid") and not accessory.Parent:FindFirstChildOfClass("Humanoid").Name == "SteveVR" then
  5569. local snapped = accessory.Parent
  5570. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  5571. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  5572. snap(snapped.Head)
  5573. wait()
  5574. for i,v in pairs(snapped:GetChildren()) do
  5575. if v.ClassName == "Accessory" then
  5576. snap(v.Handle)
  5577. end
  5578. end
  5579. snap(snapped.RightUpperArm)
  5580. wait()
  5581. snap(snapped.UpperTorso)
  5582. wait()
  5583. snap(snapped.RightLowerArm)
  5584. wait()
  5585. snap(snapped.LeftUpperArm)
  5586. wait()
  5587. snap(snapped.LowerTorso)
  5588. wait()
  5589. snap(snapped.RightHand)
  5590. wait()
  5591. snap(snapped.LeftLowerArm)
  5592. wait()
  5593. snap(snapped.RightUpperLeg)
  5594. wait()
  5595. snap(snapped.LeftHand)
  5596. wait()
  5597. snap(snapped.RightLowerLeg)
  5598. wait()
  5599. snap(snapped.LeftUpperLeg)
  5600. wait()
  5601. snap(snapped.RightFoot)
  5602. wait()
  5603. snap(snapped.LeftLowerLeg)
  5604. wait()
  5605. snap(snapped.LeftFoot)
  5606. else
  5607. snap(snapped.Head)
  5608. wait()
  5609. for i,v in pairs(snapped:GetChildren()) do
  5610. if v.ClassName == "Accessory" then
  5611. snap(v.Handle)
  5612. end
  5613. end
  5614. snap(snapped["Right Arm"])
  5615. wait()
  5616. snap(snapped.Torso)
  5617. wait()
  5618. snap(snapped["Right Leg"])
  5619. wait()
  5620. snap(snapped["Left Arm"])
  5621. wait()
  5622. snap(snapped["Left Leg"])
  5623. end
  5624. end
  5625. end
  5626. if Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") and accessory.Parent:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
  5627. local snapped = Mouse.Target.Parent
  5628. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  5629. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  5630. snap(snapped.Head)
  5631. wait()
  5632. for i,v in pairs(snapped:GetChildren()) do
  5633. if v.ClassName == "Accessory" then
  5634. snap(v.Handle)
  5635. end
  5636. end
  5637. snap(snapped.RightUpperArm)
  5638. wait()
  5639. snap(snapped.UpperTorso)
  5640. wait()
  5641. snap(snapped.RightLowerArm)
  5642. wait()
  5643. snap(snapped.LeftUpperArm)
  5644. wait()
  5645. snap(snapped.LowerTorso)
  5646. wait()
  5647. snap(snapped.RightHand)
  5648. wait()
  5649. snap(snapped.LeftLowerArm)
  5650. wait()
  5651. snap(snapped.RightUpperLeg)
  5652. wait()
  5653. snap(snapped.LeftHand)
  5654. wait()
  5655. snap(snapped.RightLowerLeg)
  5656. wait()
  5657. snap(snapped.LeftUpperLeg)
  5658. wait()
  5659. snap(snapped.RightFoot)
  5660. wait()
  5661. snap(snapped.LeftLowerLeg)
  5662. wait()
  5663. snap(snapped.LeftFoot)
  5664. else
  5665. snap(snapped.Head)
  5666. wait()
  5667. for i,v in pairs(snapped:GetChildren()) do
  5668. if v.ClassName == "Accessory" then
  5669. snap(v.Handle)
  5670. end
  5671. end
  5672. snap(snapped["Right Arm"])
  5673. wait()
  5674. snap(snapped.Torso)
  5675. wait()
  5676. snap(snapped["Right Leg"])
  5677. wait()
  5678. snap(snapped["Left Arm"])
  5679. wait()
  5680. snap(snapped["Left Leg"])
  5681. end
  5682. end
  5683. end
  5684. end)
  5685. Mouse.KeyDown:Connect(function(key)
  5686. if key == "j" and player.Name == "noah878786" or player.Name == "noah878788" then
  5687. for i,v in pairs(game.Workspace:GetChildren()) do
  5688. if v:FindFirstChildOfClass("Humanoid") and v.Name ~= player.Name and v:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
  5689. coroutine.resume(coroutine.create(function()
  5690. local snapped = v
  5691. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  5692. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  5693. snap(snapped.Head)
  5694. wait()
  5695. for i,v in pairs(snapped:GetChildren()) do
  5696. if v.ClassName == "Accessory" then
  5697. snap(v.Handle)
  5698. end
  5699. end
  5700. snap(snapped.RightUpperArm)
  5701. wait()
  5702. snap(snapped.UpperTorso)
  5703. wait()
  5704. snap(snapped.RightLowerArm)
  5705. wait()
  5706. snap(snapped.LeftUpperArm)
  5707. wait()
  5708. snap(snapped.LowerTorso)
  5709. wait()
  5710. snap(snapped.RightHand)
  5711. wait()
  5712. snap(snapped.LeftLowerArm)
  5713. wait()
  5714. snap(snapped.RightUpperLeg)
  5715. wait()
  5716. snap(snapped.LeftHand)
  5717. wait()
  5718. snap(snapped.RightLowerLeg)
  5719. wait()
  5720. snap(snapped.LeftUpperLeg)
  5721. wait()
  5722. snap(snapped.RightFoot)
  5723. wait()
  5724. snap(snapped.LeftLowerLeg)
  5725. wait()
  5726. snap(snapped.LeftFoot)
  5727. else
  5728. snap(snapped.Head)
  5729. wait()
  5730. for i,v in pairs(snapped:GetChildren()) do
  5731. if v.ClassName == "Accessory" then
  5732. snap(v.Handle)
  5733. end
  5734. end
  5735. snap(snapped["Right Arm"])
  5736. wait()
  5737. snap(snapped.Torso)
  5738. wait()
  5739. snap(snapped["Right Leg"])
  5740. wait()
  5741. snap(snapped["Left Arm"])
  5742. wait()
  5743. snap(snapped["Left Leg"])
  5744. end
  5745. end))
  5746. end
  5747. end
  5748. end
  5749. end)
  5750. Mouse.KeyDown:Connect(function(key)
  5751. if key == "p" then
  5752. if not workspace:FindFirstChild("Signs") then
  5753. local folder = Instance.new("Folder",workspace)
  5754. folder.Name = "Signs"
  5755. end
  5756. if punchEnded == 1 then punching = 1 end
  5757. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  5758. local x = Mouse.Hit.p.X
  5759. local y = Mouse.Hit.p.Y
  5760. local z = Mouse.Hit.p.Z
  5761. placeSign()
  5762. end
  5763. end
  5764. end)
  5765. Mouse.KeyDown:Connect(function(key)
  5766. if key == "p" then
  5767. if not workspace:FindFirstChild("Signs") then
  5768. local folder = Instance.new("Folder",workspace)
  5769. folder.Name = "Signs"
  5770. end
  5771. if punchEnded == 1 then punching = 1 end
  5772. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  5773. local x = Mouse.Hit.p.X
  5774. local y = Mouse.Hit.p.Y
  5775. local z = Mouse.Hit.p.Z
  5776. placeSign()
  5777. end
  5778. end
  5779. end)
  5780. diamondswordtoggled = false
  5781. Mouse.KeyDown:Connect(function(key)
  5782. if key == "f" then
  5783. if diamondswordtoggled == true then
  5784. diamondswordtoggled = false
  5785. else
  5786. diamondswordtoggled = true
  5787. end
  5788. end
  5789. end)
  5790.  
  5791. local changedItem = false
  5792. local hasItemOnHand = 0
  5793. local hi = 0
  5794. -- selection thingy
  5795. local selectLabel = Instance.new("TextLabel", gui)
  5796. selectLabel.Size = UDim2.new(0, 32, 0, 32)
  5797. selectLabel.Position = UDim2.new(0.5, -160 + (selectedBlock*40), 1, -105)
  5798. selectLabel.BackgroundTransparency = 1
  5799. selectLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  5800. selectLabel.BorderSizePixel = 0
  5801. selectLabel.Text = ""
  5802. selectLabel.ZIndex = 3
  5803. makeSquare(UDim2.new(0, -2, 0, 0), UDim2.new(0, 2, 0, 32),
  5804. Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
  5805. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 32, 0, 2),
  5806. Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
  5807. makeSquare(UDim2.new(0, -2, 0, 32), UDim2.new(0, 36, 0, 2),
  5808. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  5809. makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 32),
  5810. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  5811. makeSquare(UDim2.new(0, 34, 0, -4), UDim2.new(0, 2, 0, 40),
  5812. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  5813. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 40),
  5814. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  5815. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
  5816. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  5817. makeSquare(UDim2.new(0, 32, 0, -2), UDim2.new(0, 2, 0, 2),
  5818. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  5819. makeSquare(UDim2.new(0, -4, 0, 34), UDim2.new(0, 40, 0, 2),
  5820. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  5821. makeSquare(UDim2.new(0, -6, 0, -6), UDim2.new(0, 2, 0, 42),
  5822. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  5823. makeSquare(UDim2.new(0, -6, 0, -6), UDim2.new(0, 42, 0, 2),
  5824. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  5825. makeSquare(UDim2.new(0, 36, 0, -4), UDim2.new(0, 2, 0, 40),
  5826. Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
  5827. makeSquare(UDim2.new(0, 36, 0, -6), UDim2.new(0, 2, 0, 2),
  5828. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  5829. makeSquare(UDim2.new(0, 38, 0, -6), UDim2.new(0, 2, 0, 44),
  5830. Color3.new(0/255, 0/255, 0/255), 0.3, selectLabel, 3)
  5831. makeSquare(UDim2.new(0, -8, 0, -6), UDim2.new(0, 2, 0, 44),
  5832. Color3.new(0/255, 0/255, 0/255), 0.3, selectLabel, 3)
  5833. makeSquare(UDim2.new(0, -8, 0, -8), UDim2.new(0, 48, 0, 2),
  5834. Color3.new(0/255, 0/255, 0/255), 0, selectLabel, 3)
  5835. --
  5836. Invbutton.MouseButton1Click:Connect(function()
  5837. if creativeInventoryGUI.Visible == true then
  5838. creativeInventoryGUI.Visible = false
  5839. elseif creativeInventoryGUI.Visible == false then
  5840. creativeInventoryGUI.Visible = true
  5841. end
  5842. end)
  5843. CrouchButton.MouseButton1Click:Connect(function()
  5844. if sneaking == 0 then
  5845. sneaking = 1
  5846. MobileCrouching = Instance.new("BoolValue",char)
  5847. MobileCrouching.Name = "MobileCrouching"
  5848. MobileCrouching.Value = true
  5849. humanoid.WalkSpeed = humanoid.WalkSpeed / 2
  5850. rootJoint.C1 = CFrame.Angles(math.rad(sneaking*45), 0, 0)
  5851. --neck.C1 = CFrame.Angles(-math.rad(torso.Orientation.X - (sneaking*25)), 0, 0)
  5852. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  5853. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  5854. --print("Sneaking...")
  5855. else
  5856. for i,v in pairs(char:GetChildren()) do
  5857. if v.Name == "MobileCrouching" then
  5858. v:Destroy()
  5859. end
  5860. end
  5861. sneaking = 0
  5862. humanoid.WalkSpeed = humanoid.WalkSpeed * 2
  5863. humanoid.HipHeight = 0.3
  5864. rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
  5865. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  5866. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  5867. --print("Stopped sneaking...")
  5868. end
  5869. end)
  5870. CBlockButton.MouseButton1Click:Connect(function()
  5871. if selectedBlock == 8 then
  5872. selectedBlock = -1
  5873. diamondswordtoggled = false
  5874. end
  5875. selectedBlock = selectedBlock + 1
  5876. diamondswordtoggled = false
  5877. itemOnHand = toolBar[selectedBlock + 1]
  5878. if selectedBlock > 7 then
  5879. for _,d in pairs(handItem:GetChildren()) do
  5880. d:Destroy()
  5881. end
  5882. handItem.Transparency = 1
  5883. end
  5884. if selectedBlock < 7 then
  5885. for _,d in pairs(handItem:GetChildren()) do
  5886. d:Destroy()
  5887. end
  5888. putTexture(handItem, itemOnHand.frontTex, itemOnHand.backTex,
  5889. itemOnHand.topTex, itemOnHand.bottomTex,
  5890. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  5891. for _,f in pairs(facesToResize) do
  5892. handItem:WaitForChild(f).StudsPerTileU = 0.52
  5893. handItem:WaitForChild(f).StudsPerTileV = 0.52
  5894. end
  5895. elseif selectedBlock > 7 then
  5896. for _,d in pairs(handItem:GetChildren()) do
  5897. d:Destroy()
  5898. end
  5899. if hasItemOnHand == 1 then hi = 1 end
  5900. end
  5901. end)
  5902. PBlockButton.MouseButton1Click:Connect(function()
  5903. if not workspace:FindFirstChild("Blocks") then
  5904. local folder = Instance.new("Folder",workspace)
  5905. folder.Name = "Blocks"
  5906. end
  5907. if punchEnded == 1 then punching = 1 end
  5908. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  5909. local x = Mouse.Hit.p.X
  5910. local y = Mouse.Hit.p.Y
  5911. local z = Mouse.Hit.p.Z
  5912. local blk = placeBlock(toolBar[selectedBlock + 1], CFrame.new(x, y, z))
  5913. blk.Parent = workspace:WaitForChild("Blocks")
  5914. for _,f in pairs(facesToResize) do
  5915. blk:WaitForChild(f).StudsPerTileU = 2.6
  5916. blk:WaitForChild(f).StudsPerTileV = 2.6
  5917. end
  5918. wait(0.03)
  5919. BodyForce:Destroy()
  5920. blk.Anchored = true
  5921. blk.CFrame = CFrame.new(SnapToGrid(blk.CFrame.X, 2.6), SnapToGrid(blk.CFrame.Y, 2.6), SnapToGrid(blk.CFrame.Z, 2.6))
  5922. end
  5923. end)
  5924. SwordButton.MouseButton1Click:Connect(function()
  5925. if diamondswordtoggled == true then
  5926. diamondswordtoggled = false
  5927. else
  5928. diamondswordtoggled = true
  5929. end
  5930. end)
  5931. SignButton.MouseButton1Click:Connect(function()
  5932. placeSign()
  5933. end)
  5934. Mouse.KeyDown:connect(function(key)
  5935. if key == "q" then
  5936. sneaking = 1
  5937. humanoid.WalkSpeed = humanoid.WalkSpeed / 2
  5938. rootJoint.C1 = CFrame.Angles(math.rad(sneaking*45), 0, 0)
  5939.  
  5940. --neck.C1 = CFrame.Angles(-math.rad(torso.Orientation.X - (sneaking*25)), 0, 0)
  5941. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  5942. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  5943. --print("Sneaking...")
  5944. end
  5945. if key == "r" then
  5946. if creativeInventoryGUI.Visible == true then
  5947. creativeInventoryGUI.Visible = false
  5948. elseif creativeInventoryGUI.Visible == false then
  5949. creativeInventoryGUI.Visible = true
  5950. end
  5951. end
  5952. if key == "e" then
  5953. if selectedBlock == 8 then
  5954. selectedBlock = -1
  5955. diamondswordtoggled = false
  5956. end
  5957. selectedBlock = selectedBlock + 1
  5958. diamondswordtoggled = false
  5959. itemOnHand = toolBar[selectedBlock + 1]
  5960. if selectedBlock > 7 then
  5961. for _,d in pairs(handItem:GetChildren()) do
  5962. d:Destroy()
  5963. end
  5964. handItem.Transparency = 1
  5965. end
  5966. if selectedBlock < 7 then
  5967. for _,d in pairs(handItem:GetChildren()) do
  5968. d:Destroy()
  5969. end
  5970. putTexture(handItem, itemOnHand.frontTex, itemOnHand.backTex,
  5971. itemOnHand.topTex, itemOnHand.bottomTex,
  5972. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  5973. for _,f in pairs(facesToResize) do
  5974. handItem:WaitForChild(f).StudsPerTileU = 0.52
  5975. handItem:WaitForChild(f).StudsPerTileV = 0.52
  5976. end
  5977. elseif selectedBlock > 7 then
  5978. for _,d in pairs(handItem:GetChildren()) do
  5979. d:Destroy()
  5980. end
  5981. if hasItemOnHand == 1 then hi = 1 end
  5982. end
  5983. end
  5984. end)
  5985. Mouse.KeyDown:connect(function(key)
  5986. if (key == "0" or key == "1" or key == "2"
  5987. or key == "3" or key == "4" or key == "5"
  5988. or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
  5989. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  5990. end)
  5991.  
  5992.  
  5993. Mouse.KeyUp:connect(function(key)
  5994. if key == "q" then
  5995. sneaking = 0
  5996. humanoid.WalkSpeed = humanoid.WalkSpeed * 2
  5997. humanoid.HipHeight = 0.3
  5998. rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
  5999. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  6000. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  6001. --print("Stopped sneaking...")
  6002. end
  6003. end)
  6004. weldarmshield = Instance.new("Weld",char)
  6005. weldarmshield.C0 = CFrame.new(0,0.6,-1) * CFrame.Angles(math.rad(100),math.rad(180),math.rad(-65))
  6006. weldarmshield.Part0 = torso
  6007. dead = false
  6008. local humOffset = CFrame.new(0, 0, 0)
  6009. while RS:wait() do
  6010. if shieldenabled == true then
  6011. for i,v in pairs(Model0:GetDescendants()) do
  6012. if v.ClassName == "Part" then
  6013. v.Transparency = 0
  6014. v.CanCollide = false
  6015. end
  6016. end
  6017. end
  6018. if shieldenabled == false then
  6019. for i,v in pairs(Model0:GetDescendants()) do
  6020. if v.ClassName == "Part" then
  6021. v.Transparency = 1
  6022. v.CanCollide = false
  6023. end
  6024. end
  6025. end
  6026. if sneaking == 1 then
  6027. if shieldenabled == true then
  6028. shieldblock = true
  6029. end
  6030. end
  6031. if sneaking == 0 then
  6032. if shieldenabled == true then
  6033. shieldblock = false
  6034. end
  6035. end
  6036.  
  6037. if shieldblock == true then
  6038. weldarmshield.Part1 = rArm
  6039. char:FindFirstChildOfClass("Humanoid").Health = 100
  6040. end
  6041. if shieldblock == false then
  6042. weldarmshield.Part1 = nil
  6043. --char.Humanoid.Health = char.Humanoid.MaxHealth
  6044. end
  6045. if diamondswordtoggled == true then
  6046. diamondsword.Transparency = 0
  6047. damage = 35
  6048. itemOnHand = true
  6049. end
  6050. if diamondswordtoggled == false then
  6051. diamondsword.Transparency = 1
  6052. damage = 10
  6053. itemOnHand = false
  6054. end
  6055. if neededtopunch == true then
  6056. if punchEnded == 1 then punching = 1 end
  6057. end
  6058. hearts.Size = UDim2.new(0, SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8) + 2, 0, 18)
  6059. if itemOnHand ~= nil then
  6060. hasItemOnHand = 1
  6061. handItem.Transparency = 0
  6062. else
  6063. hasItemOnHand = 0
  6064. handItem.Transparency = 1
  6065. end
  6066. if humanoid.Health < oldHP then
  6067. damageTime = 60
  6068. sound:Play()
  6069. end
  6070. oldHP = humanoid.Health
  6071. if damageTime > 0 and humanoid.Health > 0 then
  6072. for _,p in pairs(char:GetChildren()) do
  6073. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  6074. if p.Name == "DamagePart" then
  6075. p.Transparency = 0.5
  6076. end
  6077. end
  6078. end
  6079. damageTime = damageTime - 2
  6080. if damageTime <= 0 then
  6081. for _,p in pairs(char:GetChildren()) do
  6082. if p.Name ~= "HumanoidRootPart" and p ~= diamondsword and p.ClassName == "Part" then
  6083. if p.Name == "DamagePart" then
  6084. p.Transparency = 1
  6085. end
  6086. end
  6087. end
  6088. end
  6089. end
  6090. function updateItemOnHand()
  6091. for _,d in pairs(handItem:GetChildren()) do
  6092. d:Destroy()
  6093. end
  6094.  
  6095. if oldItemOnHand ~= itemOnHand then
  6096. changedItem = true
  6097. end
  6098. end
  6099. if updateHand == true then
  6100. updateHand = false
  6101. updateItemOnHand()
  6102. if oldItemOnHand ~= itemOnHand then
  6103. changedItem = true
  6104. end
  6105. end
  6106. local pressedWTimes = 0
  6107. local sprintingNum = 0
  6108. local sprinting = false
  6109. Mouse.KeyDown:connect(function(key)
  6110. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  6111. if (key == "w" and sprinting == false and sneaking == 0) then
  6112. if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
  6113. sprinting = true
  6114. humanoid.WalkSpeed = 25
  6115. pressedWTimes = 0
  6116. end
  6117. pressedWTimes = pressedWTimes + 1
  6118. coroutine.resume(coroutine.create(function()
  6119. for i = 1, 9 do
  6120. if sprinting == true then break end
  6121. wait()
  6122. end
  6123. pressedWTimes = 0
  6124. end))
  6125. end
  6126. end)
  6127. Mouse.KeyUp:connect(function(key)
  6128. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  6129. if (key == "w" and sprinting == true and sneaking == 0) then
  6130. sprinting = false
  6131. humanoid.WalkSpeed = 16
  6132. end
  6133. end)
  6134. Mouse.KeyUp:connect(function(key)
  6135. if key == "w" and sprinting == true and sneaking == 0 then
  6136. sprinting = false
  6137. humanoid.WalkSpeed = 16
  6138. pressedWTimes = 0
  6139. end
  6140. end)
  6141. Mouse.KeyDown:connect(function(key)
  6142. if key == "1" or key == "2" or key == "3" or
  6143. key == "4" or key == "5" or key == "6" or
  6144. key == "7" or key == "8" or key == "9" then
  6145. selectedBlock = tonumber(key) - 1
  6146. oldItemOnHand = itemOnHand
  6147. itemOnHand = toolBar[tonumber(key)]
  6148. updateItemOnHand()
  6149. if hasItemOnHand == 0 and itemOnHand then hi = 1 end
  6150. if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
  6151. end
  6152. --if (key == "0" or key == "1" or key == "2"
  6153. -- or key == "3" or key == "4" or key == "5"
  6154. -- or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
  6155. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  6156. end)
  6157. function findNearestTorso(pos)
  6158. local list = game.Workspace:children()
  6159. local torso = nil
  6160. local dist = 3
  6161. local temp = nil
  6162. local human = nil
  6163. local temp2 = nil
  6164. slainbysomeone = nil
  6165. playername = nil
  6166. for x = 1, #list do
  6167. temp2 = list[x]
  6168. if (temp2.className == "Model") and (temp2 ~= char) then
  6169. temp = temp2
  6170. human = temp2:findFirstChild("Humanoid")
  6171. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  6172. if (temp.HumanoidRootPart.Position - pos).magnitude < dist then
  6173. playername = temp.Name
  6174. dist = (temp.HumanoidRootPart.Position - pos).magnitude
  6175. end
  6176. end
  6177. end
  6178. end
  6179. return torso
  6180. end
  6181. --wait(math.random(0,5)/10)
  6182. if humanoid.Health < 1 and dead == false then
  6183. dead = true
  6184. coroutine.resume(coroutine.create(function()
  6185. local target = findNearestTorso(torso.Position)
  6186. if target ~= nil and target:FindFirstChildOfClass("Tool") and target:FindFirstChildOfClass("Tool").Name ~= "Building Tools" and target:FindFirstChildOfClass("Tool").Name ~= "Insert" then
  6187. slainbysomeone = true
  6188. end
  6189. end))
  6190. coroutine.resume(coroutine.create(function()
  6191. local corpseCF = humRootPart.CFrame + Vector3.new(0, -2.925, 0)
  6192. local corpse = Instance.new("Part", workspace)
  6193. corpse.Anchored = true
  6194. corpse.Name = "Dead Corpse"
  6195. target = char
  6196. target.Archivable = true
  6197. playercorpse = target:Clone()
  6198. playercorpse.Parent = corpse
  6199. corpse.Size = Vector3.new(3, 1, 3)
  6200. corpse.CFrame = corpseCF
  6201. corpse.Transparency = 1
  6202. corpse.CustomPhysicalProperties = PhysicalProperties.new(1, 1, 0, 1, 1)
  6203.  
  6204. local dHead = playercorpse.Head
  6205. dHead.CanCollide = false
  6206. --dHead.Material = "Fabric"
  6207.  
  6208. local dTorso = playercorpse.Torso
  6209. dTorso.CanCollide = false
  6210.  
  6211. local dLArm = playercorpse["Left Arm"]
  6212. dLArm.CanCollide = false
  6213.  
  6214. local dRArm = playercorpse["Right Arm"]
  6215. dRArm.CanCollide = false
  6216.  
  6217. local dLLeg = playercorpse["Right Leg"]
  6218. dLLeg.CanCollide = false
  6219.  
  6220. local dRLeg = playercorpse["Right Leg"]
  6221. dRLeg.CanCollide = false
  6222. weldCorpse = Instance.new("Weld",corpse)
  6223. weldCorpse.Part0 = dTorso
  6224. weldCorpse.Part1 = corpse
  6225. weldCorpse.C0 = CFrame.new(0, -1.95 - 0.4, 0)
  6226.  
  6227. -- lazy naming...
  6228.  
  6229. for _,p in pairs(playercorpse:GetChildren()) do
  6230. if p.Name == "DamagePart" then
  6231. p.Transparency = 0.5
  6232. end
  6233. end
  6234.  
  6235. head.Parent = nil
  6236. torso.Parent = nil
  6237. lArm.Parent = nil
  6238. rArm.Parent = nil
  6239. lLeg.Parent = nil
  6240. rLeg.Parent = nil
  6241.  
  6242. weldTo(dTorso, humRootPart)
  6243.  
  6244. for i = 1, 55 do
  6245. corpse.CFrame = corpseCF --*
  6246. --CFrame.Angles(math.rad(-corpse.Orientation.X), 0, math.rad(-corpse.Orientation.Z))
  6247.  
  6248. weldCorpse.C1 = weldCorpse.C1:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(90)), 0.075)
  6249. RS:wait()
  6250. end
  6251. for _,p in pairs(corpse:GetChildren()) do
  6252. p:Destroy()
  6253. end
  6254.  
  6255. corpse.Anchored = true
  6256.  
  6257. local smoke = Instance.new("ParticleEmitter", corpse)
  6258. smoke.Size = NumberSequence.new({
  6259. NumberSequenceKeypoint.new(0, 0.6),
  6260. NumberSequenceKeypoint.new(1, 0.6)
  6261. })
  6262. smoke.Texture = "rbxassetid://1494734425"
  6263. smoke.Rate = 100
  6264. smoke.Lifetime = NumberRange.new(0.6, 1.2)
  6265. smoke.Speed = NumberRange.new(2, 5)
  6266. smoke.SpreadAngle = Vector2.new(-30, 30)
  6267.  
  6268. wait(0.07)
  6269.  
  6270. smoke.Enabled = false
  6271.  
  6272. wait(2)
  6273.  
  6274. corpse:Destroy()
  6275. print("You died!")
  6276. end))
  6277. for i,v in pairs(game.Players:GetChildren()) do
  6278. coroutine.resume(coroutine.create(function()
  6279. local sc = Instance.new("ScreenGui",v.PlayerGui)
  6280. sc.Name = "deathmessage"
  6281. local frame = Instance.new("Frame",sc)
  6282. frame.Position = UDim2.new(0,0,0.796,0)
  6283. frame.Size = UDim2.new(0,518,0,112)
  6284. frame.BackgroundTransparency = 1
  6285. local textLabel = Instance.new("TextLabel",frame)
  6286. textLabel.TextSize = 24
  6287. textLabel.Font = "Arcade"
  6288. textLabel.Size = UDim2.new(1,0,1,0)
  6289. textLabel.Position = UDim2.new(0,1,0,1)
  6290. textLabel.BackgroundTransparency = 0.5
  6291. textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  6292. textLabel.TextColor3 = Color3.new(255, 255, 255)
  6293. if diedtofalldamage == false then
  6294. textLabel.Text = player.Name.." died"
  6295. print(textLabel.Text)
  6296. wait(5)
  6297. textLabel.Visible = false
  6298. else
  6299. textLabel.Text = player.Name.." fell from a high place"
  6300. print(textLabel.Text)
  6301. wait(5)
  6302. textLabel.Visible = false
  6303. end
  6304. if slainbysomeone == false then
  6305. textLabel.Text = player.Name.." died"
  6306. print(textLabel.Text)
  6307. wait(5)
  6308. textLabel.Visible = false
  6309. else
  6310. textLabel.Text = player.Name.." was slain by "..playername
  6311. wait(5)
  6312. textLabel.Visible = false
  6313. end
  6314. end))
  6315. end
  6316. print("You died!")
  6317. end
  6318. local CFNew, CFAng, CFEulAng, Rad = CFrame.new, CFrame.Angles, CFrame.fromEulerAnglesXYZ, math.rad
  6319. --neck.C0 = neck.C0:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  6320.  
  6321. if getMagnitudeXZ(torso.Velocity) > 1 then
  6322. if walkAnim >= 1 then
  6323. increaseWalkAnim = -1
  6324. elseif walkAnim <= -1 then
  6325. increaseWalkAnim = 1
  6326. end
  6327. walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
  6328. else
  6329. walkAnim = 0
  6330. end
  6331. --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  6332. --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  6333. lH.C0 = lH.C0:lerp(CFrame.new(0, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), -math.rad(sneaking*45) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, 0), 0.15)
  6334. rH.C0 = rH.C0:lerp(CFrame.new(0, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), math.rad(sneaking*45) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, 0), 0.15)
  6335. --
  6336. --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  6337. --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
  6338. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
  6339. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
  6340. --print("-45")
  6341. --end
  6342. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
  6343. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
  6344. --print("45")
  6345. --end
  6346. dododododo = false
  6347. thingyyyy = true
  6348. coroutine.resume(coroutine.create(function()
  6349. while wait(0.000) do
  6350. if dododododo == true then
  6351. if thingyyyy == true then
  6352. thingyyyy = false
  6353. humanoid.HipHeight = humanoid.HipHeight - 0.001
  6354. wait()
  6355. humanoid.HipHeight = humanoid.HipHeight - 0.001
  6356. wait()
  6357. humanoid.HipHeight = humanoid.HipHeight - 0.005
  6358. wait()
  6359. humanoid.HipHeight = humanoid.HipHeight - 0.050
  6360. wait()
  6361. humanoid.HipHeight = humanoid.HipHeight - 0.050
  6362. wait()
  6363. humanoid.HipHeight = humanoid.HipHeight + 0.050
  6364. wait()
  6365. humanoid.HipHeight = humanoid.HipHeight + 0.050
  6366. wait()
  6367. humanoid.HipHeight = humanoid.HipHeight + 0.005
  6368. wait()
  6369. humanoid.HipHeight = humanoid.HipHeight + 0.001
  6370. wait()
  6371. humanoid.HipHeight = humanoid.HipHeight + 0.001
  6372. wait()
  6373. thingyyyy = true
  6374. end
  6375. end
  6376. end
  6377. end))
  6378. --move these arms
  6379. local BobbingY = walkAnim*2
  6380. if BobbingY >= 1 then BobbingY = 1 BobbingY = -BobbingY end
  6381. humanoid.Running:Connect(function()
  6382. dododododo = true
  6383. end)
  6384. humanoid.PlatformStanding:Connect(function()
  6385. dododododo = false
  6386. end)
  6387.  
  6388. local BobbingX = -0.5 + walkAnim
  6389. --neck.C0 = neck.C0:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  6390. humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
  6391.  
  6392. rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
  6393.  
  6394. rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
  6395.  
  6396. lS.C0 = lS.C0:lerp(CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), idleAnimRotX/20 + math.rad(-hasItemOnHand*10) + math.rad(punchRotX) + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, math.rad(punchRotZ) + idleAnimRotZ/20), 0.025+(math.min(1, getMagnitudeXZ(torso.Velocity))/12)*2 + divide(punchSpeed, 6) + hi)
  6397. rS.C0 = rS.C0:lerp(CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(math.max(math.rad(-60), math.min(math.rad(60), idleAnimRotX/20 + math.rad(damageTime*1.5) + math.rad(walkAnim*getMagnitudeXZ(torso.Velocity)*5/(1+sneaking)))), 0, idleAnimRotZ/20), 0.025+(math.min(1, getMagnitudeXZ(torso.Velocity))/12)*2)
  6398.  
  6399. if Mouse.Target and Mouse.Target ~= camPart and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  6400. selectBox.Adornee = Mouse.Target
  6401. else
  6402. selectBox.Adornee = nil
  6403. end
  6404.  
  6405. if punching == 1 and punchEnded == 1 then
  6406. punching = 0
  6407. --print("steve uses punch!!")
  6408. local coPunch = coroutine.wrap(function()
  6409. punchEnded = 0
  6410. punchSpeed = 1
  6411. punchRotX = -60
  6412. punchRotY = -8
  6413. punchRotZ = -35
  6414. wait(0.075)
  6415. punchSpeed = 1
  6416. punchRotX = -75
  6417. punchRotY = 8
  6418. punchRotZ = 40
  6419. wait(0.075)
  6420. punchSpeed = 1
  6421. punchRotX = -20
  6422. punchRotZ = 40
  6423. wait(0.075)
  6424. punchSpeed = 3.5
  6425. punchRotX = 0
  6426. punchRotY = 0
  6427. punchRotZ = 0
  6428. punchEnded = 1
  6429. wait(0.06)
  6430. punchSpeed = 0
  6431. end)
  6432. coPunch()
  6433. end
  6434.  
  6435. if ticks > 20 then
  6436. ticks = 0
  6437. if times == 0 then
  6438. times = times + 1
  6439. idleAnimRotX = -1
  6440. idleAnimRotZ = 0
  6441. elseif times == 1 then
  6442. times = times + 1
  6443. idleAnimRotX = -0.75
  6444. idleAnimRotZ = -0.75
  6445. elseif times == 2 then
  6446. times = times + 1
  6447. idleAnimRotX = 0
  6448. idleAnimRotZ = -1
  6449. elseif times == 3 then
  6450. times = times + 1
  6451. idleAnimRotX = 0.75
  6452. idleAnimRotZ = -0.75
  6453. --idleAnimRotX = 0.75
  6454. --idleAnimRotZ = -0
  6455. elseif times == 4 then
  6456. times = times + 1
  6457. idleAnimRotX = 1
  6458. idleAnimRotZ = 0
  6459. --idleAnimRotX = 1
  6460. --idleAnimRotZ = 0
  6461. elseif times == 5 then
  6462. times = times + 1
  6463. idleAnimRotX = 0.75
  6464. idleAnimRotZ = 0.75
  6465. elseif times == 6 then
  6466. times = times + 1
  6467. idleAnimRotX = 0
  6468. idleAnimRotZ = 1
  6469. elseif times == 7 then
  6470. times = 0
  6471. idleAnimRotX = -0.75
  6472. idleAnimRotZ = 0.75
  6473. end
  6474. end
  6475.  
  6476. if hi == 1 then hi = 0 end
  6477. end
  6478.  
  6479. end
  6480.  
  6481. end
  6482. end
Add Comment
Please, Sign In to add comment