sIendytubble

steve script but its skeppy

May 10th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 166.75 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.  
  6. -- ORIGINAL CREATOR: Depr1
  7. --Fixed lags by stommmDev for toasters if the creator wants to shut down this script i will
  8. -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
  9. -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
  10. -- then this is not the original link of this script.
  11.  
  12. -- The original link of the script gets edited constantly for updates, if you use the original
  13. -- link you will be able to enjoy the most recent updates of this script without changing to
  14. -- another link which contains updated script.
  15.  
  16. -- Enjoy! :)
  17. -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks, choose a empty slot i
  18. -- you want to remove a block.
  19. -- if your a noob who wants alex back then republish this pastebin and add "rbxassetid://295150002", in the faces
  20. faces = {"http://www.roblox.com/asset/?id=4783606175"}
  21. local Changelog = [[
  22. SKEPPY EDITION!!!
  23. Hey, thanks for using my Steve script!
  24. (WOOHOO! Void Script Builder Compatible!!)
  25. updateBoard V1.0.2
  26. ChangeLogs:
  27. 4/28/2020:
  28. -remove alex
  29. MEGA UPDATE!!!!!!!!
  30. only TWO thing though but its big
  31. CAMERA FOLLOW!
  32. First Person Hand
  33. also you cant break your neck :3
  34. i have a hope for camera following so just you wait :) i will try to add it
  35. 4/15/2020:
  36. added alex skin back
  37. 4/12/2020:
  38. -added a diamond sword to enable/disable it press F
  39. Notice:
  40. i am starting to remove the lower changelogs so you can click the x on the
  41. changelog gui
  42. removed the thing where it wont let you break your neck since it makes
  43. your character stuck in the same position when you load the script fixed a bug with the head to mouse follow where if you crouch your head
  44. orientation would be on the X part of orientation
  45. HUGE ONE!
  46. Added camera follow(PS IT ISNT LIKE REAL ONE.IT FOLLOWS THE MOUSE since you cant use camera in fe scripts and also
  47. the head can also glitch a bit while turning your head so yeah i
  48. will fix that soon
  49. also also
  50. you cant break your neck with the head follows mouse)
  51. CONTROLS:
  52. press w 2 times for sprint
  53. press b to place a block
  54. press e to change block in the toolbar
  55. click a block in the creative inventory or in the toolbar-
  56. to put a block back or get one out-
  57. -(you dont have to hold it you only have to click twice.one-
  58. to pick second to put)
  59. press p to place a sign(make your your mouse is facing a part)
  60. press q to crouch
  61. Special Note:
  62. im letting people become a beta tester to some of my new features for FREE!
  63. dm on discord at Boeing 767#8836 if you want to test some new features.
  64. Beta Testers:
  65. guest712921
  66. ]]
  67. -- this script will transform you into steve when used
  68. function getSideByLocation(loc)
  69. local side = nil
  70. if loc.X < 0 then side = "Left" end
  71. if loc.X > 0 then side = "Right" end
  72. if loc.Y > 0 then side = "Top" end
  73. if loc.Y < 0 then side = "Bottom" end
  74. if loc.Z < 0 then side = "Front" end
  75. if loc.Z > 0 then side = "Back" end
  76.  
  77. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  78. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  79. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  80. then
  81. return nil
  82. end
  83. return side
  84. end
  85. workspace:WaitForChild("Camera"):ClearAllChildren()
  86. local RS = game:GetService("RunService").RenderStepped
  87. local targetName = owner.Name
  88. local player = owner
  89. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  90. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  91. for i,f in pairs(faces) do
  92. local decal = Instance.new(className, part)
  93. if i == 1 then decal.Texture = frontF decal.Name = f end
  94. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  95. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  96. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  97. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  98. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  99. decal.Face = f
  100. end
  101. return part
  102. end
  103. function makeSquare(position, size, color, transparency, parent, zindex)
  104. local label = Instance.new("TextLabel", parent)
  105. label.Text = ""
  106. label.BorderSizePixel = 0
  107. label.BackgroundTransparency = transparency
  108. label.Position = position
  109. label.Size = size
  110. label.BackgroundColor3 = color
  111. if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
  112. return label
  113. end
  114. function AngleDifference(Angle1, Angle2)
  115. local Difference = {X = 0, Y = 0, Z = 0}
  116. Difference.X = Angle2.X - Angle1.X
  117.  
  118. if (Difference.X > 180) then
  119. Difference.X = Difference.X - 360
  120. elseif (Difference.X < -180) then
  121. Difference.X = Difference.X + 360
  122. end
  123.  
  124. Difference.Y = Angle2.Y - Angle1.Y
  125.  
  126. if (Difference.Y > 180) then
  127. Difference.Y = Difference.Y - 360
  128. elseif (Difference.Y < -180) then
  129. Difference.Y = Difference.Y + 360
  130. end
  131.  
  132. Difference.Z = Angle2.Z - Angle1.Z
  133.  
  134. if (Difference.Z > 180) then
  135. Difference.Z = Difference.Z - 360
  136. elseif (Difference.Z < -180) then
  137. Difference.Z = Difference.Z + 360
  138. end
  139.  
  140. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  141. end
  142. function makeImage(position, size, image, parent, zindex)
  143. local imglabel = Instance.new("ImageLabel", parent)
  144. imglabel.BorderSizePixel = 0
  145. imglabel.BackgroundTransparency = 1
  146. imglabel.Position = position
  147. imglabel.Size = size
  148. imglabel.Image = image
  149. if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
  150. return imglabel
  151. end
  152. function putToolBarSlot(position, image, zindex)
  153. local playerGui = player:FindFirstChild("PlayerGui")
  154. if playerGui then
  155. local gui = playerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", playerGui)
  156. gui.Name = "ToolBar"
  157. local slot = Instance.new("ImageLabel", gui)
  158. slot.Position = position
  159. slot.Size = UDim2.new(0, 32, 0, 32)
  160. slot.BackgroundTransparency = 1
  161. slot.ImageTransparency = 0
  162. slot.Image = image
  163. slot.ZIndex = 2
  164.  
  165. local imgSlot = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 32, 0, 32),
  166. "rbxassetid://347007448", slot)
  167.  
  168. imgSlot.ImageTransparency = 0.25
  169. imgSlot.BackgroundTransparency = 1
  170. imgSlot.ImageColor3 = Color3.new(0.225, 0.225, 0.225)
  171.  
  172. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 32),
  173. Color3.new(0/255, 0/255, 0/255), 0.7, slot)
  174. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 30, 0, 2),
  175. Color3.new(0/255, 0/255, 0/255), 0.7, slot)
  176. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 36, 0, 2),
  177. Color3.new(106/255, 106/255, 106/255), 0, slot)
  178. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 2, 0, 36),
  179. Color3.new(106/255, 106/255, 106/255), 0, slot)
  180. makeSquare(UDim2.new(0, 0, 0, 32), UDim2.new(0, 34, 0, 2),
  181. Color3.new(130/255, 130/255, 130/255), 0, slot)
  182. makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 34),
  183. Color3.new(130/255, 130/255, 130/255), 0, slot)
  184. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 2, 0, 38),
  185. Color3.new(130/255, 130/255, 130/255), 0, slot)
  186. makeSquare(UDim2.new(0, 34, 0, -2), UDim2.new(0, 2, 0, 36),
  187. Color3.new(106/255, 106/255, 106/255), 0, slot)
  188. makeSquare(UDim2.new(0, -2, 0, 34), UDim2.new(0, 38, 0, 2),
  189. Color3.new(106/255, 106/255, 106/255), 0, slot)
  190. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
  191. Color3.new(156/255, 156/255, 156/255), 0, slot)
  192. return slot
  193. end
  194. end
  195. function divide(x, d)
  196. if x ~= 0 and d ~= 0 then
  197. return x/d
  198. else
  199. return x
  200. end
  201. end -- so it doesn't divide by zero
  202. function getDistance(v1, v2)
  203. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  204. end
  205. function SnapToGrid(x, gridX)
  206. local x = math.floor((x / gridX) + 0.5) * gridX
  207. return x
  208. end
  209.  
  210. function round(x)
  211. if x%2 ~= 0.5 then
  212. return math.floor(x+0.5)
  213. end
  214. return x-0.5
  215. end
  216. function weldTo(part1, part2)
  217. local weld = Instance.new("Weld", part1)
  218. weld.Part0 = part1
  219. weld.Part1 = part2
  220. end
  221. function getMagnitudeXZ(velocity)
  222. return math.abs(velocity.X) + math.abs(velocity.Z)
  223. end
  224. function getBlockAtRegion(region)
  225. local blockFound = nil
  226. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  227. local usePart = true
  228. if part.Name == "Debris" then usePart = false end
  229. if usePart == true then
  230. blockFound = part
  231. break
  232. end
  233. end
  234. return blockFound
  235. end
  236. local RS = game:GetService("RunService").RenderStepped
  237. local creativeInventory = {
  238. {
  239. name = "Dirt",
  240. size = Vector3.new(2.6, 2.6, 2.6),
  241. transparency = 0;
  242. frontTex = "rbxassetid://152569532",
  243. backTex = "rbxassetid://152569532",
  244. topTex = "rbxassetid://152569532",
  245. bottomTex = "rbxassetid://152569532",
  246. leftTex = "rbxassetid://152569532",
  247. rightTex = "rbxassetid://152569532",
  248. displayTex = "",
  249. sound = "rbxassetid://1102186681",
  250. soundVol = 1.25,
  251. hasGravity = false,
  252. objectType = "Block"
  253. },
  254. {
  255. name = "Grass",
  256. size = Vector3.new(2.6, 2.6, 2.6),
  257. transparency = 0;
  258. frontTex = "rbxassetid://96430337",
  259. backTex = "rbxassetid://96430337",
  260. topTex = "rbxassetid://96430265",
  261. bottomTex = "rbxassetid://179655033",
  262. leftTex = "rbxassetid://96430337",
  263. rightTex = "rbxassetid://96430337",
  264. displayTex = "",
  265. sound = "rbxassetid://1102186681",
  266. soundVol = 1.25,
  267. hasGravity = false,
  268. objectType = "Block"
  269. },
  270. {
  271. name = "Sand",
  272. size = Vector3.new(2.6, 2.6, 2.6),
  273. transparency = 0;
  274. frontTex = "rbxassetid://347007448",
  275. backTex = "rbxassetid://347007448",
  276. topTex = "rbxassetid://347007448",
  277. bottomTex = "rbxassetid://347007448",
  278. leftTex = "rbxassetid://347007448",
  279. rightTex = "rbxassetid://347007448",
  280. displayTex = "",
  281. sound = "rbxassetid://1102186681",
  282. soundVol = 1.25,
  283. hasGravity = true,
  284. objectType = "Block"
  285. },
  286. {
  287. name = "Gravel",
  288. size = Vector3.new(2.6, 2.6, 2.6),
  289. transparency = 0;
  290. frontTex = "rbxassetid://151701568",
  291. backTex = "rbxassetid://151701568",
  292. topTex = "rbxassetid://151701568",
  293. bottomTex = "rbxassetid://151701568",
  294. leftTex = "rbxassetid://151701568",
  295. rightTex = "rbxassetid://151701568",
  296. displayTex = "",
  297. sound = "rbxassetid://1102186681",
  298. soundVol = 1.25,
  299. hasGravity = true,
  300. objectType = "Block"
  301. },
  302. {
  303. name = "Stone",
  304. size = Vector3.new(2.6, 2.6, 2.6),
  305. transparency = 0;
  306. frontTex = "rbxassetid://75880927",
  307. backTex = "rbxassetid://75880927",
  308. topTex = "rbxassetid://75880927",
  309. bottomTex = "rbxassetid://75880927",
  310. leftTex = "rbxassetid://75880927",
  311. rightTex = "rbxassetid://75880927",
  312. displayTex = "",
  313. sound = "rbxassetid://1016978163",
  314. soundVol = 2,
  315. hasGravity = false,
  316. objectType = "Block"
  317. },
  318. {
  319. name = "Diamond Ore",
  320. size = Vector3.new(2.6, 2.6, 2.6),
  321. transparency = 0;
  322. frontTex = "rbxassetid://57928490",
  323. backTex = "rbxassetid://57928490",
  324. topTex = "rbxassetid://57928490",
  325. bottomTex = "rbxassetid://57928490",
  326. leftTex = "rbxassetid://57928490",
  327. rightTex = "rbxassetid://57928490",
  328. displayTex = "",
  329. sound = "rbxassetid://1016978163",
  330. soundVol = 2,
  331. hasGravity = false,
  332. objectType = "Block"
  333. },
  334. {
  335. name = "Diamond Block",
  336. size = Vector3.new(2.6, 2.6, 2.6),
  337. transparency = 0;
  338. frontTex = "rbxassetid://56749955",
  339. backTex = "rbxassetid://56749955",
  340. topTex = "rbxassetid://56749955",
  341. bottomTex = "rbxassetid://56749955",
  342. leftTex = "rbxassetid://56749955",
  343. rightTex = "rbxassetid://56749955",
  344. displayTex = "",
  345. sound = "rbxassetid://1016978163",
  346. soundVol = 2,
  347. hasGravity = false,
  348. objectType = "Block"
  349. },
  350. {
  351. name = "Emerald Block",
  352. size = Vector3.new(2.6, 2.6, 2.6),
  353. transparency = 0;
  354. frontTex = "rbxassetid://152410853",
  355. backTex = "rbxassetid://152410853",
  356. topTex = "rbxassetid://152410853",
  357. bottomTex = "rbxassetid://152410853",
  358. leftTex = "rbxassetid://152410853",
  359. rightTex = "rbxassetid://152410853",
  360. displayTex = "",
  361. sound = "rbxassetid://1016978163",
  362. soundVol = 2,
  363. hasGravity = false,
  364. objectType = "Block"
  365. },
  366. {
  367. name = "Emerald Ore",
  368. size = Vector3.new(2.6, 2.6, 2.6),
  369. transparency = 0;
  370. frontTex = "rbxassetid://152410868",
  371. backTex = "rbxassetid://152410868",
  372. topTex = "rbxassetid://152410868",
  373. bottomTex = "rbxassetid://152410868",
  374. leftTex = "rbxassetid://152410868",
  375. rightTex = "rbxassetid://152410868",
  376. displayTex = "",
  377. sound = "rbxassetid://1016978163",
  378. soundVol = 2,
  379. hasGravity = false,
  380. objectType = "Block"
  381. },
  382. {
  383. name = "Obsidian",
  384. size = Vector3.new(2.6, 2.6, 2.6),
  385. transparency = 0;
  386. frontTex = "rbxassetid://112560322",
  387. backTex = "rbxassetid://112560322",
  388. topTex = "rbxassetid://112560322",
  389. bottomTex = "rbxassetid://112560322",
  390. leftTex = "rbxassetid://112560322",
  391. rightTex = "rbxassetid://112560322",
  392. displayTex = "",
  393. sound = "rbxassetid://1016978163",
  394. soundVol = 2,
  395. hasGravity = false,
  396. objectType = "Block"
  397. },
  398. {
  399. name = "Gold Block",
  400. size = Vector3.new(2.6, 2.6, 2.6),
  401. transparency = 0;
  402. frontTex = "rbxassetid://152572128",
  403. backTex = "rbxassetid://152572128",
  404. topTex = "rbxassetid://152572128",
  405. bottomTex = "rbxassetid://152572128",
  406. leftTex = "rbxassetid://152572128",
  407. rightTex = "rbxassetid://152572128",
  408. displayTex = "",
  409. sound = "rbxassetid://1016978163",
  410. soundVol = 2,
  411. hasGravity = false,
  412. objectType = "Block"
  413. },
  414. {
  415. name = "Gold Ore",
  416. size = Vector3.new(2.6, 2.6, 2.6),
  417. transparency = 0;
  418. frontTex = "rbxassetid://152572121",
  419. backTex = "rbxassetid://152572121",
  420. topTex = "rbxassetid://152572121",
  421. bottomTex = "rbxassetid://152572121",
  422. leftTex = "rbxassetid://152572121",
  423. rightTex = "rbxassetid://152572121",
  424. displayTex = "",
  425. sound = "rbxassetid://1016978163",
  426. soundVol = 2,
  427. hasGravity = false,
  428. objectType = "Block"
  429. },
  430. {
  431. name = "Iron Block",
  432. size = Vector3.new(2.6, 2.6, 2.6),
  433. transparency = 0;
  434. frontTex = "rbxassetid://152572134",
  435. backTex = "rbxassetid://152572134",
  436. topTex = "rbxassetid://152572134",
  437. bottomTex = "rbxassetid://152572134",
  438. leftTex = "rbxassetid://152572134",
  439. rightTex = "rbxassetid://152572134",
  440. displayTex = "",
  441. sound = "rbxassetid://1016978163",
  442. soundVol = 2,
  443. hasGravity = false,
  444. objectType = "Block"
  445. },
  446. {
  447. name = "Iron Ore",
  448. size = Vector3.new(2.6, 2.6, 2.6),
  449. transparency = 0;
  450. frontTex = "rbxassetid://132879562",
  451. backTex = "rbxassetid://132879562",
  452. topTex = "rbxassetid://132879562",
  453. bottomTex = "rbxassetid://132879562",
  454. leftTex = "rbxassetid://132879562",
  455. rightTex = "rbxassetid://132879562",
  456. displayTex = "",
  457. sound = "rbxassetid://1016978163",
  458. soundVol = 2,
  459. hasGravity = false,
  460. objectType = "Block"
  461. },
  462. {
  463. name = "Redstone Block",
  464. size = Vector3.new(2.6, 2.6, 2.6),
  465. transparency = 0;
  466. frontTex = "rbxassetid://136260219",
  467. backTex = "rbxassetid://136260219",
  468. topTex = "rbxassetid://136260219",
  469. bottomTex = "rbxassetid://136260219",
  470. leftTex = "rbxassetid://136260219",
  471. rightTex = "rbxassetid://136260219",
  472. sound = "rbxassetid://1016978163",
  473. soundVol = 2,
  474. hasGravity = false,
  475. objectType = "Block"
  476. },
  477. {
  478. name = "TNT",
  479. size = Vector3.new(2.6, 2.6, 2.6),
  480. transparency = 0;
  481. frontTex = "rbxassetid://48005067",
  482. backTex = "rbxassetid://48005067",
  483. topTex = "rbxassetid://48005073",
  484. bottomTex = "rbxassetid://48005064",
  485. leftTex = "rbxassetid://48005067",
  486. rightTex = "rbxassetid://48005067",
  487. displayTex = "",
  488. sound = "rbxassetid://1102186681",
  489. soundVol = 2,
  490. hasGravity = false,
  491. isExplosive = true,
  492. objectType = "Block"
  493. },
  494. {
  495. name = "Coal Block",
  496. size = Vector3.new(2.6, 2.6, 2.6),
  497. transparency = 0;
  498. frontTex = "rbxassetid://152527418",
  499. backTex = "rbxassetid://152527418",
  500. topTex = "rbxassetid://152527418",
  501. bottomTex = "rbxassetid://152527418",
  502. leftTex = "rbxassetid://152527418",
  503. rightTex = "rbxassetid://152527418",
  504. displayTex = "",
  505. sound = "rbxassetid://1016978163",
  506. soundVol = 2,
  507. hasGravity = false,
  508. objectType = "Block"
  509. },
  510. {
  511. name = "Coal Ore",
  512. size = Vector3.new(2.6, 2.6, 2.6),
  513. transparency = 0;
  514. frontTex = "rbxassetid://152572101",
  515. backTex = "rbxassetid://152572101",
  516. topTex = "rbxassetid://152572101",
  517. bottomTex = "rbxassetid://152572101",
  518. leftTex = "rbxassetid://152572101",
  519. rightTex = "rbxassetid://152572101",
  520. displayTex = "",
  521. sound = "rbxassetid://1016978163",
  522. soundVol = 2,
  523. hasGravity = false,
  524. objectType = "Block"
  525. },
  526. {
  527. name = "Bedrock",
  528. size = Vector3.new(2.6, 2.6, 2.6),
  529. transparency = 0;
  530. frontTex = "rbxassetid://75881126",
  531. backTex = "rbxassetid://75881126",
  532. topTex = "rbxassetid://75881126",
  533. bottomTex = "rbxassetid://75881126",
  534. leftTex = "rbxassetid://75881126",
  535. rightTex = "rbxassetid://75881126",
  536. displayTex = "",
  537. sound = "rbxassetid://1016978163",
  538. soundVol = 2,
  539. hasGravity = false,
  540. objectType = "Block"
  541. },
  542. {
  543. name = "Cobblestone",
  544. size = Vector3.new(2.6, 2.6, 2.6),
  545. transparency = 0;
  546. frontTex = "rbxassetid://152572105",
  547. backTex = "rbxassetid://152572105",
  548. topTex = "rbxassetid://152572105",
  549. bottomTex = "rbxassetid://152572105",
  550. leftTex = "rbxassetid://152572105",
  551. rightTex = "rbxassetid://152572105",
  552. displayTex = "",
  553. sound = "rbxassetid://1016978163",
  554. soundVol = 2,
  555. hasGravity = false,
  556. objectType = "Block"
  557. },
  558. {
  559. name = "Mossy Stone Brick",
  560. size = Vector3.new(2.6, 2.6, 2.6),
  561. transparency = 0;
  562. frontTex = "rbxassetid://61826751",
  563. backTex = "rbxassetid://61826751",
  564. topTex = "rbxassetid://61826751",
  565. bottomTex = "rbxassetid://61826751",
  566. leftTex = "rbxassetid://61826751",
  567. rightTex = "rbxassetid://61826751",
  568. displayTex = "",
  569. sound = "rbxassetid://1016978163",
  570. soundVol = 2,
  571. hasGravity = false,
  572. objectType = "Block"
  573. },
  574. {
  575. name = "Cracked Stone Brick",
  576. size = Vector3.new(2.6, 2.6, 2.6),
  577. transparency = 0;
  578. frontTex = "rbxassetid://151802087",
  579. backTex = "rbxassetid://151802087",
  580. topTex = "rbxassetid://151802087",
  581. bottomTex = "rbxassetid://151802087",
  582. leftTex = "rbxassetid://151802087",
  583. rightTex = "rbxassetid://151802087",
  584. displayTex = "",
  585. sound = "rbxassetid://1016978163",
  586. soundVol = 2,
  587. hasGravity = false,
  588. objectType = "Block"
  589. },
  590. {
  591. name = "Chiseled Stone Brick",
  592. size = Vector3.new(2.6, 2.6, 2.6),
  593. transparency = 0;
  594. frontTex = "rbxassetid://151802074",
  595. backTex = "rbxassetid://151802074",
  596. topTex = "rbxassetid://151802074",
  597. bottomTex = "rbxassetid://151802074",
  598. leftTex = "rbxassetid://151802074",
  599. rightTex = "rbxassetid://151802074",
  600. displayTex = "",
  601. sound = "rbxassetid://1016978163",
  602. soundVol = 2,
  603. hasGravity = false,
  604. objectType = "Block"
  605. },
  606. {
  607. name = "Stone Brick",
  608. size = Vector3.new(2.6, 2.6, 2.6),
  609. transparency = 0;
  610. frontTex = "rbxassetid://61826773",
  611. backTex = "rbxassetid://61826773",
  612. topTex = "rbxassetid://61826773",
  613. bottomTex = "rbxassetid://61826773",
  614. leftTex = "rbxassetid://61826773",
  615. rightTex = "rbxassetid://61826773",
  616. displayTex = "",
  617. sound = "rbxassetid://1016978163",
  618. soundVol = 2,
  619. hasGravity = false,
  620. objectType = "Block"
  621. },
  622. {
  623. name = "Nether Brick",
  624. size = Vector3.new(2.6, 2.6, 2.6),
  625. transparency = 0;
  626. frontTex = "rbxassetid://151802104",
  627. backTex = "rbxassetid://151802104",
  628. topTex = "rbxassetid://151802104",
  629. bottomTex = "rbxassetid://151802104",
  630. leftTex = "rbxassetid://151802104",
  631. rightTex = "rbxassetid://151802104",
  632. displayTex = "",
  633. sound = "rbxassetid://1016978163",
  634. soundVol = 2,
  635. hasGravity = false,
  636. objectType = "Block"
  637. },
  638. {
  639. name = "Granite",
  640. size = Vector3.new(2.6, 2.6, 2.6),
  641. transparency = 0;
  642. frontTex = "rbxassetid://151776467",
  643. backTex = "rbxassetid://151776467",
  644. topTex = "rbxassetid://151776467",
  645. bottomTex = "rbxassetid://151776467",
  646. leftTex = "rbxassetid://151776467",
  647. rightTex = "rbxassetid://151776467",
  648. displayTex = "",
  649. sound = "rbxassetid://1016978163",
  650. soundVol = 2,
  651. hasGravity = false,
  652. objectType = "Block"
  653. },
  654. {
  655. name = "Diorite",
  656. size = Vector3.new(2.6, 2.6, 2.6),
  657. transparency = 0;
  658. frontTex = "rbxassetid://151776452",
  659. backTex = "rbxassetid://151776452",
  660. topTex = "rbxassetid://151776452",
  661. bottomTex = "rbxassetid://151776452",
  662. leftTex = "rbxassetid://151776452",
  663. rightTex = "rbxassetid://151776452",
  664. sound = "rbxassetid://1016978163",
  665. soundVol = 2,
  666. hasGravity = false,
  667. objectType = "Block"
  668. },
  669. {
  670. name = "Andesite",
  671. size = Vector3.new(2.6, 2.6, 2.6),
  672. transparency = 0;
  673. frontTex = "rbxassetid://151776422",
  674. backTex = "rbxassetid://151776422",
  675. topTex = "rbxassetid://151776422",
  676. bottomTex = "rbxassetid://151776422",
  677. leftTex = "rbxassetid://151776422",
  678. rightTex = "rbxassetid://151776422",
  679. displayTex = "",
  680. sound = "rbxassetid://1016978163",
  681. soundVol = 2,
  682. hasGravity = false,
  683. objectType = "Block"
  684. },
  685. {
  686. name = "Polished Granite",
  687. size = Vector3.new(2.6, 2.6, 2.6),
  688. transparency = 0;
  689. frontTex = "rbxassetid://151776506",
  690. backTex = "rbxassetid://151776506",
  691. topTex = "rbxassetid://151776506",
  692. bottomTex = "rbxassetid://151776506",
  693. leftTex = "rbxassetid://151776506",
  694. rightTex = "rbxassetid://151776506",
  695. displayTex = "",
  696. sound = "rbxassetid://1016978163",
  697. soundVol = 2,
  698. hasGravity = false,
  699. objectType = "Block"
  700. },
  701. {
  702. name = "Polished Diorite",
  703. size = Vector3.new(2.6, 2.6, 2.6),
  704. transparency = 0;
  705. frontTex = "rbxassetid://151776533",
  706. backTex = "rbxassetid://151776533",
  707. topTex = "rbxassetid://151776533",
  708. bottomTex = "rbxassetid://151776533",
  709. leftTex = "rbxassetid://151776533",
  710. rightTex = "rbxassetid://151776533",
  711. displayTex = "",
  712. sound = "rbxassetid://1016978163",
  713. soundVol = 2,
  714. hasGravity = false,
  715. objectType = "Block"
  716. },
  717. {
  718. name = "Polished Andesite",
  719. size = Vector3.new(2.6, 2.6, 2.6),
  720. transparency = 0;
  721. frontTex = "rbxassetid://151776506",
  722. backTex = "rbxassetid://151776506",
  723. topTex = "rbxassetid://151776506",
  724. bottomTex = "rbxassetid://151776506",
  725. leftTex = "rbxassetid://151776506",
  726. rightTex = "rbxassetid://151776506",
  727. displayTex = "",
  728. sound = "rbxassetid://1016978163",
  729. soundVol = 2,
  730. hasGravity = false,
  731. objectType = "Block"
  732. },
  733. {
  734. name = "Brick Block",
  735. size = Vector3.new(2.6, 2.6, 2.6),
  736. transparency = 0;
  737. frontTex = "rbxassetid://59389191",
  738. backTex = "rbxassetid://59389191",
  739. topTex = "rbxassetid://59389191",
  740. bottomTex = "rbxassetid://59389191",
  741. leftTex = "rbxassetid://59389191",
  742. rightTex = "rbxassetid://59389191",
  743. displayTex = "",
  744. sound = "rbxassetid://1016978163",
  745. soundVol = 2,
  746. hasGravity = false,
  747. objectType = "Block"
  748. },
  749. {
  750. name = "Packed Ice",
  751. size = Vector3.new(2.6, 2.6, 2.6),
  752. transparency = 0;
  753. frontTex = "rbxassetid://152528023",
  754. backTex = "rbxassetid://152528023",
  755. topTex = "rbxassetid://152528023",
  756. bottomTex = "rbxassetid://152528023",
  757. leftTex = "rbxassetid://152528023",
  758. rightTex = "rbxassetid://152528023",
  759. displayTex = "",
  760. sound = "rbxassetid://1016978163",
  761. soundVol = 2,
  762. hasGravity = false,
  763. objectType = "Block"
  764. },
  765. {
  766. name = "Ice Block",
  767. size = Vector3.new(2.6, 2.6, 2.6),
  768. transparency = 1;
  769. frontTex = "rbxassetid://118555586",
  770. backTex = "rbxassetid://118555586",
  771. topTex = "rbxassetid://118555586",
  772. bottomTex = "rbxassetid://118555586",
  773. leftTex = "rbxassetid://118555586",
  774. rightTex = "rbxassetid://118555586",
  775. displayTex = "",
  776. sound = "rbxassetid://1016978163",
  777. soundVol = 2,
  778. hasGravity = false,
  779. objectType = "Block"
  780. },
  781. {
  782. name = "Netherrack",
  783. size = Vector3.new(2.6, 2.6, 2.6),
  784. transparency = 0;
  785. frontTex = "rbxassetid://151802119",
  786. backTex = "rbxassetid://151802119",
  787. topTex = "rbxassetid://151802119",
  788. bottomTex = "rbxassetid://151802119",
  789. leftTex = "rbxassetid://151802119",
  790. rightTex = "rbxassetid://151802119",
  791. displayTex = "",
  792. sound = "rbxassetid://1016978163",
  793. soundVol = 2,
  794. hasGravity = false,
  795. objectType = "Block"
  796. },
  797. {
  798. name = "End Stone",
  799. size = Vector3.new(2.6, 2.6, 2.6),
  800. transparency = 0;
  801. frontTex = "rbxassetid://151802091",
  802. backTex = "rbxassetid://151802091",
  803. topTex = "rbxassetid://151802091",
  804. bottomTex = "rbxassetid://151802091",
  805. leftTex = "rbxassetid://151802091",
  806. rightTex = "rbxassetid://151802091",
  807. displayTex = "",
  808. sound = "rbxassetid://1016978163",
  809. soundVol = 2,
  810. hasGravity = false,
  811. objectType = "Block"
  812. },
  813. {
  814. name = "Glass Block",
  815. size = Vector3.new(2.6, 2.6, 2.6),
  816. transparency = 1;
  817. frontTex = "rbxassetid://152239003",
  818. backTex = "rbxassetid://152239003",
  819. topTex = "rbxassetid://152239003",
  820. bottomTex = "rbxassetid://152239003",
  821. leftTex = "rbxassetid://152239003",
  822. rightTex = "rbxassetid://152239003",
  823. displayTex = "",
  824. sound = "rbxassetid://1016978163",
  825. soundVol = 2,
  826. hasGravity = false,
  827. objectType = "Block"
  828. },
  829. {
  830. name = "Glowstone",
  831. size = Vector3.new(2.6, 2.6, 2.6),
  832. transparency = 0;
  833. frontTex = "rbxassetid://54790811",
  834. backTex = "rbxassetid://54790811",
  835. topTex = "rbxassetid://54790811",
  836. bottomTex = "rbxassetid://54790811",
  837. leftTex = "rbxassetid://54790811",
  838. rightTex = "rbxassetid://54790811",
  839. displayTex = "",
  840. sound = "rbxassetid://1016978163",
  841. soundVol = 2,
  842. hasGravity = false,
  843. objectType = "Block"
  844. },
  845. {
  846. name = "Bookshelf",
  847. size = Vector3.new(2.6, 2.6, 2.6),
  848. transparency = 0;
  849. frontTex = "rbxassetid://118554092",
  850. backTex = "rbxassetid://118554092",
  851. topTex = "rbxassetid://346201871",
  852. bottomTex = "rbxassetid://346201871",
  853. leftTex = "rbxassetid://118554092",
  854. rightTex = "rbxassetid://118554092",
  855. displayTex = "",
  856. sound = "rbxassetid://507863457",
  857. soundVol = 2,
  858. hasGravity = false,
  859. objectType = "Block"
  860. },
  861. {
  862. name = "Oak Wood Planks",
  863. size = Vector3.new(2.6, 2.6, 2.6),
  864. transparency = 0;
  865. frontTex = "rbxassetid://346201871",
  866. backTex = "rbxassetid://346201871",
  867. topTex = "rbxassetid://346201871",
  868. bottomTex = "rbxassetid://346201871",
  869. leftTex = "rbxassetid://346201871",
  870. rightTex = "rbxassetid://346201871",
  871. displayTex = "",
  872. sound = "rbxassetid://507863457",
  873. soundVol = 2,
  874. hasGravity = false,
  875. objectType = "Block"
  876. },
  877. {
  878. name = "Oak Log",
  879. size = Vector3.new(2.6, 2.6, 2.6),
  880. transparency = 0;
  881. frontTex = "rbxassetid://71445924",
  882. backTex = "rbxassetid://71445924",
  883. topTex = "rbxassetid://152538557",
  884. bottomTex = "rbxassetid://152538557",
  885. leftTex = "rbxassetid://71445924",
  886. rightTex = "rbxassetid://71445924",
  887. displayTex = "",
  888. sound = "rbxassetid://507863457",
  889. soundVol = 2,
  890. hasGravity = false,
  891. objectType = "Block"
  892. },
  893. {
  894. name = "Oak Leaves",
  895. size = Vector3.new(2.6, 2.6, 2.6),
  896. transparency = 1;
  897. frontTex = "rbxassetid://151708391",
  898. backTex = "rbxassetid://151708391",
  899. topTex = "rbxassetid://151708391",
  900. bottomTex = "rbxassetid://151708391",
  901. leftTex = "rbxassetid://151708391",
  902. rightTex = "rbxassetid://151708391",
  903. displayTex = "",
  904. sound = "rbxassetid://507863457",
  905. -- couldn't find a leaves sound for this one, sorry lol
  906. soundVol = 2,
  907. hasGravity = false,
  908. objectType = "Block"
  909. }
  910. }
  911. local toolBar = {
  912. {
  913. name = "Dirt Block",
  914. size = Vector3.new(2.6, 2.6, 2.6),
  915. transparency = 0;
  916. frontTex = "rbxassetid://152569532",
  917. backTex = "rbxassetid://152569532",
  918. topTex = "rbxassetid://152569532",
  919. bottomTex = "rbxassetid://152569532",
  920. leftTex = "rbxassetid://152569532",
  921. rightTex = "rbxassetid://152569532",
  922. displayTex = "",
  923. sound = "rbxassetid://1102186681",
  924. soundVol = 1.25,
  925. hasGravity = false,
  926. objectType = "Block"
  927. },
  928. {
  929. name = "Grass Block",
  930. size = Vector3.new(2.6, 2.6, 2.6),
  931. transparency = 0;
  932. frontTex = "rbxassetid://96430337",
  933. backTex = "rbxassetid://96430337",
  934. topTex = "rbxassetid://96430265",
  935. bottomTex = "rbxassetid://179655033",
  936. leftTex = "rbxassetid://96430337",
  937. rightTex = "rbxassetid://96430337",
  938. displayTex = "",
  939. sound = "rbxassetid://1102186681",
  940. soundVol = 1.25,
  941. hasGravity = false,
  942. objectType = "Block"
  943. },
  944. {
  945. name = "Stone",
  946. size = Vector3.new(2.6, 2.6, 2.6),
  947. transparency = 0;
  948. frontTex = "rbxassetid://75880927",
  949. backTex = "rbxassetid://75880927",
  950. topTex = "rbxassetid://75880927",
  951. bottomTex = "rbxassetid://75880927",
  952. leftTex = "rbxassetid://75880927",
  953. rightTex = "rbxassetid://75880927",
  954. displayTex = "",
  955. sound = "rbxassetid://1016978163",
  956. soundVol = 2,
  957. hasGravity = false,
  958. objectType = "Block"
  959. },
  960. {
  961. name = "Diamond Ore",
  962. size = Vector3.new(2.6, 2.6, 2.6),
  963. transparency = 0;
  964. frontTex = "rbxassetid://152572119",
  965. backTex = "rbxassetid://152572119",
  966. topTex = "rbxassetid://152572119",
  967. bottomTex = "rbxassetid://152572119",
  968. leftTex = "rbxassetid://152572119",
  969. rightTex = "rbxassetid://152572119",
  970. displayTex = "",
  971. sound = "rbxassetid://1016978163",
  972. soundVol = 2,
  973. hasGravity = false,
  974. objectType = "Block"
  975. },
  976. {
  977. name = "Diamond Block",
  978. size = Vector3.new(2.6, 2.6, 2.6),
  979. transparency = 0;
  980. frontTex = "rbxassetid://56749955",
  981. backTex = "rbxassetid://56749955",
  982. topTex = "rbxassetid://56749955",
  983. bottomTex = "rbxassetid://56749955",
  984. leftTex = "rbxassetid://56749955",
  985. rightTex = "rbxassetid://56749955",
  986. displayTex = "",
  987. sound = "rbxassetid://1016978163",
  988. soundVol = 2,
  989. hasGravity = false,
  990. objectType = "Block"
  991. },
  992. {
  993. name = "Oak Wood Planks",
  994. size = Vector3.new(2.6, 2.6, 2.6),
  995. transparency = 0;
  996. frontTex = "rbxassetid://346201871",
  997. backTex = "rbxassetid://346201871",
  998. topTex = "rbxassetid://346201871",
  999. bottomTex = "rbxassetid://346201871",
  1000. leftTex = "rbxassetid://346201871",
  1001. rightTex = "rbxassetid://346201871",
  1002. displayTex = "",
  1003. sound = "rbxassetid://507863457",
  1004. soundVol = 2,
  1005. hasGravity = false,
  1006. objectType = "Block"
  1007. },
  1008. {
  1009. name = "Oak Log",
  1010. size = Vector3.new(2.6, 2.6, 2.6),
  1011. transparency = 0;
  1012. frontTex = "rbxassetid://71445924",
  1013. backTex = "rbxassetid://71445924",
  1014. topTex = "rbxassetid://152538557",
  1015. bottomTex = "rbxassetid://152538557",
  1016. leftTex = "rbxassetid://71445924",
  1017. rightTex = "rbxassetid://71445924",
  1018. displayTex = "",
  1019. sound = "rbxassetid://507863457",
  1020. soundVol = 2,
  1021. hasGravity = false,
  1022. objectType = "Block"
  1023. }
  1024. --[[{
  1025. name = "Redstone",
  1026. size = Vector3.new(2.6, 0.05, 2.6),
  1027. transparency = 1;
  1028. frontTex = "rbxassetid://151911305",
  1029. backTex = "",
  1030. topTex = "rbxassetid://151911305",
  1031. bottomTex = "",
  1032. leftTex = "",
  1033. rightTex = "",
  1034. displayTex = "rbxassetid://64124418",
  1035. sound = "rbxassetid://1016978163",
  1036. soundVol = 2,
  1037. hasGravity = false,
  1038. objectType = "Redstone Dust"
  1039. },]]
  1040. }
  1041. function putInventorySlot(position, image, parent, zindex)
  1042. local button = Instance.new("TextButton", parent)
  1043. button.Position = position
  1044. button.Size = UDim2.new(0, 36, 0, 36)
  1045. button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
  1046. button.Text = ""
  1047. button.BorderSizePixel = 0
  1048. button.ZIndex = zindex
  1049. local imageLabel = Instance.new("ImageLabel", button)
  1050. imageLabel.BackgroundTransparency = 0.9
  1051. imageLabel.Position = UDim2.new(0, 2, 0, 2)
  1052. imageLabel.Size = UDim2.new(0, 32, 0, 32)
  1053. imageLabel.Image = image
  1054. imageLabel.BorderSizePixel = 0
  1055. imageLabel.ZIndex = zindex
  1056. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
  1057. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  1058. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
  1059. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  1060. makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
  1061. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  1062. makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
  1063. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  1064. return button
  1065. end
  1066. if player and player.Character.Humanoid.Health ~= 0 then
  1067. for i,v in pairs(game.Players:GetChildren()) do
  1068. coroutine.resume(coroutine.create(function()
  1069. local sc = Instance.new("ScreenGui",v.PlayerGui)
  1070. local frame = Instance.new("Frame",sc)
  1071. frame.Position = UDim2.new(0,0,0.796,0)
  1072. frame.Size = UDim2.new(0,518,0,112)
  1073. frame.BackgroundTransparency = 1
  1074. local textLabel = Instance.new("TextLabel",frame)
  1075. textLabel.Text = player.Name.." has joined the game."
  1076. textLabel.TextSize = 24
  1077. textLabel.Font = "Arcade"
  1078. textLabel.Size = UDim2.new(1,0,1,0)
  1079. textLabel.Position = UDim2.new(0,1,0,1)
  1080. textLabel.BackgroundTransparency = 0.5
  1081. textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  1082. textLabel.TextColor3 = Color3.new(255, 255, 0)
  1083. wait(5)
  1084. textLabel.Visible = false
  1085. end))
  1086. end
  1087. local char = player.Character
  1088. char:WaitForChild("Body Colors").HeadColor = BrickColor.new("Toothpaste")
  1089. char:WaitForChild("Body Colors").TorsoColor = BrickColor.new("Toothpaste")
  1090. char:WaitForChild("Body Colors").LeftArmColor = BrickColor.new("Toothpaste")
  1091. char:WaitForChild("Body Colors").RightArmColor = BrickColor.new("Toothpaste")
  1092. char:WaitForChild("Body Colors").LeftLegColor = BrickColor.new("Toothpaste")
  1093. char:WaitForChild("Body Colors").RightLegColor = BrickColor.new("Toothpaste")
  1094. coroutine.resume(coroutine.create(function()
  1095. for i,v in pairs(char:GetChildren()) do
  1096. if v.ClassName == "Shirt" then
  1097. v:remove()
  1098. v.Parent = nil
  1099. v:Destroy()
  1100. end
  1101. end
  1102. for i,v in pairs(char:GetChildren()) do
  1103. if v.ClassName == "Pants" then
  1104. v:remove()
  1105. v.Parent = nil
  1106. v:Destroy()
  1107. end
  1108. end
  1109. end))
  1110. damage = 10
  1111. local diedtofalldamage = false
  1112. local damageHeight = 10.4 -- The height at which the player will start getting damaged at
  1113. local lethalHeight = 59.8 -- The height at which the player will get killed
  1114.  
  1115. local root = char:WaitForChild("HumanoidRootPart")
  1116. local humanoid = char:WaitForChild("Humanoid")
  1117. Gravity = -2
  1118. humanoid.JumpPower = 25.11
  1119. BodyForce = Instance.new("BodyForce")
  1120. BodyForce.force = Vector3.new(0, (1-Gravity) * root:GetMass() * 236 / 1.2, 0)
  1121. BodyForce:clone().Parent = root
  1122.  
  1123. if humanoid and root then
  1124.  
  1125. local headHeight
  1126. humanoid.FreeFalling:Connect(function (state)
  1127. if state then
  1128. headHeight = root.Position.Y
  1129. elseif not state and headHeight ~= nil then
  1130. pcall(function ()
  1131.  
  1132. local fell = headHeight - root.Position.Y
  1133.  
  1134. if fell >= lethalHeight then
  1135. humanoid.Health = 0
  1136. diedtofalldamage = true
  1137. wait()
  1138. for i,v in pairs(game.Players:GetChildren()) do
  1139. if v.PlayerGui:FindFirstChild("TextLabel").Text == player.Name.. "Died" then
  1140. v:FindFirstChild("TextLabel").Text = player.Name.. "fell from a high place"
  1141. end
  1142. end
  1143. elseif fell >= damageHeight then
  1144. humanoid.Health = humanoid.Health - math.floor(fell)
  1145. end
  1146. end)
  1147. end
  1148. end)
  1149. end
  1150. minecrafttheme = Instance.new("Sound",char)
  1151. minecrafttheme.SoundId = "rbxassetid://4611987152"
  1152. minecrafttheme.Volume = 0.5
  1153. --minecrafttheme:Play()
  1154. minecrafttheme.Looped = true
  1155. minecrafttheme:Play()
  1156. Step1 = Instance.new("Sound",char.HumanoidRootPart)
  1157. Step1.SoundId = "rbxassetid://507863105"
  1158. Step1.Volume = 1
  1159. Step1.PlaybackSpeed = 1
  1160. Step2 = Instance.new("Sound",char.HumanoidRootPart)
  1161. Step2.SoundId = "rbxassetid://507863105"
  1162. Step2.Volume = 1
  1163. Step2.PlaybackSpeed = 1
  1164. char:FindFirstChildOfClass("Humanoid").DisplayDistanceType = "None"
  1165.  
  1166. if char then
  1167. local d = char:GetChildren()
  1168. for i=1, #d do
  1169. if (d[i].className == "Accessory") then
  1170. d[i]:remove()
  1171. end
  1172. if (d[i].className == "Hat") then
  1173. d[i]:remove()
  1174. end
  1175. end
  1176.  
  1177. local draggingBlock = nil
  1178. function makeInventory()
  1179. local playerGui = player:FindFirstChild("PlayerGui")
  1180. if playerGui then
  1181. local invGui = Instance.new("ScreenGui", playerGui)
  1182. local creativeInv = Instance.new("Frame", invGui)
  1183. creativeInv.BackgroundTransparency = 1
  1184. creativeInv.Position = UDim2.new(0.5, -170, 0.5, -202)
  1185.  
  1186. creativeInv.Visible = false
  1187.  
  1188. -- creative inventory GUI...
  1189.  
  1190. local blackOut = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0),
  1191. Color3.new(0/255, 0/255, 0/255), 0.3, invGui, 1)
  1192. blackOut.Visible = false
  1193.  
  1194. creativeInv.Changed:connect(function()
  1195. blackOut.Visible = creativeInv.Visible
  1196. end)
  1197.  
  1198. local changeLog = Instance.new("TextLabel", invGui)
  1199. changeLog.Text = Changelog
  1200. changeLog.Font = "SourceSans"
  1201. changeLog.FontSize = Enum.FontSize.Size12
  1202. changeLog.Size = UDim2.new(0, changeLog.TextBounds.X, 0, changeLog.TextBounds.Y + 2)
  1203. changeLog.BackgroundColor3 = Color3.new(0, 0, 0)
  1204. changeLog.BorderSizePixel = 0
  1205. changeLog.BackgroundTransparency = 0.5
  1206. changeLog.Position = UDim2.new(0.5, -changeLog.Size.X.Offset/2, 0.5, -changeLog.Size.Y.Offset/2)
  1207. changeLog.TextColor3 = Color3.new(1, 1, 1)
  1208. changeLog.TextXAlignment = "Left"
  1209. changeLog.TextYAlignment = "Top"
  1210.  
  1211. local coolButton = Instance.new("TextButton", changeLog)
  1212. coolButton.Position = UDim2.new(1, -17, 0, 1)
  1213. coolButton.Size = UDim2.new(0, 16, 0, 12)
  1214. coolButton.Text = "X"
  1215. coolButton.Font = "SourceSans"
  1216. coolButton.FontSize = Enum.FontSize.Size12
  1217. coolButton.BorderSizePixel = 0
  1218. coolButton.BackgroundColor3 = Color3.new(1, 0, 0)
  1219. coolButton.BackgroundTransparency = 0.2
  1220. coolButton.TextColor3 = Color3.new(1, 1, 1)
  1221. coolButton.TextStrokeTransparency = 0.5
  1222. coolButton.ZIndex = 2
  1223.  
  1224. local line = makeSquare(UDim2.new(0, 0, 1, -14), UDim2.new(1, 0, 0, 14),
  1225. Color3.new(0, 0, 0), 0.75, changeLog, 2)
  1226.  
  1227. local line2 = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 0, 14),
  1228. Color3.new(1, 1, 1), 0.9, changeLog, 1)
  1229.  
  1230. line2.Text = "Change Log"
  1231. line2.TextColor3 = Color3.new(1, 1, 1)
  1232. line2.TextStrokeTransparency = 0.75
  1233. line2.Font = "SourceSans"
  1234. line2.FontSize = Enum.FontSize.Size12
  1235.  
  1236. line.Text = "Made by Depr1 (Hes the original creator)"
  1237. line.TextColor3 = Color3.new(1, 0.65, 0)
  1238. line.TextStrokeTransparency = 0.5
  1239. line.Font = "SourceSans"
  1240. line.FontSize = Enum.FontSize.Size14
  1241. line.TextXAlignment = "Left"
  1242.  
  1243. coolButton.MouseButton1Click:connect(function()
  1244. changeLog.Visible = false
  1245. end)
  1246.  
  1247. makeSquare(UDim2.new(0, -2, 0, 2), UDim2.new(0, 340, 0, 404),
  1248. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  1249. makeSquare(UDim2.new(0, 338, 0, 0), UDim2.new(0, 6, 0, 406),
  1250. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 2)
  1251. makeSquare(UDim2.new(0, 0, 0, 404), UDim2.new(0, 342, 0, 4),
  1252. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 3)
  1253. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 338, 0, 402),
  1254. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  1255. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 4, 0, 406),
  1256. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 3)
  1257. makeSquare(UDim2.new(0, -2, 0, -4), UDim2.new(0, 342, 0, 6),
  1258. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 2)
  1259. makeSquare(UDim2.new(0, 340, 0, -2), UDim2.new(0, 2, 0, 2),
  1260. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 2)
  1261. makeSquare(UDim2.new(0, 340, 0, -4), UDim2.new(0, 2, 0, 4),
  1262. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1263. makeSquare(UDim2.new(0, 342, 0, -2), UDim2.new(0, 2, 0, 2),
  1264. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1265. makeSquare(UDim2.new(0, 344, 0, 0), UDim2.new(0, 2, 0, 406),
  1266. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1267. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 4),
  1268. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1269. makeSquare(UDim2.new(0, -2, 0, -6), UDim2.new(0, 342, 0, 4),
  1270. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1271. makeSquare(UDim2.new(0, 0, 0, 406), UDim2.new(0, 342, 0, 4),
  1272. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1273. makeSquare(UDim2.new(0, 342, 0, 404), UDim2.new(0, 2, 0, 4),
  1274. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1275. makeSquare(UDim2.new(0, -4, 0, 404), UDim2.new(0, 2, 0, 2),
  1276. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1277. makeSquare(UDim2.new(0, -2, 0, 406), UDim2.new(0, 2, 0, 2),
  1278. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1279. makeSquare(UDim2.new(0, -6, 0, -2), UDim2.new(0, 2, 0, 406),
  1280. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  1281. 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)
  1282. text.Text = "Creative Inventory"
  1283. text.Font = "SourceSansSemibold"
  1284. text.TextSize = 14
  1285. text.TextXAlignment = "Left"
  1286. --
  1287. local draggingBlockPicture = Instance.new("ImageLabel", invGui)
  1288. draggingBlockPicture.BackgroundTransparency = 1
  1289. draggingBlockPicture.Size = UDim2.new(0, 32, 0, 32)
  1290. draggingBlockPicture.ZIndex = 5
  1291. coroutine.resume(coroutine.create(function()
  1292. local invMouse = player:GetMouse()
  1293. --local RS = game:GetService("RunService").RenderStepped
  1294. invMouse.Button2Down:connect(function()
  1295. draggingBlock = nil
  1296. end)
  1297. while RS:wait() do
  1298. --draggingBlockPicture.Position = UDim2.new(0, invMouse.X - 16, 0, invMouse.Y - 16)
  1299. if draggingBlock ~= nil then
  1300. draggingBlockPicture.Image = ""
  1301. else
  1302. draggingBlockPicture.Image = ""
  1303. end
  1304. end
  1305. end))
  1306.  
  1307. local done = false
  1308. local x = 0
  1309. local y = 0
  1310.  
  1311. for i,b in pairs(creativeInventory) do
  1312. local display = ""
  1313. if b.displayTex == "" then
  1314. display = b.frontTex
  1315. else
  1316. if b.displayTex then
  1317. display = b.displayTex
  1318. end
  1319. end
  1320. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), display, creativeInv, 4).MouseButton1Down:connect(function()
  1321. if draggingBlock == nil then
  1322. draggingBlock = b
  1323. end
  1324. end)
  1325. x = x + 1
  1326. if x >= 8 then
  1327. x = 0
  1328. y = y + 1
  1329. end
  1330. end
  1331. if x == 0 then done = true end
  1332. while x < 8 and done == false do
  1333. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), "", creativeInv, 4)
  1334. x = x + 1
  1335. end
  1336. for i = 1, 9 do
  1337. if toolBar[i] ~= nil then
  1338. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), toolBar[i].frontTex, creativeInv, 4)
  1339. invSlot.MouseButton2Down:connect(function()
  1340. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1341. if imgLabel then
  1342. toolBar[i] = nil
  1343. imgLabel.Image = ""
  1344. end
  1345. end)
  1346. invSlot.MouseButton1Down:connect(function()
  1347. --updateHand = true
  1348. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1349. if toolBar[i] == nil then
  1350. toolBar[i] = draggingBlock
  1351. imgLabel.Image = draggingBlock.frontTex
  1352. draggingBlock = nil
  1353. return
  1354. end
  1355. if toolBar[i] ~= nil and draggingBlock == nil then
  1356. draggingBlock = toolBar[i]
  1357. toolBar[i] = nil
  1358. imgLabel.Image = ""
  1359. return
  1360. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1361. --draggingBlock = toolBar[i]
  1362. --toolBar[i] = nil
  1363. imgLabel.Image = ""
  1364. local temp = toolBar[i]
  1365. toolBar[i] = draggingBlock
  1366. if imgLabel and draggingBlock ~= nil then
  1367. imgLabel.Image = draggingBlock.frontTex
  1368. end
  1369. if imgLabel and draggingBlock == nil then
  1370. imgLabel.Image = ""
  1371. end
  1372. draggingBlock = temp
  1373. return
  1374. end
  1375. end)
  1376. else
  1377. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), "", creativeInv, 4)
  1378. invSlot.MouseButton2Down:connect(function()
  1379. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1380. if imgLabel then
  1381. toolBar[i] = nil
  1382. imgLabel.Image = ""
  1383. end
  1384. end)
  1385. invSlot.MouseButton1Down:connect(function()
  1386. --updateHand = true
  1387. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1388. if toolBar[i] == nil then
  1389. toolBar[i] = draggingBlock
  1390. imgLabel.Image = draggingBlock.frontTex
  1391. draggingBlock = nil
  1392. return
  1393. end
  1394. if toolBar[i] ~= nil and draggingBlock == nil then
  1395. draggingBlock = toolBar[i]
  1396. toolBar[i] = nil
  1397. imgLabel.Image = ""
  1398. return
  1399. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1400. --draggingBlock = toolBar[i]
  1401. --toolBar[i] = nil
  1402. imgLabel.Image = ""
  1403. local temp = toolBar[i]
  1404. toolBar[i] = draggingBlock
  1405. if imgLabel and draggingBlock ~= nil then
  1406. imgLabel.Image = draggingBlock.frontTex
  1407. end
  1408. if imgLabel and draggingBlock == nil then
  1409. imgLabel.Image = ""
  1410. end
  1411. draggingBlock = temp
  1412. return
  1413. end
  1414. end)
  1415. end
  1416. end
  1417. return creativeInv
  1418. end
  1419. end
  1420.  
  1421.  
  1422. --[]
  1423. local gui = player.PlayerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", player.PlayerGui)
  1424. gui.Name = "ToolBar"
  1425.  
  1426. makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 364, 0, 44),
  1427. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1428.  
  1429. local blocks = {"Dirt", "Grass", "Stone", "Diamond_Ore", "Diamond_Block", "Wood_Planks", "Oak_Log"}
  1430. for i = 1, 9 do
  1431. if toolBar[blocks[i]] ~= nil then
  1432. putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[blocks[i]].frontTex)
  1433. else
  1434. putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
  1435. end
  1436. end
  1437.  
  1438. for i = 1, 9 do
  1439. if toolBar[i] ~= nil then
  1440. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[i].frontTex)
  1441. coroutine.resume(coroutine.create(function()
  1442. while wait() do
  1443. if toolBar[i] ~= nil then
  1444. if toolBar[i].displayTex == "" then
  1445. img.Image = toolBar[i].frontTex
  1446. else
  1447. img.Image = toolBar[i].displayTex
  1448. end
  1449. else
  1450. img.Image = ""
  1451. end
  1452. end
  1453. end))
  1454. else
  1455. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
  1456. coroutine.resume(coroutine.create(function()
  1457. while wait() do
  1458. if toolBar[i] ~= nil then
  1459. if toolBar[i].displayTex == "" then
  1460. img.Image = toolBar[i].frontTex
  1461. else
  1462. img.Image = toolBar[i].displayTex
  1463. end
  1464. else
  1465. img.Image = ""
  1466. end
  1467. end
  1468. end))
  1469. end
  1470. end
  1471. local creativeInventoryGUI = makeInventory()
  1472.  
  1473. local humRootPart = char:WaitForChild("HumanoidRootPart")
  1474. local head = char:WaitForChild("Head")
  1475. local torso = char:WaitForChild("Torso")
  1476. local lArm = char:WaitForChild("Left Arm")
  1477. local rArm = char:WaitForChild("Right Arm")
  1478. local lLeg = char:WaitForChild("Left Leg")
  1479. local rLeg = char:WaitForChild("Right Leg")
  1480. head.Size = Vector3.new(1.3, 1.3, 1.3)
  1481. head:WaitForChild("Mesh"):Destroy()
  1482. head:WaitForChild("face"):Destroy()
  1483.  
  1484. headdecal6 = Instance.new("Decal",head)
  1485. headdecal6.Face = "Front"
  1486. headdecal6.Texture = faces[math.random(1,#faces)]
  1487. if headdecal6.Texture == "http://www.roblox.com/asset/?id=4783606175" then
  1488. local hit0 = Instance.new("Part", char)
  1489. hit0.Name = "DamagePart"
  1490. hit0.BrickColor = BrickColor.new("Bright red")
  1491. hit0.Material = "SmoothPlastic"
  1492. hit0.Transparency = 1
  1493. hit0.Size = Vector3.new(lArm.Size.X + 0.001, lArm.Size.Y + 0.001, lArm.Size.Z + 0.001)
  1494. hit0.CanCollide = false
  1495. weldd = Instance.new("Weld",hit0)
  1496. weldd.Part0 = lArm
  1497. weldd.Part1 = hit0
  1498. local hit1 = Instance.new("Part", char)
  1499. hit1.Name = "DamagePart"
  1500. hit1.BrickColor = BrickColor.new("Bright red")
  1501. hit1.Material = "SmoothPlastic"
  1502. hit1.Transparency = 1
  1503. hit1.Size = Vector3.new(rArm.Size.X + 0.001, rArm.Size.Y + 0.001, rArm.Size.Z + 0.001)
  1504. hit1.CanCollide = false
  1505. welddd = Instance.new("Weld",hit1)
  1506. welddd.Part0 = rArm
  1507. welddd.Part1 = hit1
  1508. torsodecal1 = Instance.new("Decal",torso)
  1509. torsodecal1.Face = "Left"
  1510. torsodecal1.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1511. torsodecal2 = Instance.new("Decal",torso)
  1512. torsodecal2.Face = "Bottom"
  1513. torsodecal2.Texture = "http://www.roblox.com/asset/?id=0"
  1514. torsodecal3 = Instance.new("Decal",torso)
  1515. torsodecal3.Face = "Top"
  1516. torsodecal3.Texture = "http://www.roblox.com/asset/?id=0"
  1517. torsodecal4 = Instance.new("Decal",torso)
  1518. torsodecal4.Face = "Back"
  1519. torsodecal4.Texture = "http://www.roblox.com/asset/?id=4783608206"
  1520. torsodecal5 = Instance.new("Decal",torso)
  1521. torsodecal5.Face = "Right"
  1522. torsodecal5.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1523. torsodecal6 = Instance.new("Decal",torso)
  1524. torsodecal6.Face = "Front"
  1525. torsodecal6.Texture = "http://www.roblox.com/asset/?id=4783608206"
  1526. for i,v in pairs(char:GetChildren()) do
  1527. if v.ClassName == "Part" and v.Name == "Left Leg" then
  1528. torsodecal1 = Instance.new("Decal",v)
  1529. torsodecal1.Face = "Left"
  1530. torsodecal1.Texture = "http://www.roblox.com/asset/?id=4783668876"
  1531. torsodecal2 = Instance.new("Decal",v)
  1532. torsodecal2.Face = "Bottom"
  1533. torsodecal2.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1534. torsodecal3 = Instance.new("Decal",v)
  1535. torsodecal3.Face = "Top"
  1536. torsodecal3.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1537. torsodecal4 = Instance.new("Decal",v)
  1538. torsodecal4.Face = "Back"
  1539. torsodecal4.Texture = "http://www.roblox.com/asset/?id=4783668876"
  1540. torsodecal5 = Instance.new("Decal",v)
  1541. torsodecal5.Face = "Right"
  1542. torsodecal5.Texture = "http://www.roblox.com/asset/?id=4783668876"
  1543. torsodecal6 = Instance.new("Decal",v)
  1544. torsodecal6.Face = "Front"
  1545. torsodecal6.Texture = "http://www.roblox.com/asset/?id=4783668876"
  1546. elseif v.ClassName == "Part" and v.Name == "Right Leg" then
  1547. torsodecal1 = Instance.new("Decal",v)
  1548. torsodecal1.Face = "Left"
  1549. torsodecal1.Texture = "http://www.roblox.com/asset/?id=4783669194"
  1550. torsodecal2 = Instance.new("Decal",v)
  1551. torsodecal2.Face = "Bottom"
  1552. torsodecal2.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1553. torsodecal3 = Instance.new("Decal",v)
  1554. torsodecal3.Face = "Top"
  1555. torsodecal3.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1556. torsodecal4 = Instance.new("Decal",v)
  1557. torsodecal4.Face = "Back"
  1558. torsodecal4.Texture = "http://www.roblox.com/asset/?id=4783669194"
  1559. torsodecal5 = Instance.new("Decal",v)
  1560. torsodecal5.Face = "Right"
  1561. torsodecal5.Texture = "http://www.roblox.com/asset/?id=4783669194"
  1562. torsodecal6 = Instance.new("Decal",v)
  1563. torsodecal6.Face = "Front"
  1564. torsodecal6.Texture = "http://www.roblox.com/asset/?id=4783669194"
  1565. elseif v.ClassName == "Part" and v.Name == "Left Arm" then
  1566. torsodecal1 = Instance.new("Decal",v)
  1567. torsodecal1.Face = "Left"
  1568. torsodecal1.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1569. torsodecal2 = Instance.new("Decal",v)
  1570. torsodecal2.Face = "Bottom"
  1571. torsodecal2.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1572. torsodecal3 = Instance.new("Decal",v)
  1573. torsodecal3.Face = "Top"
  1574. torsodecal3.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1575. torsodecal4 = Instance.new("Decal",v)
  1576. torsodecal4.Face = "Back"
  1577. torsodecal4.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1578. torsodecal5 = Instance.new("Decal",v)
  1579. torsodecal5.Face = "Right"
  1580. torsodecal5.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1581. torsodecal6 = Instance.new("Decal",v)
  1582. torsodecal6.Face = "Front"
  1583. torsodecal6.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1584. elseif v.ClassName == "Part" and v.Name == "Right Arm" then
  1585. torsodecal1 = Instance.new("Decal",v)
  1586. torsodecal1.Face = "Left"
  1587. torsodecal1.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1588. torsodecal2 = Instance.new("Decal",v)
  1589. torsodecal2.Face = "Bottom"
  1590. torsodecal2.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1591. torsodecal3 = Instance.new("Decal",v)
  1592. torsodecal3.Face = "Top"
  1593. torsodecal3.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1594. torsodecal4 = Instance.new("Decal",v)
  1595. torsodecal4.Face = "Back"
  1596. torsodecal4.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1597. torsodecal5 = Instance.new("Decal",v)
  1598. torsodecal5.Face = "Right"
  1599. torsodecal5.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1600. torsodecal6 = Instance.new("Decal",v)
  1601. torsodecal6.Face = "Front"
  1602. torsodecal6.Texture = "http://www.roblox.com/asset/?id=4783608931"
  1603. diamondsword = Instance.new("Part",char)
  1604. diamondsword.Name = "Diamond Sword"
  1605. diamondsword.CanCollide = false
  1606. diamondsword.Size = Vector3.new(2.72, 0.17, 2.72)
  1607. diamondswordmesh = Instance.new("SpecialMesh",diamondsword)
  1608. diamondswordmesh.MeshId = 'rbxassetid://3676810102'
  1609. diamondswordmesh.Scale = Vector3.new(0.162, 0.162, 0.162)
  1610. diamondswordmesh.TextureId = 'rbxassetid://3676810220'
  1611. diamondswordweld = Instance.new("Weld",char)
  1612. diamondswordweld.Name = 'SwordWeld'
  1613. diamondswordweld.C0 = CFrame.new(0,-0.68,-1.2) * CFrame.Angles(-math.rad(45),-math.rad(0),-math.rad(-90))
  1614. diamondswordweld.Part0 = lArm
  1615. diamondswordweld.Part1 = diamondsword
  1616. end
  1617. end
  1618.  
  1619. torso.Size = Vector3.new(1.3, 1.95, 0.65)
  1620. lArm.Size = Vector3.new(0.65, 1.95, 0.65)
  1621. rArm.Size = Vector3.new(0.65, 1.95, 0.65)
  1622. lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  1623. rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  1624. lS = Instance.new("Motor6D", torso)
  1625. lS.Name = "Left Shoulder"
  1626. lS.Part0 = lArm
  1627. lS.Part1 = torso
  1628. lS.C0 = CFrame.new(-0.325, 0.643, 0) * CFrame.Angles(0, 0, 0)
  1629. lS.C1 = CFrame.new(0.65, 0.643, 0)
  1630.  
  1631. rS = Instance.new("Motor6D", torso)
  1632. rS.Name = "Right Shoulder"
  1633. rS.Part0 = rArm
  1634. rS.Part1 = torso
  1635. rS.C0 = CFrame.new(-0.325, 0.643, 0) * CFrame.Angles(0, 0, 0)
  1636. rS.C1 = CFrame.new(-0.65, 0.643, 0) * CFrame.Angles(0, -math.rad(180), 0)
  1637.  
  1638. char.Humanoid:ClearAllChildren()
  1639. --char.Animate:Remove()
  1640. for _,cM in pairs(char:GetChildren()) do
  1641. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  1642. end
  1643. Instance.new("BlockMesh", torso)
  1644. Instance.new("BlockMesh", lLeg)
  1645. Instance.new("BlockMesh", rLeg)
  1646. blockmesharm = Instance.new("BlockMesh", lArm)
  1647. blockmesharm.Offset = Vector3.new(0,0.332,0)
  1648. blockmesharm2 = Instance.new("BlockMesh", rArm)
  1649. blockmesharm2.Offset = Vector3.new(0,0.332,0)
  1650. headdecal1 = Instance.new("Decal",head)
  1651. headdecal1.Face = "Left"
  1652. headdecal1.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1653. headdecal2 = Instance.new("Decal",head)
  1654. headdecal2.Face = "Bottom"
  1655. headdecal2.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1656. headdecal3 = Instance.new("Decal",head)
  1657. headdecal3.Face = "Top"
  1658. headdecal3.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1659. headdecal4 = Instance.new("Decal",head)
  1660. headdecal4.Face = "Back"
  1661. headdecal4.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1662. headdecal5 = Instance.new("Decal",head)
  1663. headdecal5.Face = "Right"
  1664. headdecal5.Texture = "http://www.roblox.com/asset/?id=4783607071"
  1665. end
  1666. if headdecal6.Texture == "rbxassetid://295150002" then
  1667. for _,p in pairs(char:GetChildren()) do
  1668. if p.ClassName == "Part" and p.Name ~= "DamagePart" and p.Name ~= "Diamond Sword" and p.Name ~= "HandItem" and p.Name ~= "HumanoidRootPart" then
  1669. local hit = Instance.new("Part", char)
  1670. hit.Name = "DamagePart"
  1671. hit.BrickColor = BrickColor.new("Bright red")
  1672. hit.Material = "SmoothPlastic"
  1673. hit.Transparency = 1
  1674. hit.Size = Vector3.new(p.Size.X + 0.001, p.Size.Y + 0.001, p.Size.Z + 0.001)
  1675. hit.CanCollide = false
  1676. weld = Instance.new("Weld",p)
  1677. weld.Part0 = p
  1678. weld.Part1 = hit
  1679. end
  1680. end
  1681. torso.Size = Vector3.new(1.3, 1.95, 0.65)
  1682. lArm.Size = Vector3.new(0.58, 1.95, 0.65)
  1683. rArm.Size = Vector3.new(0.58, 1.95, 0.65)
  1684. lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  1685. rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  1686.  
  1687. --blockmesh1 = Instance.new("SpecialMesh", lArm)
  1688. --blockmesh1.Scale = Vector3.new(-0.7,1,1)
  1689. --blockmesh1.Offset = Vector3.new(-0.107, 0, 0)
  1690. --blockmesh2 = Instance.new("SpecialMesh", rArm)
  1691. --blockmesh2.Scale = Vector3.new(-0.7,1,1)
  1692. --blockmesh2.Offset = Vector3.new(-0.107, 0, 0)
  1693. char.Humanoid:ClearAllChildren()
  1694. --char.Animate:Remove()
  1695. char.Humanoid:ClearAllChildren()
  1696. --char.Animate:Remove()
  1697. for i,v in pairs(char:GetChildren()) do
  1698. if v.ClassName == "Shirt" and v.ClassName == "Pants" then
  1699. v:Destroy()
  1700. v.Parent = nil
  1701. end
  1702. end
  1703. wait(0.00)
  1704. alexshirt = Instance.new("Shirt",char)
  1705. alexshirt.ShirtTemplate = "rbxassetid://3977861054"
  1706. alexpants = Instance.new("Pants",char)
  1707. alexpants.PantsTemplate = "rbxassetid://2897639977"
  1708. for _,cM in pairs(char:GetChildren()) do
  1709. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  1710. end
  1711. lS = Instance.new("Motor6D", torso)
  1712. lS.Name = "Left Shoulder"
  1713. lS.Part0 = lArm
  1714. lS.Part1 = torso
  1715. lS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
  1716. lS.C1 = CFrame.new(0.58, 0.975, 0)
  1717. char:WaitForChild("Body Colors").HeadColor = BrickColor.new("Neon orange")
  1718. head.BrickColor = BrickColor.new("Neon orange")
  1719. head.Material = "SmoothPlastic"
  1720. rS = Instance.new("Motor6D", torso)
  1721. rS.Name = "Right Shoulder"
  1722. rS.Part0 = rArm
  1723. rS.Part1 = torso
  1724. rS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
  1725. diamondsword = Instance.new("Part",char)
  1726. diamondsword.Name = "Diamond Sword"
  1727. diamondsword.CanCollide = false
  1728. diamondsword.Size = Vector3.new(2.72, 0.17, 2.72)
  1729. diamondswordmesh = Instance.new("SpecialMesh",diamondsword)
  1730. diamondswordmesh.MeshId = 'rbxassetid://3676810102'
  1731. diamondswordmesh.Scale = Vector3.new(0.162, 0.162, 0.162)
  1732. diamondswordmesh.TextureId = 'rbxassetid://3676810220'
  1733. diamondswordweld = Instance.new("Weld",char)
  1734. diamondswordweld.Name = 'SwordWeld'
  1735. diamondswordweld.C0 = CFrame.new(0,-0.68,-1.2) * CFrame.Angles(-math.rad(45),-math.rad(0),-math.rad(-90))
  1736. diamondswordweld.Part0 = lArm
  1737. diamondswordweld.Part1 = diamondsword
  1738. rS.C1 = CFrame.new(-0.58, 0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
  1739. end
  1740. for _,p in pairs(char:GetChildren()) do
  1741. 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
  1742. local hit = Instance.new("Part", char)
  1743. hit.Name = "DamagePart"
  1744. hit.BrickColor = BrickColor.new("Bright red")
  1745. hit.Material = "SmoothPlastic"
  1746. hit.Transparency = 1
  1747. hit.Size = Vector3.new(p.Size.X + 0.001, p.Size.Y + 0.001, p.Size.Z + 0.001)
  1748. hit.CanCollide = false
  1749. weld = Instance.new("Weld",p)
  1750. weld.Part0 = p
  1751. weld.Part1 = hit
  1752. end
  1753. end
  1754. coroutine.resume(coroutine.create(function()
  1755. player = game.Players.LocalPlayer
  1756. char = player.Character
  1757. billnametag = Instance.new("BillboardGui",char.Head)
  1758. billnametag.StudsOffset = Vector3.new(0,1.5,0)
  1759. billnametag.ZIndexBehavior = "Global"
  1760. billnametag.LightInfluence = 1
  1761. billnametag.MaxDistance = math.huge
  1762. billnametag.AlwaysOnTop = true
  1763. frame = Instance.new("Frame",billnametag)
  1764. frame.AnchorPoint = Vector2.new(0, 0)
  1765. frame.Size = UDim2.new(1,0,1,0)
  1766. frame.BackgroundTransparency = 1
  1767. frame.BackgroundColor3 = Color3.new(0,0,0)
  1768. frame.Position = UDim2.new(0,0,0,0)
  1769. --billnametag.PlayerToHideFrom = player
  1770. textlabel = Instance.new("TextLabel",frame)
  1771. --textlabel.BorderSizePixel = 0
  1772. textlabel.Font = "Arcade"
  1773. textlabel.Size = UDim2.new(1,0,1,0)
  1774. textlabel.Position = UDim2.new(0,1,0,1)
  1775. textlabel.Text = player.Name
  1776. textlabel.BackgroundColor3 = Color3.new(0,0,0)
  1777. textlabel.TextColor3 = Color3.fromRGB(255,255,255)
  1778. textlabel.BackgroundTransparency = 0.5
  1779. textlabel.AnchorPoint = Vector2.new(0,0)
  1780. --textlabel.ClipsDescendants = true
  1781. --textlabel.TextScaled = true
  1782. textlabel.TextSize = 20
  1783. billnametag.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
  1784. frame.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
  1785. billnametag.SizeOffset = Vector2.new(-textlabel.TextBounds.X/200 + 0.5, 0)
  1786. if player.Name == "ManSolomon" or player.Name == "noah878788" then
  1787. textlabel.TextColor3 = Color3.fromRGB(255, 255, 0)
  1788. end
  1789. if player.Name == "guest712921" then
  1790. textlabel.TextColor3 = Color3.fromRGB(255, 255, 0)
  1791. textlabel.Text = textlabel.Text.. " (BETA TESTER!!!)"
  1792. frame.Size = UDim2.new(textlabel.TextBounds.X/100, 0, 0.75, 0)
  1793. billnametag.SizeOffset = Vector2.new(-textlabel.TextBounds.X/200 + 0.5, 0)
  1794. while true do
  1795. i = 0
  1796. for n=1,0,-0.05 do
  1797. i = i + 0.05
  1798. textlabel.TextColor3 = Color3.new(i, 0, n)
  1799. wait()
  1800. end
  1801. i = 0
  1802. for n=1,0,-0.05 do
  1803. i = i + 0.05
  1804. textlabel.TextColor3 = Color3.new(n, i, 0)
  1805. wait()
  1806. end
  1807. i = 0
  1808. for n=1,0,-0.05 do
  1809. i = i + 0.05
  1810. textlabel.TextColor3 = Color3.new(0, n, i)
  1811. wait()
  1812. end
  1813. end
  1814. end
  1815. wait()
  1816. textlabel.TextScaled = true
  1817. textlabel.TextSize = 8
  1818. end))
  1819.  
  1820. -- now for the real stuff
  1821. -- |
  1822. -- |
  1823. -- V
  1824.  
  1825.  
  1826. local Mouse = player:GetMouse()
  1827.  
  1828.  
  1829. --[[local cameraHand = Instance.new("Part", camera)
  1830. cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
  1831. cameraHand.CanCollide = false
  1832. cameraHand.Anchored = true
  1833. cameraHand.Name = "CameraHand"
  1834.  
  1835. local cameraHandWeld = Instance.new("Motor6D", camPart)
  1836. cameraHandWeld.Part0 = camPart
  1837. cameraHandWeld.Part1 = cameraHand
  1838. cameraHandWeld.C0 = CFrame.new(5, 0, 0)
  1839. ]]--
  1840.  
  1841. local humanoid = char:WaitForChild("Humanoid")
  1842.  
  1843. -- Heart bar
  1844. local hpFrame = makeSquare(UDim2.new(0.5, -166, 1, -130), UDim2.new(0, 162, 0, 18),
  1845. Color3.new(0/255, 0/255, 0/255), 1, gui, 1)
  1846.  
  1847. local hearts = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 162, 0, 18),
  1848. Color3.new(0/255, 0/255, 0/255), 1, hpFrame, 1)
  1849. hearts.ClipsDescendants = true
  1850.  
  1851. for i = 1, 10 do
  1852. local heartImg = makeImage(UDim2.new(0, (i-1)*16, 0, 0), UDim2.new(0, 18, 0, 18),
  1853. "rbxassetid://1494233443", hearts, 2)
  1854.  
  1855. makeSquare(UDim2.new(0, 4, 0, 4), UDim2.new(0, 2, 0, 2),
  1856. Color3.new(255/255, 200/255, 200/255), 0, heartImg, 2)
  1857.  
  1858. heartImg.ImageColor3 = Color3.new(240/255, 0, 0)
  1859.  
  1860. local emptyHeart = makeImage(UDim2.new(0, (i-1)*16, 0, 0), UDim2.new(0, 18, 0, 18),
  1861. "rbxassetid://1494233443", hpFrame, 1)
  1862. emptyHeart.ImageColor3 = Color3.new(0.3, 0.3, 0.3)
  1863.  
  1864. local outline = makeImage(UDim2.new(0, 0, 0, 0), UDim2.new(0, 18, 0, 18),
  1865. "rbxassetid://1494176679", emptyHeart, 1)
  1866. outline.ImageColor3 = Color3.new(0, 0, 0)
  1867.  
  1868. local oldHP = humanoid.Health/humanoid.MaxHealth --SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8)
  1869. humanoid.Changed:connect(function()
  1870. local hp = humanoid.Health/humanoid.MaxHealth --SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8)
  1871. if SnapToGrid(oldHP*162, 8) < SnapToGrid(hp*162, 8) then
  1872. outline.ImageColor3 = Color3.new(1, 1, 1)
  1873. wait(0.1)
  1874. outline.ImageColor3 = Color3.new(0, 0, 0)
  1875. wait(0.1)
  1876. end
  1877. if oldHP > hp then
  1878. for i = 1, 2 do
  1879. outline.ImageColor3 = Color3.new(1, 1, 1)
  1880. wait(0.1)
  1881. outline.ImageColor3 = Color3.new(0, 0, 0)
  1882. wait(0.1)
  1883. end
  1884. end
  1885. oldHP = hp
  1886. end)
  1887. coroutine.resume(coroutine.create(function()
  1888. local yIncrease = 0
  1889. local originalY = emptyHeart.Position.Y.Offset
  1890.  
  1891. while wait() do
  1892. if humanoid.Health/humanoid.MaxHealth <= 0.27 then
  1893. if yIncrease <= 0 then
  1894. yIncrease = math.random(1, 2)
  1895. else
  1896. yIncrease = yIncrease - 1
  1897. end
  1898.  
  1899. heartImg.Position = UDim2.new(0, heartImg.Position.X.Offset, 0, -yIncrease)
  1900. emptyHeart.Position = UDim2.new(0, emptyHeart.Position.X.Offset, 0, -yIncrease)
  1901. else
  1902. if yIncrease >= 1 then
  1903. yIncrease = yIncrease - 1
  1904.  
  1905. heartImg.Position = UDim2.new(0, heartImg.Position.X.Offset, 0, -yIncrease)
  1906. emptyHeart.Position = UDim2.new(0, emptyHeart.Position.X.Offset, 0, -yIncrease)
  1907. end
  1908. end
  1909. end
  1910. end))
  1911. end
  1912.  
  1913.  
  1914. humanoid.BreakJointsOnDeath = false
  1915. humanoid.HipHeight = 0.3
  1916.  
  1917. local rootJoint = Instance.new("Motor6D", torso)
  1918. rootJoint.Name = "RootJoint"
  1919. rootJoint.Part0 = humRootPart
  1920. rootJoint.Part1 = torso
  1921. rootJoint.C1 = CFrame.new(0, 0.05, 0)
  1922. remoteevent = Instance.new("RemoteEvent",char)
  1923. remoteevent.Name = "SteveFunction"
  1924. local neck = torso:WaitForChild("Neck")
  1925. neck.Name = "Neck"
  1926. neck.Part0 = head
  1927. neck.Part1 = torso
  1928. remoteevent.OnServerEvent:Connect(function(plr,a,b)
  1929. necka = plr.Character.Torso.Neck
  1930. necka.C0 = a
  1931. necka.C1 = b
  1932. end)
  1933. NLS([[
  1934. -- NOTE (READ!!): This script doesn't work on voidacity's script builder
  1935. -- since it crashes your game, but it's usable on other
  1936. -- script builders like fancy dev's or nexure's.
  1937. -- (it just doesn't work on voidacity only)
  1938.  
  1939. -- Scroll down for changelog...
  1940.  
  1941. -- ORIGINAL CREATOR: Depr1
  1942.  
  1943. -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
  1944. -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
  1945. -- then this is not the original link of this script.
  1946.  
  1947. -- The original link of the script gets edited constantly for updates, if you use the original
  1948. -- link you will be able to enjoy the most recent updates of this script without changing to
  1949. -- another link which contains updated script.
  1950.  
  1951. -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks,
  1952. -- choose a empty slot if you want to remove a block, E to open creative
  1953. -- inventory, right-click to destroy a block in your toolbar in creative
  1954. -- inventory, R to make camera face your character's front or back.
  1955.  
  1956. -- You will become steve when you use this script, if you die after
  1957. -- using this script, keep trying to use it or wait 60 seconds
  1958. -- (it doesn't work at first but eventually it will)
  1959.  
  1960. -- Enjoy! :)
  1961.  
  1962. local updateHand = false
  1963.  
  1964. workspace:WaitForChild("Camera"):ClearAllChildren()
  1965. local RS = game:GetService("RunService").RenderStepped
  1966. local targetName = game.Players.LocalPlayer.Name
  1967. local player = owner
  1968.  
  1969.  
  1970. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  1971. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  1972. for i,f in pairs(faces) do
  1973. local decal = Instance.new(className, part)
  1974. if i == 1 then decal.Texture = frontF decal.Name = f end
  1975. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  1976. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  1977. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  1978. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  1979. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  1980. decal.Face = f
  1981. end
  1982. return part
  1983. end
  1984. function makeSquare(position, size, color, transparency, parent, zindex)
  1985. local label = Instance.new("TextLabel", parent)
  1986. label.Text = ""
  1987. label.BorderSizePixel = 0
  1988. label.BackgroundTransparency = transparency
  1989. label.Position = position
  1990. label.Size = size
  1991. label.BackgroundColor3 = color
  1992. if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
  1993. return label
  1994. end
  1995. function makeImage(position, size, image, parent, zindex)
  1996. local imglabel = Instance.new("ImageLabel", parent)
  1997. imglabel.BorderSizePixel = 0
  1998. imglabel.BackgroundTransparency = 1
  1999. imglabel.Position = position
  2000. imglabel.Size = size
  2001. imglabel.Image = image
  2002. if zindex == nil then imglabel.ZIndex = 1 else imglabel.ZIndex = zindex end
  2003. return imglabel
  2004. end
  2005. function putInventorySlot(position, image, parent, zindex)
  2006. local button = Instance.new("TextButton", parent)
  2007. button.Position = position
  2008. button.Size = UDim2.new(0, 36, 0, 36)
  2009. button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
  2010. button.Text = ""
  2011. button.BorderSizePixel = 0
  2012. button.ZIndex = zindex
  2013. local imageLabel = Instance.new("ImageLabel", button)
  2014. imageLabel.BackgroundTransparency = 0.9
  2015. imageLabel.Position = UDim2.new(0, 2, 0, 2)
  2016. imageLabel.Size = UDim2.new(0, 32, 0, 32)
  2017. imageLabel.Image = image
  2018. imageLabel.BorderSizePixel = 0
  2019. imageLabel.ZIndex = zindex
  2020. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
  2021. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  2022. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
  2023. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  2024. makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
  2025. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  2026. makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
  2027. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  2028. return button
  2029. end
  2030.  
  2031. function AngleDifference(Angle1, Angle2)
  2032. local Difference = {X = 0, Y = 0, Z = 0}
  2033. Difference.X = Angle2.X - Angle1.X
  2034.  
  2035. if (Difference.X > 180) then
  2036. Difference.X = Difference.X - 360
  2037. elseif (Difference.X < -180) then
  2038. Difference.X = Difference.X + 360
  2039. end
  2040.  
  2041. Difference.Y = Angle2.Y - Angle1.Y
  2042.  
  2043. if (Difference.Y > 180) then
  2044. Difference.Y = Difference.Y - 360
  2045. elseif (Difference.Y < -180) then
  2046. Difference.Y = Difference.Y + 360
  2047. end
  2048.  
  2049. Difference.Z = Angle2.Z - Angle1.Z
  2050.  
  2051. if (Difference.Z > 180) then
  2052. Difference.Z = Difference.Z - 360
  2053. elseif (Difference.Z < -180) then
  2054. Difference.Z = Difference.Z + 360
  2055. end
  2056.  
  2057. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  2058. end
  2059. local creativeInventory = {
  2060. {
  2061. name = "Dirt",
  2062. size = Vector3.new(2.6, 2.6, 2.6),
  2063. transparency = 0;
  2064. frontTex = "rbxassetid://152569532",
  2065. backTex = "rbxassetid://152569532",
  2066. topTex = "rbxassetid://152569532",
  2067. bottomTex = "rbxassetid://152569532",
  2068. leftTex = "rbxassetid://152569532",
  2069. rightTex = "rbxassetid://152569532",
  2070. displayTex = "",
  2071. sound = "rbxassetid://1102186681",
  2072. soundVol = 1.25,
  2073. hasGravity = false,
  2074. objectType = "Block"
  2075. },
  2076. {
  2077. name = "Grass",
  2078. size = Vector3.new(2.6, 2.6, 2.6),
  2079. transparency = 0;
  2080. frontTex = "rbxassetid://96430337",
  2081. backTex = "rbxassetid://96430337",
  2082. topTex = "rbxassetid://96430265",
  2083. bottomTex = "rbxassetid://179655033",
  2084. leftTex = "rbxassetid://96430337",
  2085. rightTex = "rbxassetid://96430337",
  2086. displayTex = "",
  2087. sound = "rbxassetid://1102186681",
  2088. soundVol = 1.25,
  2089. hasGravity = false,
  2090. objectType = "Block"
  2091. },
  2092. {
  2093. name = "Sand",
  2094. size = Vector3.new(2.6, 2.6, 2.6),
  2095. transparency = 0;
  2096. frontTex = "rbxassetid://347007448",
  2097. backTex = "rbxassetid://347007448",
  2098. topTex = "rbxassetid://347007448",
  2099. bottomTex = "rbxassetid://347007448",
  2100. leftTex = "rbxassetid://347007448",
  2101. rightTex = "rbxassetid://347007448",
  2102. displayTex = "",
  2103. sound = "rbxassetid://1102186681",
  2104. soundVol = 1.25,
  2105. hasGravity = true,
  2106. objectType = "Block"
  2107. },
  2108. {
  2109. name = "Gravel",
  2110. size = Vector3.new(2.6, 2.6, 2.6),
  2111. transparency = 0;
  2112. frontTex = "rbxassetid://151701568",
  2113. backTex = "rbxassetid://151701568",
  2114. topTex = "rbxassetid://151701568",
  2115. bottomTex = "rbxassetid://151701568",
  2116. leftTex = "rbxassetid://151701568",
  2117. rightTex = "rbxassetid://151701568",
  2118. displayTex = "",
  2119. sound = "rbxassetid://1102186681",
  2120. soundVol = 1.25,
  2121. hasGravity = true,
  2122. objectType = "Block"
  2123. },
  2124. {
  2125. name = "Stone",
  2126. size = Vector3.new(2.6, 2.6, 2.6),
  2127. transparency = 0;
  2128. frontTex = "rbxassetid://75880927",
  2129. backTex = "rbxassetid://75880927",
  2130. topTex = "rbxassetid://75880927",
  2131. bottomTex = "rbxassetid://75880927",
  2132. leftTex = "rbxassetid://75880927",
  2133. rightTex = "rbxassetid://75880927",
  2134. displayTex = "",
  2135. sound = "rbxassetid://1016978163",
  2136. soundVol = 2,
  2137. hasGravity = false,
  2138. objectType = "Block"
  2139. },
  2140. {
  2141. name = "Diamond Ore",
  2142. size = Vector3.new(2.6, 2.6, 2.6),
  2143. transparency = 0;
  2144. frontTex = "rbxassetid://57928490",
  2145. backTex = "rbxassetid://57928490",
  2146. topTex = "rbxassetid://57928490",
  2147. bottomTex = "rbxassetid://57928490",
  2148. leftTex = "rbxassetid://57928490",
  2149. rightTex = "rbxassetid://57928490",
  2150. displayTex = "",
  2151. sound = "rbxassetid://1016978163",
  2152. soundVol = 2,
  2153. hasGravity = false,
  2154. objectType = "Block"
  2155. },
  2156. {
  2157. name = "Diamond Block",
  2158. size = Vector3.new(2.6, 2.6, 2.6),
  2159. transparency = 0;
  2160. frontTex = "rbxassetid://56749955",
  2161. backTex = "rbxassetid://56749955",
  2162. topTex = "rbxassetid://56749955",
  2163. bottomTex = "rbxassetid://56749955",
  2164. leftTex = "rbxassetid://56749955",
  2165. rightTex = "rbxassetid://56749955",
  2166. displayTex = "",
  2167. sound = "rbxassetid://1016978163",
  2168. soundVol = 2,
  2169. hasGravity = false,
  2170. objectType = "Block"
  2171. },
  2172. {
  2173. name = "Emerald Block",
  2174. size = Vector3.new(2.6, 2.6, 2.6),
  2175. transparency = 0;
  2176. frontTex = "rbxassetid://152410853",
  2177. backTex = "rbxassetid://152410853",
  2178. topTex = "rbxassetid://152410853",
  2179. bottomTex = "rbxassetid://152410853",
  2180. leftTex = "rbxassetid://152410853",
  2181. rightTex = "rbxassetid://152410853",
  2182. displayTex = "",
  2183. sound = "rbxassetid://1016978163",
  2184. soundVol = 2,
  2185. hasGravity = false,
  2186. objectType = "Block"
  2187. },
  2188. {
  2189. name = "Emerald Ore",
  2190. size = Vector3.new(2.6, 2.6, 2.6),
  2191. transparency = 0;
  2192. frontTex = "rbxassetid://152410868",
  2193. backTex = "rbxassetid://152410868",
  2194. topTex = "rbxassetid://152410868",
  2195. bottomTex = "rbxassetid://152410868",
  2196. leftTex = "rbxassetid://152410868",
  2197. rightTex = "rbxassetid://152410868",
  2198. displayTex = "",
  2199. sound = "rbxassetid://1016978163",
  2200. soundVol = 2,
  2201. hasGravity = false,
  2202. objectType = "Block"
  2203. },
  2204. {
  2205. name = "Obsidian",
  2206. size = Vector3.new(2.6, 2.6, 2.6),
  2207. transparency = 0;
  2208. frontTex = "rbxassetid://112560322",
  2209. backTex = "rbxassetid://112560322",
  2210. topTex = "rbxassetid://112560322",
  2211. bottomTex = "rbxassetid://112560322",
  2212. leftTex = "rbxassetid://112560322",
  2213. rightTex = "rbxassetid://112560322",
  2214. displayTex = "",
  2215. sound = "rbxassetid://1016978163",
  2216. soundVol = 2,
  2217. hasGravity = false,
  2218. objectType = "Block"
  2219. },
  2220. {
  2221. name = "Gold Block",
  2222. size = Vector3.new(2.6, 2.6, 2.6),
  2223. transparency = 0;
  2224. frontTex = "rbxassetid://152572128",
  2225. backTex = "rbxassetid://152572128",
  2226. topTex = "rbxassetid://152572128",
  2227. bottomTex = "rbxassetid://152572128",
  2228. leftTex = "rbxassetid://152572128",
  2229. rightTex = "rbxassetid://152572128",
  2230. displayTex = "",
  2231. sound = "rbxassetid://1016978163",
  2232. soundVol = 2,
  2233. hasGravity = false,
  2234. objectType = "Block"
  2235. },
  2236. {
  2237. name = "Gold Ore",
  2238. size = Vector3.new(2.6, 2.6, 2.6),
  2239. transparency = 0;
  2240. frontTex = "rbxassetid://152572121",
  2241. backTex = "rbxassetid://152572121",
  2242. topTex = "rbxassetid://152572121",
  2243. bottomTex = "rbxassetid://152572121",
  2244. leftTex = "rbxassetid://152572121",
  2245. rightTex = "rbxassetid://152572121",
  2246. displayTex = "",
  2247. sound = "rbxassetid://1016978163",
  2248. soundVol = 2,
  2249. hasGravity = false,
  2250. objectType = "Block"
  2251. },
  2252. {
  2253. name = "Iron Block",
  2254. size = Vector3.new(2.6, 2.6, 2.6),
  2255. transparency = 0;
  2256. frontTex = "rbxassetid://152572134",
  2257. backTex = "rbxassetid://152572134",
  2258. topTex = "rbxassetid://152572134",
  2259. bottomTex = "rbxassetid://152572134",
  2260. leftTex = "rbxassetid://152572134",
  2261. rightTex = "rbxassetid://152572134",
  2262. displayTex = "",
  2263. sound = "rbxassetid://1016978163",
  2264. soundVol = 2,
  2265. hasGravity = false,
  2266. objectType = "Block"
  2267. },
  2268. {
  2269. name = "Iron Ore",
  2270. size = Vector3.new(2.6, 2.6, 2.6),
  2271. transparency = 0;
  2272. frontTex = "rbxassetid://132879562",
  2273. backTex = "rbxassetid://132879562",
  2274. topTex = "rbxassetid://132879562",
  2275. bottomTex = "rbxassetid://132879562",
  2276. leftTex = "rbxassetid://132879562",
  2277. rightTex = "rbxassetid://132879562",
  2278. displayTex = "",
  2279. sound = "rbxassetid://1016978163",
  2280. soundVol = 2,
  2281. hasGravity = false,
  2282. objectType = "Block"
  2283. },
  2284. {
  2285. name = "Redstone Block",
  2286. size = Vector3.new(2.6, 2.6, 2.6),
  2287. transparency = 0;
  2288. frontTex = "rbxassetid://136260219",
  2289. backTex = "rbxassetid://136260219",
  2290. topTex = "rbxassetid://136260219",
  2291. bottomTex = "rbxassetid://136260219",
  2292. leftTex = "rbxassetid://136260219",
  2293. rightTex = "rbxassetid://136260219",
  2294. sound = "rbxassetid://1016978163",
  2295. soundVol = 2,
  2296. hasGravity = false,
  2297. objectType = "Block"
  2298. },
  2299. {
  2300. name = "TNT",
  2301. size = Vector3.new(2.6, 2.6, 2.6),
  2302. transparency = 0;
  2303. frontTex = "rbxassetid://48005067",
  2304. backTex = "rbxassetid://48005067",
  2305. topTex = "rbxassetid://48005073",
  2306. bottomTex = "rbxassetid://48005064",
  2307. leftTex = "rbxassetid://48005067",
  2308. rightTex = "rbxassetid://48005067",
  2309. displayTex = "",
  2310. sound = "rbxassetid://1102186681",
  2311. soundVol = 2,
  2312. hasGravity = false,
  2313. isExplosive = true,
  2314. objectType = "Block"
  2315. },
  2316. {
  2317. name = "Coal Block",
  2318. size = Vector3.new(2.6, 2.6, 2.6),
  2319. transparency = 0;
  2320. frontTex = "rbxassetid://152527418",
  2321. backTex = "rbxassetid://152527418",
  2322. topTex = "rbxassetid://152527418",
  2323. bottomTex = "rbxassetid://152527418",
  2324. leftTex = "rbxassetid://152527418",
  2325. rightTex = "rbxassetid://152527418",
  2326. displayTex = "",
  2327. sound = "rbxassetid://1016978163",
  2328. soundVol = 2,
  2329. hasGravity = false,
  2330. objectType = "Block"
  2331. },
  2332. {
  2333. name = "Coal Ore",
  2334. size = Vector3.new(2.6, 2.6, 2.6),
  2335. transparency = 0;
  2336. frontTex = "rbxassetid://152572101",
  2337. backTex = "rbxassetid://152572101",
  2338. topTex = "rbxassetid://152572101",
  2339. bottomTex = "rbxassetid://152572101",
  2340. leftTex = "rbxassetid://152572101",
  2341. rightTex = "rbxassetid://152572101",
  2342. displayTex = "",
  2343. sound = "rbxassetid://1016978163",
  2344. soundVol = 2,
  2345. hasGravity = false,
  2346. objectType = "Block"
  2347. },
  2348. {
  2349. name = "Bedrock",
  2350. size = Vector3.new(2.6, 2.6, 2.6),
  2351. transparency = 0;
  2352. frontTex = "rbxassetid://75881126",
  2353. backTex = "rbxassetid://75881126",
  2354. topTex = "rbxassetid://75881126",
  2355. bottomTex = "rbxassetid://75881126",
  2356. leftTex = "rbxassetid://75881126",
  2357. rightTex = "rbxassetid://75881126",
  2358. displayTex = "",
  2359. sound = "rbxassetid://1016978163",
  2360. soundVol = 2,
  2361. hasGravity = false,
  2362. objectType = "Block"
  2363. },
  2364. {
  2365. name = "Cobblestone",
  2366. size = Vector3.new(2.6, 2.6, 2.6),
  2367. transparency = 0;
  2368. frontTex = "rbxassetid://152572105",
  2369. backTex = "rbxassetid://152572105",
  2370. topTex = "rbxassetid://152572105",
  2371. bottomTex = "rbxassetid://152572105",
  2372. leftTex = "rbxassetid://152572105",
  2373. rightTex = "rbxassetid://152572105",
  2374. displayTex = "",
  2375. sound = "rbxassetid://1016978163",
  2376. soundVol = 2,
  2377. hasGravity = false,
  2378. objectType = "Block"
  2379. },
  2380. {
  2381. name = "Mossy Stone Brick",
  2382. size = Vector3.new(2.6, 2.6, 2.6),
  2383. transparency = 0;
  2384. frontTex = "rbxassetid://61826751",
  2385. backTex = "rbxassetid://61826751",
  2386. topTex = "rbxassetid://61826751",
  2387. bottomTex = "rbxassetid://61826751",
  2388. leftTex = "rbxassetid://61826751",
  2389. rightTex = "rbxassetid://61826751",
  2390. displayTex = "",
  2391. sound = "rbxassetid://1016978163",
  2392. soundVol = 2,
  2393. hasGravity = false,
  2394. objectType = "Block"
  2395. },
  2396. {
  2397. name = "Cracked Stone Brick",
  2398. size = Vector3.new(2.6, 2.6, 2.6),
  2399. transparency = 0;
  2400. frontTex = "rbxassetid://151802087",
  2401. backTex = "rbxassetid://151802087",
  2402. topTex = "rbxassetid://151802087",
  2403. bottomTex = "rbxassetid://151802087",
  2404. leftTex = "rbxassetid://151802087",
  2405. rightTex = "rbxassetid://151802087",
  2406. displayTex = "",
  2407. sound = "rbxassetid://1016978163",
  2408. soundVol = 2,
  2409. hasGravity = false,
  2410. objectType = "Block"
  2411. },
  2412. {
  2413. name = "Chiseled Stone Brick",
  2414. size = Vector3.new(2.6, 2.6, 2.6),
  2415. transparency = 0;
  2416. frontTex = "rbxassetid://151802074",
  2417. backTex = "rbxassetid://151802074",
  2418. topTex = "rbxassetid://151802074",
  2419. bottomTex = "rbxassetid://151802074",
  2420. leftTex = "rbxassetid://151802074",
  2421. rightTex = "rbxassetid://151802074",
  2422. displayTex = "",
  2423. sound = "rbxassetid://1016978163",
  2424. soundVol = 2,
  2425. hasGravity = false,
  2426. objectType = "Block"
  2427. },
  2428. {
  2429. name = "Stone Brick",
  2430. size = Vector3.new(2.6, 2.6, 2.6),
  2431. transparency = 0;
  2432. frontTex = "rbxassetid://61826773",
  2433. backTex = "rbxassetid://61826773",
  2434. topTex = "rbxassetid://61826773",
  2435. bottomTex = "rbxassetid://61826773",
  2436. leftTex = "rbxassetid://61826773",
  2437. rightTex = "rbxassetid://61826773",
  2438. displayTex = "",
  2439. sound = "rbxassetid://1016978163",
  2440. soundVol = 2,
  2441. hasGravity = false,
  2442. objectType = "Block"
  2443. },
  2444. {
  2445. name = "Nether Brick",
  2446. size = Vector3.new(2.6, 2.6, 2.6),
  2447. transparency = 0;
  2448. frontTex = "rbxassetid://151802104",
  2449. backTex = "rbxassetid://151802104",
  2450. topTex = "rbxassetid://151802104",
  2451. bottomTex = "rbxassetid://151802104",
  2452. leftTex = "rbxassetid://151802104",
  2453. rightTex = "rbxassetid://151802104",
  2454. displayTex = "",
  2455. sound = "rbxassetid://1016978163",
  2456. soundVol = 2,
  2457. hasGravity = false,
  2458. objectType = "Block"
  2459. },
  2460. {
  2461. name = "Granite",
  2462. size = Vector3.new(2.6, 2.6, 2.6),
  2463. transparency = 0;
  2464. frontTex = "rbxassetid://151776467",
  2465. backTex = "rbxassetid://151776467",
  2466. topTex = "rbxassetid://151776467",
  2467. bottomTex = "rbxassetid://151776467",
  2468. leftTex = "rbxassetid://151776467",
  2469. rightTex = "rbxassetid://151776467",
  2470. displayTex = "",
  2471. sound = "rbxassetid://1016978163",
  2472. soundVol = 2,
  2473. hasGravity = false,
  2474. objectType = "Block"
  2475. },
  2476. {
  2477. name = "Diorite",
  2478. size = Vector3.new(2.6, 2.6, 2.6),
  2479. transparency = 0;
  2480. frontTex = "rbxassetid://151776452",
  2481. backTex = "rbxassetid://151776452",
  2482. topTex = "rbxassetid://151776452",
  2483. bottomTex = "rbxassetid://151776452",
  2484. leftTex = "rbxassetid://151776452",
  2485. rightTex = "rbxassetid://151776452",
  2486. sound = "rbxassetid://1016978163",
  2487. soundVol = 2,
  2488. hasGravity = false,
  2489. objectType = "Block"
  2490. },
  2491. {
  2492. name = "Andesite",
  2493. size = Vector3.new(2.6, 2.6, 2.6),
  2494. transparency = 0;
  2495. frontTex = "rbxassetid://151776422",
  2496. backTex = "rbxassetid://151776422",
  2497. topTex = "rbxassetid://151776422",
  2498. bottomTex = "rbxassetid://151776422",
  2499. leftTex = "rbxassetid://151776422",
  2500. rightTex = "rbxassetid://151776422",
  2501. displayTex = "",
  2502. sound = "rbxassetid://1016978163",
  2503. soundVol = 2,
  2504. hasGravity = false,
  2505. objectType = "Block"
  2506. },
  2507. {
  2508. name = "Polished Granite",
  2509. size = Vector3.new(2.6, 2.6, 2.6),
  2510. transparency = 0;
  2511. frontTex = "rbxassetid://151776506",
  2512. backTex = "rbxassetid://151776506",
  2513. topTex = "rbxassetid://151776506",
  2514. bottomTex = "rbxassetid://151776506",
  2515. leftTex = "rbxassetid://151776506",
  2516. rightTex = "rbxassetid://151776506",
  2517. displayTex = "",
  2518. sound = "rbxassetid://1016978163",
  2519. soundVol = 2,
  2520. hasGravity = false,
  2521. objectType = "Block"
  2522. },
  2523. {
  2524. name = "Polished Diorite",
  2525. size = Vector3.new(2.6, 2.6, 2.6),
  2526. transparency = 0;
  2527. frontTex = "rbxassetid://151776533",
  2528. backTex = "rbxassetid://151776533",
  2529. topTex = "rbxassetid://151776533",
  2530. bottomTex = "rbxassetid://151776533",
  2531. leftTex = "rbxassetid://151776533",
  2532. rightTex = "rbxassetid://151776533",
  2533. displayTex = "",
  2534. sound = "rbxassetid://1016978163",
  2535. soundVol = 2,
  2536. hasGravity = false,
  2537. objectType = "Block"
  2538. },
  2539. {
  2540. name = "Polished Andesite",
  2541. size = Vector3.new(2.6, 2.6, 2.6),
  2542. transparency = 0;
  2543. frontTex = "rbxassetid://151776506",
  2544. backTex = "rbxassetid://151776506",
  2545. topTex = "rbxassetid://151776506",
  2546. bottomTex = "rbxassetid://151776506",
  2547. leftTex = "rbxassetid://151776506",
  2548. rightTex = "rbxassetid://151776506",
  2549. displayTex = "",
  2550. sound = "rbxassetid://1016978163",
  2551. soundVol = 2,
  2552. hasGravity = false,
  2553. objectType = "Block"
  2554. },
  2555. {
  2556. name = "Brick Block",
  2557. size = Vector3.new(2.6, 2.6, 2.6),
  2558. transparency = 0;
  2559. frontTex = "rbxassetid://59389191",
  2560. backTex = "rbxassetid://59389191",
  2561. topTex = "rbxassetid://59389191",
  2562. bottomTex = "rbxassetid://59389191",
  2563. leftTex = "rbxassetid://59389191",
  2564. rightTex = "rbxassetid://59389191",
  2565. displayTex = "",
  2566. sound = "rbxassetid://1016978163",
  2567. soundVol = 2,
  2568. hasGravity = false,
  2569. objectType = "Block"
  2570. },
  2571. {
  2572. name = "Packed Ice",
  2573. size = Vector3.new(2.6, 2.6, 2.6),
  2574. transparency = 0;
  2575. frontTex = "rbxassetid://152528023",
  2576. backTex = "rbxassetid://152528023",
  2577. topTex = "rbxassetid://152528023",
  2578. bottomTex = "rbxassetid://152528023",
  2579. leftTex = "rbxassetid://152528023",
  2580. rightTex = "rbxassetid://152528023",
  2581. displayTex = "",
  2582. sound = "rbxassetid://1016978163",
  2583. soundVol = 2,
  2584. hasGravity = false,
  2585. objectType = "Block"
  2586. },
  2587. {
  2588. name = "Ice Block",
  2589. size = Vector3.new(2.6, 2.6, 2.6),
  2590. transparency = 1;
  2591. frontTex = "rbxassetid://118555586",
  2592. backTex = "rbxassetid://118555586",
  2593. topTex = "rbxassetid://118555586",
  2594. bottomTex = "rbxassetid://118555586",
  2595. leftTex = "rbxassetid://118555586",
  2596. rightTex = "rbxassetid://118555586",
  2597. displayTex = "",
  2598. sound = "rbxassetid://1016978163",
  2599. soundVol = 2,
  2600. hasGravity = false,
  2601. objectType = "Block"
  2602. },
  2603. {
  2604. name = "Netherrack",
  2605. size = Vector3.new(2.6, 2.6, 2.6),
  2606. transparency = 0;
  2607. frontTex = "rbxassetid://151802119",
  2608. backTex = "rbxassetid://151802119",
  2609. topTex = "rbxassetid://151802119",
  2610. bottomTex = "rbxassetid://151802119",
  2611. leftTex = "rbxassetid://151802119",
  2612. rightTex = "rbxassetid://151802119",
  2613. displayTex = "",
  2614. sound = "rbxassetid://1016978163",
  2615. soundVol = 2,
  2616. hasGravity = false,
  2617. objectType = "Block"
  2618. },
  2619. {
  2620. name = "End Stone",
  2621. size = Vector3.new(2.6, 2.6, 2.6),
  2622. transparency = 0;
  2623. frontTex = "rbxassetid://151802091",
  2624. backTex = "rbxassetid://151802091",
  2625. topTex = "rbxassetid://151802091",
  2626. bottomTex = "rbxassetid://151802091",
  2627. leftTex = "rbxassetid://151802091",
  2628. rightTex = "rbxassetid://151802091",
  2629. displayTex = "",
  2630. sound = "rbxassetid://1016978163",
  2631. soundVol = 2,
  2632. hasGravity = false,
  2633. objectType = "Block"
  2634. },
  2635. {
  2636. name = "Glass Block",
  2637. size = Vector3.new(2.6, 2.6, 2.6),
  2638. transparency = 1;
  2639. frontTex = "rbxassetid://152239003",
  2640. backTex = "rbxassetid://152239003",
  2641. topTex = "rbxassetid://152239003",
  2642. bottomTex = "rbxassetid://152239003",
  2643. leftTex = "rbxassetid://152239003",
  2644. rightTex = "rbxassetid://152239003",
  2645. displayTex = "",
  2646. sound = "rbxassetid://1016978163",
  2647. soundVol = 2,
  2648. hasGravity = false,
  2649. objectType = "Block"
  2650. },
  2651. {
  2652. name = "Glowstone",
  2653. size = Vector3.new(2.6, 2.6, 2.6),
  2654. transparency = 0;
  2655. frontTex = "rbxassetid://54790811",
  2656. backTex = "rbxassetid://54790811",
  2657. topTex = "rbxassetid://54790811",
  2658. bottomTex = "rbxassetid://54790811",
  2659. leftTex = "rbxassetid://54790811",
  2660. rightTex = "rbxassetid://54790811",
  2661. displayTex = "",
  2662. sound = "rbxassetid://1016978163",
  2663. soundVol = 2,
  2664. hasGravity = false,
  2665. objectType = "Block"
  2666. },
  2667. {
  2668. name = "Bookshelf",
  2669. size = Vector3.new(2.6, 2.6, 2.6),
  2670. transparency = 0;
  2671. frontTex = "rbxassetid://118554092",
  2672. backTex = "rbxassetid://118554092",
  2673. topTex = "rbxassetid://346201871",
  2674. bottomTex = "rbxassetid://346201871",
  2675. leftTex = "rbxassetid://118554092",
  2676. rightTex = "rbxassetid://118554092",
  2677. displayTex = "",
  2678. sound = "rbxassetid://507863457",
  2679. soundVol = 2,
  2680. hasGravity = false,
  2681. objectType = "Block"
  2682. },
  2683. {
  2684. name = "Oak Wood Planks",
  2685. size = Vector3.new(2.6, 2.6, 2.6),
  2686. transparency = 0;
  2687. frontTex = "rbxassetid://346201871",
  2688. backTex = "rbxassetid://346201871",
  2689. topTex = "rbxassetid://346201871",
  2690. bottomTex = "rbxassetid://346201871",
  2691. leftTex = "rbxassetid://346201871",
  2692. rightTex = "rbxassetid://346201871",
  2693. displayTex = "",
  2694. sound = "rbxassetid://507863457",
  2695. soundVol = 2,
  2696. hasGravity = false,
  2697. objectType = "Block"
  2698. },
  2699. {
  2700. name = "Oak Log",
  2701. size = Vector3.new(2.6, 2.6, 2.6),
  2702. transparency = 0;
  2703. frontTex = "rbxassetid://71445924",
  2704. backTex = "rbxassetid://71445924",
  2705. topTex = "rbxassetid://152538557",
  2706. bottomTex = "rbxassetid://152538557",
  2707. leftTex = "rbxassetid://71445924",
  2708. rightTex = "rbxassetid://71445924",
  2709. displayTex = "",
  2710. sound = "rbxassetid://507863457",
  2711. soundVol = 2,
  2712. hasGravity = false,
  2713. objectType = "Block"
  2714. },
  2715. {
  2716. name = "Oak Leaves",
  2717. size = Vector3.new(2.6, 2.6, 2.6),
  2718. transparency = 1;
  2719. frontTex = "rbxassetid://151708391",
  2720. backTex = "rbxassetid://151708391",
  2721. topTex = "rbxassetid://151708391",
  2722. bottomTex = "rbxassetid://151708391",
  2723. leftTex = "rbxassetid://151708391",
  2724. rightTex = "rbxassetid://151708391",
  2725. displayTex = "",
  2726. sound = "rbxassetid://507863457",
  2727. -- couldn't find a leaves sound for this one, sorry lol
  2728. soundVol = 2,
  2729. hasGravity = false,
  2730. objectType = "Block"
  2731. }
  2732. }
  2733. local toolBar = {
  2734. {
  2735. name = "Dirt Block",
  2736. size = Vector3.new(2.6, 2.6, 2.6),
  2737. transparency = 0;
  2738. frontTex = "rbxassetid://152569532",
  2739. backTex = "rbxassetid://152569532",
  2740. topTex = "rbxassetid://152569532",
  2741. bottomTex = "rbxassetid://152569532",
  2742. leftTex = "rbxassetid://152569532",
  2743. rightTex = "rbxassetid://152569532",
  2744. displayTex = "",
  2745. sound = "rbxassetid://1102186681",
  2746. soundVol = 1.25,
  2747. hasGravity = false,
  2748. objectType = "Block"
  2749. },
  2750. {
  2751. name = "Grass Block",
  2752. size = Vector3.new(2.6, 2.6, 2.6),
  2753. transparency = 0;
  2754. frontTex = "rbxassetid://96430337",
  2755. backTex = "rbxassetid://96430337",
  2756. topTex = "rbxassetid://96430265",
  2757. bottomTex = "rbxassetid://179655033",
  2758. leftTex = "rbxassetid://96430337",
  2759. rightTex = "rbxassetid://96430337",
  2760. displayTex = "",
  2761. sound = "rbxassetid://1102186681",
  2762. soundVol = 1.25,
  2763. hasGravity = false,
  2764. objectType = "Block"
  2765. },
  2766. {
  2767. name = "Stone",
  2768. size = Vector3.new(2.6, 2.6, 2.6),
  2769. transparency = 0;
  2770. frontTex = "rbxassetid://75880927",
  2771. backTex = "rbxassetid://75880927",
  2772. topTex = "rbxassetid://75880927",
  2773. bottomTex = "rbxassetid://75880927",
  2774. leftTex = "rbxassetid://75880927",
  2775. rightTex = "rbxassetid://75880927",
  2776. displayTex = "",
  2777. sound = "rbxassetid://1016978163",
  2778. soundVol = 2,
  2779. hasGravity = false,
  2780. objectType = "Block"
  2781. },
  2782. {
  2783. name = "Diamond Ore",
  2784. size = Vector3.new(2.6, 2.6, 2.6),
  2785. transparency = 0;
  2786. frontTex = "rbxassetid://152572119",
  2787. backTex = "rbxassetid://152572119",
  2788. topTex = "rbxassetid://152572119",
  2789. bottomTex = "rbxassetid://152572119",
  2790. leftTex = "rbxassetid://152572119",
  2791. rightTex = "rbxassetid://152572119",
  2792. displayTex = "",
  2793. sound = "rbxassetid://1016978163",
  2794. soundVol = 2,
  2795. hasGravity = false,
  2796. objectType = "Block"
  2797. },
  2798. {
  2799. name = "Diamond Block",
  2800. size = Vector3.new(2.6, 2.6, 2.6),
  2801. transparency = 0;
  2802. frontTex = "rbxassetid://56749955",
  2803. backTex = "rbxassetid://56749955",
  2804. topTex = "rbxassetid://56749955",
  2805. bottomTex = "rbxassetid://56749955",
  2806. leftTex = "rbxassetid://56749955",
  2807. rightTex = "rbxassetid://56749955",
  2808. displayTex = "",
  2809. sound = "rbxassetid://1016978163",
  2810. soundVol = 2,
  2811. hasGravity = false,
  2812. objectType = "Block"
  2813. },
  2814. {
  2815. name = "Oak Wood Planks",
  2816. size = Vector3.new(2.6, 2.6, 2.6),
  2817. transparency = 0;
  2818. frontTex = "rbxassetid://346201871",
  2819. backTex = "rbxassetid://346201871",
  2820. topTex = "rbxassetid://346201871",
  2821. bottomTex = "rbxassetid://346201871",
  2822. leftTex = "rbxassetid://346201871",
  2823. rightTex = "rbxassetid://346201871",
  2824. displayTex = "",
  2825. sound = "rbxassetid://507863457",
  2826. soundVol = 2,
  2827. hasGravity = false,
  2828. objectType = "Block"
  2829. },
  2830. {
  2831. name = "Oak Log",
  2832. size = Vector3.new(2.6, 2.6, 2.6),
  2833. transparency = 0;
  2834. frontTex = "rbxassetid://71445924",
  2835. backTex = "rbxassetid://71445924",
  2836. topTex = "rbxassetid://152538557",
  2837. bottomTex = "rbxassetid://152538557",
  2838. leftTex = "rbxassetid://71445924",
  2839. rightTex = "rbxassetid://71445924",
  2840. displayTex = "",
  2841. sound = "rbxassetid://507863457",
  2842. soundVol = 2,
  2843. hasGravity = false,
  2844. objectType = "Block"
  2845. }
  2846. }
  2847. local draggingBlock = nil
  2848. function divide(x, d)
  2849. if x ~= 0 and d ~= 0 then
  2850. return x/d
  2851. else
  2852. return x
  2853. end
  2854. end -- so it doesn't divide by zero
  2855. function getDistance(v1, v2)
  2856. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  2857. end
  2858. function SnapToGrid(x, gridX)
  2859. local x = math.floor((x / gridX) + 0.5) * gridX
  2860. return x
  2861. end
  2862. function round(x)
  2863. if x%2 ~= 0.5 then
  2864. return math.floor(x+0.5)
  2865. end
  2866. return x-0.5
  2867. end
  2868. function weldTo(part1, part2)
  2869. local weld = Instance.new("Weld", part1)
  2870. weld.Part0 = part1
  2871. weld.Part1 = part2
  2872. return weld
  2873. end
  2874. function getMagnitudeXZ(velocity)
  2875. return math.sqrt(math.abs(velocity.X)^2 + math.abs(velocity.Z)^2)
  2876. end
  2877. function findHumanoid(inst)
  2878. local find = inst
  2879. local hum = nil
  2880. repeat
  2881. if find.Name == "Workspace" then return nil end
  2882. find = find.Parent
  2883. hum = find:FindFirstChild("Humanoid")
  2884. until hum
  2885. --if hum then print("found!!") else print("aw... not found") end
  2886. --if hum.ClassName ~= "Humanoid" then hum = nil end
  2887. return hum
  2888. end
  2889. function getSideByLocation(loc)
  2890. local side = nil
  2891. if loc.X < 0 then side = "Left" end
  2892. if loc.X > 0 then side = "Right" end
  2893. if loc.Y > 0 then side = "Top" end
  2894. if loc.Y < 0 then side = "Bottom" end
  2895. if loc.Z < 0 then side = "Front" end
  2896. if loc.Z > 0 then side = "Back" end
  2897.  
  2898. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  2899. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  2900. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  2901. then
  2902. return nil
  2903. end
  2904. return side
  2905. end
  2906. function getSideByLocationRedstone(loc)
  2907. local side = nil
  2908. if loc.X < 0 then side = "Left" end
  2909. if loc.X > 0 then side = "Right" end
  2910. if loc.Y > 0 then side = "Top" end
  2911. if loc.Y < 0 then side = "Bottom" end
  2912. if loc.Z < 0 then side = "Front" end
  2913. if loc.Z > 0 then side = "Back" end
  2914.  
  2915. if (math.abs(loc.X) > 0 and math.abs(loc.Y) > 0) or
  2916. (math.abs(loc.X) > 0 and math.abs(loc.Z) > 0) or
  2917. (math.abs(loc.Y) > 0 and math.abs(loc.Z) > 0)
  2918. then
  2919. return nil
  2920. end
  2921. return side
  2922. end
  2923. function getBlockAtRegion(region)
  2924. local blockFound = nil
  2925. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  2926. local usePart = true
  2927. if part.Name == "Debris" then usePart = false end
  2928. if usePart == true then
  2929. blockFound = part
  2930. break
  2931. end
  2932. end
  2933. return blockFound
  2934. end
  2935. function getRedstoneAtRegion(region)
  2936. local blockFound = nil
  2937. for _,part in pairs(game.Workspace:FindPartsInRegion3(region, nil, math.huge)) do
  2938. if isRedstone(part) then
  2939. blockFound = part
  2940. break
  2941. end
  2942. end
  2943. return blockFound
  2944. end
  2945. function isRedstone(block)
  2946. local objType = block:FindFirstChild("ObjectType")
  2947. if objType then
  2948. if objType.Value == "Redstone Dust" then
  2949. return true
  2950. else
  2951. return false
  2952. end
  2953. end
  2954. end
  2955. function updateRedstoneDust(dust, leftBlk, rightBlk, topBlk, bottomBlk, frontBlk, backBlk, recursion)
  2956. local objType = nil
  2957. if dust then
  2958. objType = dust:FindFirstChild("ObjectType")
  2959. end
  2960.  
  2961. local redstoneDust = "rbxassetid://151911305"
  2962. local redstoneLine = "rbxassetid://151907047"
  2963. local redstoneCorner = "rbxassetid://151907106"
  2964. local redstoneT = "rbxassetid://151907156"
  2965. local redstoneCross = "rbxassetid://151906997"
  2966.  
  2967. local Rotation = 0
  2968.  
  2969. local theresRedstoneAtLeft = false
  2970. local theresRedstoneAtRight = false
  2971. local theresRedstoneAtFront = false
  2972. local theresRedstoneAtBack = false
  2973.  
  2974. if leftBlk then theresRedstoneAtLeft = isRedstone(leftBlk) end
  2975. if rightBlk then theresRedstoneAtRight = isRedstone(rightBlk) end
  2976. if frontBlk then theresRedstoneAtFront = isRedstone(frontBlk) end
  2977. if backBlk then theresRedstoneAtBack = isRedstone(backBlk) end
  2978.  
  2979. if objType then
  2980. if objType.Value == "Redstone Dust" then
  2981. local topDecal = dust:FindFirstChild("Top")
  2982. if topDecal then
  2983. if theresRedstoneAtBack == false and theresRedstoneAtFront == false and
  2984. theresRedstoneAtLeft == false and theresRedstoneAtRight == false then
  2985. topDecal.Texture = redstoneDust
  2986. Rotation = 0
  2987. end
  2988.  
  2989. if theresRedstoneAtLeft == true or theresRedstoneAtRight == true then
  2990. topDecal.Texture = redstoneLine
  2991. Rotation = 0
  2992. end
  2993.  
  2994. if theresRedstoneAtFront == true or theresRedstoneAtBack == true then
  2995. topDecal.Texture = redstoneLine
  2996. Rotation = 90
  2997. end
  2998.  
  2999. if theresRedstoneAtLeft == true and theresRedstoneAtBack == true then
  3000. topDecal.Texture = redstoneCorner
  3001. Rotation = 0
  3002. end
  3003.  
  3004. if theresRedstoneAtBack == true and theresRedstoneAtRight == true then
  3005. topDecal.Texture = redstoneCorner
  3006. Rotation = 90
  3007. end
  3008.  
  3009. if theresRedstoneAtRight == true and theresRedstoneAtFront == true then
  3010. topDecal.Texture = redstoneCorner
  3011. Rotation = 180
  3012. end
  3013.  
  3014. if theresRedstoneAtFront == true and theresRedstoneAtLeft == true then
  3015. topDecal.Texture = redstoneCorner
  3016. Rotation = -90
  3017. end
  3018.  
  3019. if theresRedstoneAtBack == true and theresRedstoneAtLeft == true
  3020. and theresRedstoneAtFront == true then
  3021. topDecal.Texture = redstoneT
  3022. Rotation = -90
  3023. end
  3024.  
  3025. if theresRedstoneAtLeft == true and theresRedstoneAtFront == true
  3026. and theresRedstoneAtRight == true then
  3027. topDecal.Texture = redstoneT
  3028. Rotation = -180
  3029. end
  3030.  
  3031. if theresRedstoneAtFront == true and theresRedstoneAtRight == true
  3032. and theresRedstoneAtBack == true then
  3033. topDecal.Texture = redstoneT
  3034. Rotation = 90
  3035. end
  3036.  
  3037. if theresRedstoneAtRight == true and theresRedstoneAtBack == true
  3038. and theresRedstoneAtLeft == true then
  3039. topDecal.Texture = redstoneT
  3040. Rotation = 0
  3041. end
  3042.  
  3043. if theresRedstoneAtLeft == true and theresRedstoneAtRight == true and
  3044. theresRedstoneAtFront == true and theresRedstoneAtBack == true then
  3045. topDecal.Texture = redstoneCross
  3046. Rotation = 0
  3047. end
  3048. end
  3049. else
  3050. error("Not redstone dust.")
  3051. end
  3052. end
  3053.  
  3054. if recursion == true then
  3055. local function updateTex(blockTarget)
  3056. local leftSide = nil
  3057. local rightSide = nil
  3058. local frontSide = nil
  3059. local backSide = nil
  3060.  
  3061. local Point1 = blockTarget.CFrame.p - Vector3.new(2.6, 0.1, 2.6)
  3062. local Point2 = blockTarget.CFrame.p + Vector3.new(2.6, 0.1, 2.6)
  3063. local Region = Region3.new(Point1, Point2)
  3064. for _,part in pairs(game.Workspace:FindPartsInRegion3(
  3065. Region,
  3066. nil,
  3067. math.huge
  3068. )) do
  3069. local objType = part:FindFirstChild("ObjectType")
  3070. if isRedstone(part) then
  3071. local side = getSideByLocationRedstone(blockTarget.CFrame.p - part.CFrame.p)
  3072. if side == "Left" then
  3073. leftSide = part
  3074. elseif side == "Right" then
  3075. rightSide = part
  3076. elseif side == "Front" then
  3077. frontSide = part
  3078. elseif side == "Back" then
  3079. backSide = part
  3080. elseif side == "Left Top" then
  3081. leftSide = part
  3082. elseif side == "Right Top" then
  3083. rightSide = part
  3084. elseif side == "Front Top" then
  3085. frontSide = part
  3086. elseif side == "Back Top" then
  3087. backSide = part
  3088. elseif side == "Left Bottom" then
  3089. leftSide = part
  3090. elseif side == "Right Bottom" then
  3091. rightSide = part
  3092. elseif side == "Front Bottom" then
  3093. frontSide = part
  3094. elseif side == "Back Bottom" then
  3095. backSide = part
  3096. end
  3097. end
  3098. end
  3099.  
  3100. updateRedstoneDust(blockTarget, leftSide, rightSide, nil, nil, frontSide, backSide, false)
  3101. end
  3102. if leftBlk and theresRedstoneAtLeft then updateTex(leftBlk) end
  3103. if rightBlk and theresRedstoneAtRight then updateTex(rightBlk) end
  3104. if frontBlk and theresRedstoneAtFront then updateTex(frontBlk) end
  3105. if backBlk and theresRedstoneAtBack then updateTex(backBlk) end
  3106. end
  3107.  
  3108. 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
  3109. end
  3110. if player then
  3111. local char = player.Character
  3112. if char then
  3113. for _,cM in pairs(char:GetChildren()) do
  3114. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  3115. end
  3116.  
  3117. --[]
  3118.  
  3119. local humRootPart = char:WaitForChild("HumanoidRootPart")
  3120. local head = char:WaitForChild("Head")
  3121. local torso = char:WaitForChild("Torso")
  3122. local lArm = char:WaitForChild("Left Arm")
  3123. local rArm = char:WaitForChild("Right Arm")
  3124. local lLeg = char:WaitForChild("Left Leg")
  3125. local rLeg = char:WaitForChild("Right Leg")
  3126.  
  3127. local humanoid = char:WaitForChild("Humanoid")
  3128.  
  3129. local camera = workspace.CurrentCamera
  3130.  
  3131. local camPart = Instance.new("Part", camera)
  3132. camPart.Name = "CamPart Local"
  3133. camPart.Size = Vector3.new(0, 0, 0)
  3134. camPart.CFrame = camera.CFrame
  3135. camPart.CanCollide = false
  3136. camPart.Anchored = true
  3137. camPart.Transparency = 1
  3138. local cameraHand = Instance.new("Part", camera)
  3139. cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
  3140. cameraHand.CanCollide = false
  3141. cameraHand.Anchored = true
  3142. cameraHand.Name = "CameraHand"
  3143. putTexture(cameraHand, "rbxassetid://4783608931", "rbxassetid://4783608931",
  3144. "rbxassetid://4783607071", "rbxassetid://4783607071",
  3145. "rbxassetid://4783608931", "rbxassetid://4783608931", "Decal")
  3146.  
  3147. local cameraHandItem = Instance.new("Part", camera)
  3148. cameraHandItem.Name = "CameraHandItem"
  3149. cameraHandItem.Size = Vector3.new(1.1, 1.1, 1.1)
  3150. cameraHandItem.Anchored = true
  3151. cameraHandItem.CanCollide = false
  3152. cameraHandItem.Transparency = 1
  3153.  
  3154. -- welding doesn't really work.
  3155. --local cameraHandWeld = Instance.new("Motor6D", camPart)
  3156. --cameraHandWeld.Part0 = camPart
  3157. --cameraHandWeld.Part1 = cameraHand
  3158. --cameraHandWeld.C0 = CFrame.new(5, 0, 0)
  3159.  
  3160. wait(0.25)
  3161.  
  3162. -- local billNameTag = Instance.new("BillboardGui", char)
  3163. -- billNameTag.Size = UDim2.new(1, 0, 1, 0)
  3164. -- billNameTag.Adornee = head
  3165. -- billNameTag.PlayerToHideFrom = player
  3166. --
  3167. -- local textLabel = Instance.new("TextLabel", billNameTag)
  3168. -- textLabel.Font = "Arcade"
  3169. -- --textLabel.Size = UDim2.new(1, 0, 1, 0)
  3170. -- textLabel.TextScaled = true
  3171. -- --textLabel.TextSize = 100
  3172. -- textLabel.Text = targetName
  3173. -- textLabel.Size = UDim2.new(textLabel.TextBounds.X/100, 0, 0.75, 0)
  3174. -- textLabel.BorderSizePixel = 0
  3175. -- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  3176. -- textLabel.TextColor3 = Color3.new(1, 1, 1)
  3177. -- textLabel.BackgroundTransparency = 0.5
  3178. --
  3179. -- if textLabel.Text == "Depr1" then
  3180. -- textLabel.TextColor3 = Color3.new(1, 0.75, 0)
  3181. -- end
  3182. --
  3183. -- billNameTag.SizeOffset = Vector2.new(-textLabel.TextBounds.X/200 + 0.5, 0)
  3184. -- billNameTag.StudsOffset = Vector3.new(0, 1.5, 0)
  3185.  
  3186.  
  3187. humanoid.Parent = char
  3188.  
  3189. local ticks = 0
  3190. local times = 0
  3191.  
  3192. local walkAnim = 0
  3193. local increaseWalkAnim = 1
  3194.  
  3195. local idleAnimRotX = 0
  3196. local idleAnimRotZ = 0
  3197. local sneaking = 0
  3198.  
  3199. --local RS = game:GetService("RunService").RenderStepped
  3200. local Mouse = player:GetMouse()
  3201.  
  3202. local oldHP = humanoid.Health
  3203. local damageTime = 0
  3204.  
  3205. local punchRotX = 0
  3206. local punchRotY = 0
  3207. local punchRotZ = 0
  3208. local punchRotXcam = 0
  3209. local punchRotYcam = 0
  3210. local punchRotZcam = 0
  3211. local punchSpeed = 0
  3212. local punching = 0
  3213. local selectedBlock = 8
  3214. local punchEnded = 1
  3215. local itemOnHand = nil
  3216.  
  3217. local selectBox = Instance.new("SelectionBox", camera)
  3218. selectBox.Transparency = 0.5
  3219. selectBox.Color3 = Color3.new(0, 0, 0)
  3220. selectBox.LineThickness = 0
  3221.  
  3222.  
  3223. local sound = Instance.new("Sound", char)
  3224. sound.Name = "Hurt"
  3225. sound.Volume = 10
  3226. sound.SoundId = "rbxassetid://535690488"
  3227.  
  3228. local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
  3229. punchneeded = false
  3230. local camCurrentZoom = (camera.CFrame.p - head.Position).magnitude
  3231. Mouse.Button1Down:connect(function()
  3232. punchneeded = true
  3233. end)
  3234. Mouse.Button1Up:connect(function()
  3235. punchneeded = false
  3236. end)
  3237. Mouse.KeyDown:connect(function(key)
  3238. if key == "b" then
  3239. if punchEnded == 1 then punching = 1 end
  3240. end
  3241. end)
  3242.  
  3243. local changedItem = false
  3244. local hasItemOnHand = 0
  3245. local hi = 0
  3246. -- selection thingy
  3247.  
  3248. --
  3249. local oldItemOnHand = itemOnHand
  3250. function updateItemOnHand()
  3251. for _,d in pairs(cameraHandItem:GetChildren()) do
  3252. d:Destroy()
  3253. end
  3254. if itemOnHand ~= nil then
  3255.  
  3256. putTexture(cameraHandItem, itemOnHand.frontTex, itemOnHand.backTex,
  3257. itemOnHand.topTex, itemOnHand.bottomTex,
  3258. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  3259.  
  3260. for _,f in pairs(facesToResize) do
  3261. cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
  3262. cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
  3263. end
  3264.  
  3265. cameraHand.Transparency = 1
  3266. for _,f in pairs(facesToResize) do
  3267. cameraHand:WaitForChild(f).Transparency = 1
  3268. cameraHand:WaitForChild(f).Transparency = 1
  3269. end
  3270. else
  3271. cameraHand.Transparency = 0
  3272. for _,f in pairs(facesToResize) do
  3273. cameraHand:WaitForChild(f).Transparency = 0
  3274. cameraHand:WaitForChild(f).Transparency = 0
  3275. end
  3276. end
  3277. if oldItemOnHand ~= itemOnHand then
  3278. changedItem = true
  3279. end
  3280. end
  3281.  
  3282. local pressedWTimes = 0
  3283. local sprintingNum = 0
  3284. local sprinting = false
  3285. Mouse.KeyDown:connect(function(key)
  3286. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  3287. if (key == "w" and sprinting == false and sneaking == 0) then
  3288. if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
  3289. sprinting = true
  3290. --humanoid.WalkSpeed = humanoid.WalkSpeed * 1.5
  3291. pressedWTimes = 0
  3292. coroutine.resume(coroutine.create(function()
  3293. for i = 1, 24 do
  3294. camera.FieldOfView = camera.FieldOfView + ((24-i)/10)
  3295. RS:wait()
  3296. end
  3297. end))
  3298. end
  3299. pressedWTimes = pressedWTimes + 1
  3300. coroutine.resume(coroutine.create(function()
  3301. for i = 1, 9 do
  3302. if sprinting == true then break end
  3303. wait()
  3304. end
  3305. pressedWTimes = 0
  3306. end))
  3307. end
  3308. if key == "e" then
  3309. if selectedBlock == 8 then
  3310. selectedBlock = 0
  3311. end
  3312.  
  3313. selectedBlock = selectedBlock + 1
  3314. oldItemOnHand = itemOnHand
  3315. itemOnHand = toolBar[selectedBlock + 1]
  3316. coroutine.resume(coroutine.create(function()
  3317. for _,d in pairs(cameraHandItem:GetChildren()) do
  3318. d:Destroy()
  3319. end
  3320. if itemOnHand ~= nil then
  3321.  
  3322. putTexture(cameraHandItem, itemOnHand.frontTex, itemOnHand.backTex,
  3323. itemOnHand.topTex, itemOnHand.bottomTex,
  3324. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  3325.  
  3326. for _,f in pairs(facesToResize) do
  3327. cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
  3328. cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
  3329. end
  3330.  
  3331. cameraHand.Transparency = 1
  3332. for _,f in pairs(facesToResize) do
  3333. cameraHand:WaitForChild(f).Transparency = 1
  3334. cameraHand:WaitForChild(f).Transparency = 1
  3335. end
  3336. else
  3337. cameraHand.Transparency = 0
  3338. for _,f in pairs(facesToResize) do
  3339. cameraHand:WaitForChild(f).Transparency = 0
  3340. cameraHand:WaitForChild(f).Transparency = 0
  3341. end
  3342. end
  3343. if oldItemOnHand ~= itemOnHand then
  3344. changedItem = true
  3345. end
  3346. end))
  3347. if hasItemOnHand == 0 and itemOnHand then hi = 1 end
  3348. if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
  3349. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  3350. end
  3351. end)
  3352. Mouse.KeyUp:connect(function(key)
  3353. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  3354. if (key == "w" and sprinting == true and sneaking == 0) then
  3355. sprinting = false
  3356. --humanoid.WalkSpeed = humanoid.WalkSpeed / 1.5
  3357. coroutine.resume(coroutine.create(function()
  3358. for i = 1, 24 do
  3359. camera.FieldOfView = camera.FieldOfView - ((24-i)/10)
  3360. RS:wait()
  3361. end
  3362. end))
  3363. end
  3364. end)
  3365. firstperson = false
  3366. Mouse.KeyUp:connect(function(key)
  3367. if key == "k" then
  3368. if firstperson == true then
  3369. firstperson = false
  3370. else
  3371. firstperson = true
  3372. end
  3373. end
  3374. end)
  3375. local interrump = false
  3376. game:GetService('RunService'):BindToRenderStep('Camera', Enum.RenderPriority.Camera.Value, function()
  3377. if humanoid.Health < oldHP then
  3378. interrump = true
  3379. RS:wait()
  3380. interrump = false
  3381. for i = 1, 15 do
  3382. if interrump == true then interrump = false break end
  3383. camera.CFrame = camera.CFrame * CFrame.Angles(0, 0, -math.rad(15-i))
  3384. RS:wait()
  3385. end
  3386. end
  3387. end)
  3388.  
  3389. Mouse.TargetFilter = camera
  3390.  
  3391. local dead = false
  3392. local humOffset = CFrame.new(0, 0, 0)
  3393. local camHandY = 0
  3394. local camHandZ = 0
  3395. local cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  3396. --cameraHandWeld = Instance.new("Weld",head)
  3397. --cameraHandWeld.Part0 = head
  3398. --cameraHandWeld.Part1 = cameraHand
  3399. --cameraHandWeld.C0 = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  3400. local bodyRot = CFrame.new(0, 0, 0)
  3401. --local lastCamRot = camPart.Orientation
  3402. while RS:wait() do
  3403. if firstperson == true then
  3404. player.CameraMode = Enum.CameraMode.LockFirstPerson
  3405. else
  3406. player.CameraMode = Enum.CameraMode.Classic
  3407. end
  3408. if punchneeded == true then
  3409. if punchEnded == 1 then punching = 1 end
  3410. end
  3411. --cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  3412. cameraHand.CFrame = camPart.CFrame * cameraHandCFrame
  3413. 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)
  3414.  
  3415. camCurrentZoom = ((CFrame.new(0, -1*sneaking, 0) * camera.CFrame).p - head.Position).magnitude
  3416. if itemOnHand ~= nil then
  3417. hasItemOnHand = 1
  3418. else
  3419. hasItemOnHand = 0
  3420. end
  3421. if humanoid.Health < oldHP then
  3422. damageTime = 60
  3423. --sound:Play()
  3424. end
  3425. oldHP = humanoid.Health
  3426. if damageTime > 0 and humanoid.Health > 0 then
  3427. for _,p in pairs(char:GetChildren()) do
  3428. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  3429. if p.Name == "DamagePart" then
  3430. p.Transparency = 0.5
  3431. end
  3432. end
  3433. end
  3434. damageTime = damageTime - 2
  3435. if damageTime <= 0 then
  3436. for _,p in pairs(char:GetChildren()) do
  3437. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  3438. if p.Name == "DamagePart" then
  3439. p.Transparency = 1
  3440. end
  3441. end
  3442. end
  3443. end
  3444. end
  3445. camPart.CFrame = camera.CFrame
  3446.  
  3447. if getMagnitudeXZ(torso.Velocity) > 1 then
  3448. if walkAnim >= 1 then
  3449. increaseWalkAnim = -1
  3450. elseif walkAnim <= -1 then
  3451. increaseWalkAnim = 1
  3452. end
  3453. walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
  3454. else
  3455. walkAnim = 0
  3456. end
  3457.  
  3458. --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  3459. --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  3460. --
  3461. --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  3462. --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
  3463. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
  3464. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
  3465. --print("-45")
  3466. --end
  3467. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
  3468. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
  3469. --print("45")
  3470. --end
  3471.  
  3472. if changedItem then
  3473. changedItem = false
  3474. coroutine.resume(coroutine.create(function()
  3475. for i = 1, 8 do
  3476. camHandY = camHandY - 0.2
  3477. RS:wait()
  3478. end
  3479. for i = 1, 8 do
  3480. camHandY = camHandY + 0.2
  3481. RS:wait()
  3482. end
  3483. end))
  3484. end
  3485.  
  3486. --move these arms
  3487.  
  3488. if Mouse.Target and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  3489. if Mouse.Target.Parent:FindFirstChild("Humanoid") == nil and Mouse.Target.Parent ~= camera then
  3490. selectBox.Adornee = Mouse.Target
  3491. else
  3492. selectBox.Adornee = nil
  3493. end
  3494. else
  3495. selectBox.Adornee = nil
  3496. end
  3497.  
  3498. --local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  3499.  
  3500. --neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
  3501. --neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
  3502.  
  3503. --print(AngleDifference(camPart.Orientation, torso.Orientation).Y)
  3504.  
  3505. local negate = 1
  3506. if torso.Velocity.Y < 0 then
  3507. negate = -1
  3508. end
  3509.  
  3510. --local vel = math.log(math.abs(torso.Velocity.Y))*negate
  3511. --if vel == math.huge or vel == -math.huge then vel = 0.1 end
  3512. --local vel = torso.Velocity.Y^0.6
  3513.  
  3514. local BobbingY = walkAnim*2
  3515. if BobbingY >= 1 then BobbingY = 1 BobbingY = -BobbingY end
  3516.  
  3517. --local rotationSpeed = AngleDifference(camPart.Orientation, lastCamRot)
  3518.  
  3519. local BobbingX = -0.5 + walkAnim
  3520.  
  3521. --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)
  3522. 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)
  3523.  
  3524. humOffset = humOffset:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  3525. humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
  3526.  
  3527. if player.CameraMode == Enum.CameraMode.Classic then
  3528. cameraHand.Transparency = 1
  3529. for _,t in pairs(cameraHand:GetChildren()) do
  3530. if t.Transparency == 0 then
  3531. t.Transparency = 1
  3532. end
  3533. end
  3534. for _,t in pairs(cameraHandItem:GetChildren()) do
  3535. if t.Transparency == 0 then
  3536. t.Transparency = 1
  3537. end
  3538. end
  3539. else
  3540. changedPerspective = 0
  3541. cameraHand.Transparency = hasItemOnHand
  3542. for _,t in pairs(cameraHand:GetChildren()) do
  3543. if t.Transparency == 1 then
  3544. t.Transparency = hasItemOnHand
  3545. end
  3546. end
  3547. for _,t in pairs(cameraHandItem:GetChildren()) do
  3548. if t.Transparency == 1 then
  3549. t.Transparency = 0
  3550. end
  3551. end
  3552. end
  3553.  
  3554. if updateHand == true then
  3555. updateHand = false
  3556. updateItemOnHand()
  3557. end
  3558.  
  3559. if punching == 1 and punchEnded == 1 then
  3560. punching = 0
  3561. --print("steve uses punch!!")
  3562. local coPunchCam = coroutine.wrap(function()
  3563. local mult = 2.25
  3564. punchRotXcam = 40/2*mult
  3565. punchRotYcam = 25/2*mult
  3566. camHandZ = 2.5
  3567. wait(0.075/4)
  3568. punchRotXcam = 50/2*mult
  3569. punchRotYcam = 25*mult
  3570. punchRotZcam = -10*mult
  3571. camHandZ = 1
  3572. wait(0.075/4)
  3573. punchRotYcam = 50/1.5*mult
  3574. punchRotXcam = -10*mult
  3575. --wait(0.075/2)
  3576. --punchRotYcam = 50
  3577. --punchRotXcam = -10
  3578. wait(0.02)
  3579. punchRotXcam = -20*mult
  3580. wait(0.055)
  3581. camHandZ = 0
  3582. punchRotXcam = 0
  3583. punchRotYcam = 0
  3584. punchRotZcam = 0
  3585. end)
  3586. local coPunch = coroutine.wrap(function()
  3587. punchEnded = 0
  3588. punchSpeed = 1
  3589. punchRotX = -60
  3590. punchRotY = -8
  3591. punchRotZ = -35
  3592.  
  3593. wait(0.075/1.3)
  3594. punchSpeed = 1
  3595. punchRotX = -75
  3596. punchRotY = 8
  3597. punchRotZ = 40
  3598. wait(0.075/1.3)
  3599. punchSpeed = 1
  3600. punchRotX = -20
  3601. punchRotZ = 40
  3602. wait(0.075/1.3)
  3603. punchSpeed = 3.5
  3604. punchRotX = 0
  3605. punchRotY = 0
  3606. punchRotZ = 0
  3607.  
  3608. punchRotXcam = 0
  3609. punchRotYcam = 0
  3610. punchRotZcam = 0
  3611.  
  3612. punchEnded = 1
  3613. wait(0.06/1.3)
  3614. punchSpeed = 0
  3615. end)
  3616. coPunch()
  3617. coPunchCam()
  3618. end
  3619. if ticks > 20 then
  3620. ticks = 0
  3621. if times == 0 then
  3622. times = times + 1
  3623. idleAnimRotX = -1
  3624. idleAnimRotZ = 0
  3625. elseif times == 1 then
  3626. times = times + 1
  3627. idleAnimRotX = -0.75
  3628. idleAnimRotZ = -0.75
  3629. elseif times == 2 then
  3630. times = times + 1
  3631. idleAnimRotX = 0
  3632. idleAnimRotZ = -1
  3633. elseif times == 3 then
  3634. times = times + 1
  3635. idleAnimRotX = 0.75
  3636. idleAnimRotZ = -0.75
  3637. --idleAnimRotX = 0.75
  3638. --idleAnimRotZ = -0
  3639. elseif times == 4 then
  3640. times = times + 1
  3641. idleAnimRotX = 1
  3642. idleAnimRotZ = 0
  3643. --idleAnimRotX = 1
  3644. --idleAnimRotZ = 0
  3645. elseif times == 5 then
  3646. times = times + 1
  3647. idleAnimRotX = 0.75
  3648. idleAnimRotZ = 0.75
  3649. elseif times == 6 then
  3650. times = times + 1
  3651. idleAnimRotX = 0
  3652. idleAnimRotZ = 1
  3653. elseif times == 7 then
  3654. times = 0
  3655. idleAnimRotX = -0.75
  3656. idleAnimRotZ = 0.75
  3657. end
  3658. end
  3659.  
  3660. if hi == 1 then hi = 0 end
  3661. end
  3662. end
  3663. end
  3664. ]],char)
  3665. NLS([[
  3666. local sneaking = 0
  3667. local ticks = 0
  3668. local RS = game:GetService("RunService").RenderStepped
  3669. local player = owner
  3670. local bodyRot = CFrame.new(0, 0, 0)
  3671. local mouse = player:GetMouse()
  3672. mouse.KeyDown:Connect(function(key)
  3673. if key == "q" then
  3674. sneaking = 1
  3675. end
  3676. end)
  3677. mouse.KeyUp:Connect(function(key)
  3678. if key == "q" then
  3679. sneaking = 0
  3680. end
  3681. end)
  3682. char = player.Character
  3683. local head = char:WaitForChild("Head")
  3684. local remoteevent = char:WaitForChild("SteveFunction")
  3685. remoteevent.Name = "SteveEvent"
  3686. local torso = char:WaitForChild("Torso")
  3687. local humanoid = char:WaitForChild("Humanoid")
  3688. humanoid.AutoRotate = false
  3689. neck = torso:WaitForChild("Neck")
  3690. local humRootPart = char:WaitForChild("HumanoidRootPart")
  3691. camera = workspace.CurrentCamera
  3692. local camPart = Instance.new("Part", char)
  3693. camPart.Size = Vector3.new(0, 0, 0)
  3694. camPart.CFrame = camera.CFrame
  3695. camPart.CanCollide = false
  3696. camPart.Anchored = true
  3697. camPart.Transparency = 1
  3698. local lastCamRot = camPart.Orientation
  3699. function AngleDifference(Angle1, Angle2)
  3700. local Difference = {X = 0, Y = 0, Z = 0}
  3701. Difference.X = Angle2.X - Angle1.X
  3702.  
  3703. if (Difference.X > 180) then
  3704. Difference.X = Difference.X - 360
  3705. elseif (Difference.X < -180) then
  3706. Difference.X = Difference.X + 360
  3707. end
  3708.  
  3709. Difference.Y = Angle2.Y - Angle1.Y
  3710.  
  3711. if (Difference.Y > 180) then
  3712. Difference.Y = Difference.Y - 360
  3713. elseif (Difference.Y < -180) then
  3714. Difference.Y = Difference.Y + 360
  3715. end
  3716.  
  3717. Difference.Z = Angle2.Z - Angle1.Z
  3718.  
  3719. if (Difference.Z > 180) then
  3720. Difference.Z = Difference.Z - 360
  3721. elseif (Difference.Z < -180) then
  3722. Difference.Z = Difference.Z + 360
  3723. end
  3724.  
  3725. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  3726. end
  3727. game:GetService("RunService").RenderStepped:Connect(function()
  3728. local remoteevent = char:WaitForChild("SteveEvent")
  3729. camPart.CFrame = camera.CFrame
  3730. local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  3731. local rotX = math.deg(math.atan2(humanoid.MoveDirection.Z, humanoid.MoveDirection.X)) + 90
  3732. if humanoid.MoveDirection ~= Vector3.new(0, 0, 0) then
  3733. --print(rotX)
  3734. bodyRot = bodyRot:lerp(CFrame.Angles(0, -math.rad(rotX), 0), 0.125)
  3735. humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * bodyRot
  3736. end
  3737. local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  3738. neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
  3739. neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
  3740.  
  3741. local oldTorsoOrientation = torso.Orientation
  3742. if AngleDifference(camPart.Orientation, torso.Orientation).Y > 45 then
  3743. 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)
  3744. bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y + 45), 0)
  3745. --print("-45")
  3746. elseif AngleDifference(camPart.Orientation, torso.Orientation).Y < -45 then
  3747. 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)
  3748. bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y - 45), 0)
  3749. --print("45")
  3750. end
  3751.  
  3752. lastCamRot = camPart.Orientation
  3753. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(0, -math.rad(AngleDifference(oldTorsoOrientation, torso.Orientation).Y), 0)
  3754. ticks = ticks + 1
  3755. if owner.Character:WaitForChild("SteveEvent") then
  3756. owner.Character.SteveEvent:FireServer (neck.C0,neck.C1)
  3757. end
  3758. end)
  3759. ]], char)
  3760. local lH = Instance.new("Motor6D", torso)
  3761. lH.Name = "Left Hip"
  3762. lH.Part0 = lLeg
  3763. lH.Part1 = torso
  3764. lH.C0 = CFrame.new(0, 0.975, 0)
  3765. lH.C1 = CFrame.new(0.325, -0.975, 0) * CFrame.Angles(0, 0, 0)
  3766. local rH = Instance.new("Motor6D", torso)
  3767. rH.Name = "Right Hip"
  3768. rH.Part0 = rLeg
  3769. rH.Part1 = torso
  3770. rH.C0 = CFrame.new(0, 0.975, 0)
  3771. rH.C1 = CFrame.new(-0.325, -0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
  3772.  
  3773. local ticks = 0
  3774. local times = 0
  3775.  
  3776. local walkAnim = 0
  3777. local increaseWalkAnim = 1
  3778.  
  3779. local idleAnimRotX = 0
  3780. local idleAnimRotZ = 0
  3781. local sneaking = 0
  3782.  
  3783.  
  3784.  
  3785. local oldHP = humanoid.Health
  3786.  
  3787. local damageTime = 0
  3788. neededtopunch = false
  3789. punchdelay = false
  3790. local punchRotX = 0
  3791. local punchRotY = 0
  3792. local punchRotZ = 0
  3793. local punchSpeed = 0
  3794. local punching = 0
  3795. local selectedBlock = 0
  3796. local punchEnded = 1
  3797. local itemOnHand = nil
  3798. local selectBox = Instance.new("SelectionBox", char)
  3799. selectBox.Adornee = nil
  3800. selectBox.Transparency = 0.5
  3801. selectBox.Color3 = Color3.new(0, 0, 0)
  3802. selectBox.LineThickness = 0
  3803.  
  3804. local handItem = Instance.new("Part", char)
  3805. handItem.Name = "HandItem"
  3806. handItem.Size = Vector3.new(0.52, 0.52, 0.52)
  3807. handItem.Transparency = 1
  3808. handItem.CanCollide = false
  3809.  
  3810. local handItemWeld = Instance.new("Weld", char)
  3811. handItemWeld.Part0 = handItem
  3812. handItemWeld.Part1 = lArm
  3813. handItemWeld.C1 = CFrame.new(0, -0.9, -0.6) * CFrame.Angles(math.rad(-10), math.rad(45), 0)
  3814.  
  3815. local sound = Instance.new("Sound", char)
  3816. sound.Name = "Hurt"
  3817. sound.Volume = 10
  3818. sound.SoundId = "rbxassetid://3362346832"
  3819. if humanoid.Health < oldHP then
  3820. damageTime = 60
  3821. sound:Play()
  3822. end
  3823. reallyispunching = false
  3824. breakingblock = false
  3825. local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
  3826. Mouse.Button1Down:connect(function()
  3827. neededtopunch = true
  3828. reallyispunching = true
  3829. if Mouse.Target and reallyispunching == true then
  3830. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  3831. if Mouse.Target.Name ~= "Baseplate" and Mouse.Target.Name ~= "Debris" and Mouse.Target.Name ~= "Base" then
  3832. local humanoid = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
  3833. if humanoid then
  3834. if diamondswordtoggled == false then
  3835. humanoid.Health = humanoid.Health - 10
  3836. else
  3837. humanoid.Health = humanoid.Health - 35
  3838. end
  3839. local parts = Mouse.Target.Parent:GetChildren()
  3840. for _,p in pairs(parts) do
  3841. if p.ClassName == "Part" then
  3842. 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))
  3843. end
  3844. end
  3845. return
  3846. end
  3847. local blkTar = Mouse.Target
  3848. if blkTar and blkTar.Name ~= "TNTBlock" then
  3849. breakingblock = true
  3850. if not workspace:FindFirstChild("BlockCrack") then
  3851. blkTarCrack = Instance.new("Part",workspace)
  3852. blkTarCrack.Name = "BlockCrack"
  3853. blkTarCrack.Transparency = 1
  3854. blkTarCrack.CanCollide = false
  3855. blkTarCrack.Size = blkTar.Size + Vector3.new(0.005,0.005,0.005)
  3856. local blkTarCrackWeld = Instance.new("Weld",blkTarCrack)
  3857. blkTarCrackWeld.Part0 = blkTar
  3858. blkTarCrackWeld.Part1 = blkTarCrack
  3859. end
  3860. coroutine.resume(coroutine.create(function()
  3861. while wait() do
  3862. if breakingblock == false then
  3863. blkTarCrack:Destroy()
  3864. end
  3865. end
  3866. end))
  3867. crack1 = Instance.new("Texture",blkTarCrack)
  3868. crack1.Face = "Left"
  3869. crack1.Texture = "http://www.roblox.com/asset/?id=448916163"
  3870. crack1.Name = "crack"
  3871. crack1.Color3 = Color3.new(0,0,0)
  3872. crack1.StudsPerTileV= 2.605
  3873. crack1.StudsPerTileU= 2.605
  3874. crack2 = Instance.new("Texture",blkTarCrack)
  3875. crack2.Face = "Bottom"
  3876. crack2.Texture = "http://www.roblox.com/asset/?id=448916163"
  3877. crack2.Name = "crack"
  3878. crack2.Color3 = Color3.new(0,0,0)
  3879. crack2.StudsPerTileV= 2.605
  3880. crack2.StudsPerTileU= 2.605
  3881. crack3 = Instance.new("Texture",blkTarCrack)
  3882. crack3.Face = "Top"
  3883. crack3.Texture = "http://www.roblox.com/asset/?id=448916163"
  3884. crack3.Name = "crack"
  3885. crack3.Color3 = Color3.new(0,0,0)
  3886. crack3.StudsPerTileV= 2.605
  3887. crack3.StudsPerTileU= 2.605
  3888. crack4 = Instance.new("Texture",blkTarCrack)
  3889. crack4.Face = "Back"
  3890. crack4.Texture = "http://www.roblox.com/asset/?id=448916163"
  3891. crack4.Name = "crack"
  3892. crack4.Color3 = Color3.new(0,0,0)
  3893. crack4.StudsPerTileV= 2.605
  3894. crack4.StudsPerTileU= 2.605
  3895. crack5 = Instance.new("Texture",blkTarCrack)
  3896. crack5.Face = "Right"
  3897. crack5.Texture = "http://www.roblox.com/asset/?id=448916163"
  3898. crack5.Name = "crack"
  3899. crack5.StudsPerTileV= 2.605
  3900. crack5.StudsPerTileU= 2.605
  3901. crack5.Color3 = Color3.new(0,0,0)
  3902. crack6 = Instance.new("Texture",blkTarCrack)
  3903. crack6.Face = "Front"
  3904. crack6.Texture = "http://www.roblox.com/asset/?id=448916163"
  3905. crack6.Name = "crack"
  3906. crack6.Color3 = Color3.new(0,0,0)
  3907. crack6.StudsPerTileV= 2.605
  3908. crack6.StudsPerTileU= 2.605
  3909. if breakingblock == false then
  3910. blkTarCrack:Destroy()
  3911. end
  3912. for i,v in pairs(blkTarCrack:GetChildren()) do
  3913. if v.Name == "crack" then
  3914. v.Texture = "rbxassetid://448916452"
  3915. end
  3916. end
  3917. wait(0.7)
  3918. for i,v in pairs(blkTarCrack:GetChildren()) do
  3919. if v.Name == "crack" then
  3920. v.Texture = "rbxassetid://448916989"
  3921. end
  3922. end
  3923. wait(0.7)
  3924. for i,v in pairs(blkTarCrack:GetChildren()) do
  3925. if v.Name == "crack" then
  3926. v.Texture = "rbxassetid://448917080"
  3927. end
  3928. end
  3929. if breakingblock == true and blkTarCrack then
  3930. wait(0.7)
  3931. blkTar:Destroy()
  3932. blkTarCrack.Parent = nil
  3933. for i,v in pairs(blkTarCrack:GetChildren()) do
  3934. v:Destroy()
  3935. end
  3936. for i = 1, 9 do
  3937. local part = Instance.new("Part", workspace)
  3938. part.Size = Vector3.new(0, 0, 0)
  3939. part.Transparency = 1
  3940. part.CanCollide = false
  3941. part.Velocity = Vector3.new(math.random(-5, 5), 5, math.random(-5, 5))
  3942. part.Name = "Debris"
  3943.  
  3944. part.CFrame =
  3945. Mouse.Target.CFrame *
  3946. 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))
  3947.  
  3948. part.CustomPhysicalProperties = PhysicalProperties.new(0, 0.2, 0, 100, 100)
  3949.  
  3950. local billboard = Instance.new("BillboardGui", part)
  3951. billboard.Size = UDim2.new(1.2, 0, 1.2, 0)
  3952.  
  3953. local clipDescendant = Instance.new("TextLabel", billboard)
  3954. clipDescendant.Size = UDim2.new(0.5, 0, 0.5, 0)
  3955. clipDescendant.BackgroundTransparency = 1
  3956. clipDescendant.Text = ""
  3957. clipDescendant.ClipsDescendants = true
  3958.  
  3959. local img = Instance.new("ImageLabel", clipDescendant)
  3960. img.Size = UDim2.new(2, 0, 2, 0)
  3961. img.BackgroundTransparency = 1
  3962. img.Position = UDim2.new(math.random(-70, 70)/100, 0, math.random(-70, 70)/100, 0)
  3963.  
  3964. local tex = blkTar:FindFirstChild("Front")
  3965. if tex then
  3966. img.Image = tex.Texture
  3967. else
  3968. img.Image = "rbxassetid://744949545"
  3969. end
  3970.  
  3971. if img.Image == "rbxassetid://744949545" then
  3972. img.ImageColor3 = blkTar.Color
  3973. end
  3974.  
  3975. part.Touched:connect(function(prt)
  3976. if prt ~= blkTar then
  3977. part.CanCollide = true
  3978. end
  3979. end)
  3980.  
  3981. coroutine.resume(coroutine.create(function()
  3982. wait(math.random(50, 65)/100)
  3983. part:Destroy()
  3984. end))
  3985. --part.Anchored = false
  3986. end
  3987. end
  3988.  
  3989. while wait() do
  3990. if breakingblock == false then
  3991. blkTarCrack:Destroy()
  3992. end
  3993. end
  3994. end
  3995.  
  3996. local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
  3997. if humanoid then
  3998. humanoid.Health = humanoid.Health - damage
  3999. --humanoid.Health:TakeDamage(10)
  4000. local parts = Mouse.Target.Parent:GetChildren()
  4001. for _,p in pairs(parts) do
  4002. if p.ClassName == "Part" then
  4003. 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))
  4004. end
  4005. end
  4006. return
  4007. end
  4008. local x = Mouse.Target.CFrame.p.X
  4009. local y = Mouse.Target.CFrame.p.Y
  4010. local z = Mouse.Target.CFrame.p.Z
  4011. if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
  4012. if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
  4013. if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
  4014. if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
  4015. if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
  4016. if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
  4017. if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
  4018. x = Mouse.Hit.p.X
  4019. y = Mouse.Hit.p.Y
  4020. z = Mouse.Hit.p.Z
  4021. end
  4022. -- local x = round(math.abs(mouseX)/2.6)*2.6
  4023. -- local y = round(math.abs(mouseY)/2.6)*2.6
  4024. -- local z = round(math.abs(mouseZ)/2.6)*2.6
  4025. -- if Mouse.Hit.p.X < 0 then x = x * -1 end
  4026. -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
  4027. -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
  4028. end
  4029. end
  4030. end
  4031. end)
  4032. Mouse.Button1Up:connect(function()
  4033. reallyispunching = false
  4034. breakingblock = false
  4035. neededtopunch = false
  4036. end)
  4037. signremote = Instance.new("RemoteEvent",char)
  4038. signremote.Name = "SignRemote"
  4039. function placeSign()
  4040. thesignguiisthere = true
  4041. local signgui = Instance.new("ScreenGui",player.PlayerGui)
  4042. local Frame = Instance.new("Frame",signgui)
  4043. local closebutton = Instance.new("TextButton",Frame)
  4044. local signguitext = Instance.new("TextBox",Frame)
  4045. Frame.BackgroundTransparency = 1
  4046. Frame.Size = UDim2.new(1, 0,1, 0)
  4047. Frame.Position = UDim2.new(0, 0,0, 0)
  4048. signguitext.PlaceholderText = "Text Here for sign"
  4049. signguitext.ClearTextOnFocus = false
  4050. signguitext.Font = "Arcade"
  4051. signguitext.Position = UDim2.new(0, 50,0, -1)
  4052. signguitext.Size = UDim2.new(1, 0,0.50, 0)
  4053. signguitext.TextColor3 = Color3.fromRGB(255, 255, 255)
  4054. signguitext.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  4055. signguitext.TextStrokeTransparency = 1
  4056. signguitext.BackgroundTransparency = 0.5
  4057. signguitext.TextSize = 100
  4058. signguitext.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  4059. closebutton.Text = "close sign gui"
  4060. closebutton.Font = "Arcade"
  4061. closebutton.Position = UDim2.new(0, 1,0, 1)
  4062. closebutton.Size = UDim2.new(0.10, 0,0.10, 0)
  4063. closebutton.TextColor3 = Color3.fromRGB(255, 255, 255)
  4064. closebutton.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  4065. closebutton.TextStrokeTransparency = 1
  4066. closebutton.BackgroundTransparency = 0
  4067. closebutton.TextScaled = true
  4068. closebutton.BackgroundColor3 = Color3.fromRGB(255, 148, 148)
  4069. closebutton.MouseButton1Click:Connect(function()
  4070. signgui:Destroy()
  4071. thesignguiisthere = false
  4072. end)
  4073. local signmodel = Instance.new("Model",workspace:WaitForChild("Signs"))
  4074. local Signpart1 = Instance.new("Part", signmodel)
  4075. putTexture(Signpart1, "rbxassetid://3258599312", "rbxassetid://3258599312",
  4076. "rbxassetid://3258599312","rbxassetid://3258599312",
  4077. "rbxassetid://3258599312","rbxassetid://3258599312", "Texture")
  4078. Signpart1.Anchored = true
  4079. Signpart1.Size = Vector3.new(0.332, 1.83, 0.332)
  4080. local Signpart2 = Instance.new("Part", signmodel)
  4081. putTexture(Signpart2, "rbxassetid://152572161", "rbxassetid://152572161",
  4082. "rbxassetid://152572161","rbxassetid://152572161",
  4083. "rbxassetid://152572161","rbxassetid://152572161", "Texture")
  4084. Signpart2.Anchored = false
  4085. local signtext = Instance.new("SurfaceGui",Signpart2)
  4086. local signtext2 = Instance.new("TextLabel",signtext)
  4087. signtext.Face = "Back"
  4088. Signpart2.Size = Vector3.new(2.988, 1.996, 0.332)
  4089. signtext2.Size = UDim2.new(1,0,1,0)
  4090. signtext2.BackgroundTransparency = 1
  4091. signtext2.TextSize = 100
  4092. signtext2.Font = "Arcade"
  4093. signremote.OnServerEvent:Connect(function(b1)
  4094. signtext2.Text = b1
  4095. end)
  4096. Signpart1.CFrame = torso.CFrame * CFrame.new(0,-torso.Size.Y,-3)
  4097. for _,f in pairs(facesToResize) do
  4098. Signpart1:WaitForChild(f).StudsPerTileU = 2.6
  4099. Signpart1:WaitForChild(f).StudsPerTileV = 2.6
  4100. end
  4101. for _,f in pairs(facesToResize) do
  4102. Signpart2:WaitForChild(f).StudsPerTileU = 2.6
  4103. Signpart2:WaitForChild(f).StudsPerTileV = 2.6
  4104. end
  4105. wait(0.00)
  4106. Signpart1.Anchored = true
  4107. Signpart1.CFrame = CFrame.new(SnapToGrid(Signpart1.CFrame.X, 2.6), SnapToGrid(Signpart1.CFrame.Y, 2.6), SnapToGrid(Signpart1.CFrame.Z, 2.6))
  4108. Signpart1.Orientation = Vector3.new(0,torso.Orientation.Y,0)
  4109. signweld = Instance.new("Weld",Signpart1)
  4110. signweld.Part0 = Signpart1
  4111. signweld.Part1 = Signpart2
  4112. signweld.C0 = CFrame.new(0, 1.91, 0)
  4113. NLS([[
  4114. script.Parent.Changed:Connect(function()
  4115. signremote = script.Parent.Parent.Parent.Parent.Parent.Character:WaitForChild("SignRemote")
  4116. signremote:FireServer(script.Parent.Text,)
  4117. end)
  4118. ]],signguitext)
  4119. while thesignguiisthere == true do
  4120. signtext2.Text = signguitext.Text
  4121. wait(0.00)
  4122. end
  4123. end
  4124. function placeBlock(block, cFPos)
  4125. local blockPlaced = Instance.new("Part", workspace)
  4126. if block.name ~= "TNT" then
  4127. blockPlaced.Material = "Granite"
  4128. else
  4129. blockPlaced.Material = "SmoothPlastic"
  4130. end
  4131. blockPlaced.Anchored = false
  4132. blockPlaced.Size = block.size
  4133. blockPlaced.CFrame = cFPos
  4134. if block.name ~= "TNT" then
  4135. blockPlaced.Transparency = 1
  4136. end
  4137. local blockvalue = Instance.new("BoolValue",blockPlaced)
  4138. blockvalue.Name = "IsBlock"
  4139. blockvalue.Value = true
  4140. if block.name == "TNT" then
  4141. Part0 = blockPlaced
  4142. Part0.Anchored = true
  4143. Decal1 = Instance.new("Decal")
  4144. Decal2 = Instance.new("Decal")
  4145. Decal3 = Instance.new("Decal")
  4146. Decal4 = Instance.new("Decal")
  4147. Decal5 = Instance.new("Decal")
  4148. Decal6 = Instance.new("Decal")
  4149. Sound8 = Instance.new("Sound")
  4150. Sound9 = Instance.new("Sound")
  4151. Camera10 = Instance.new("Camera")
  4152. ParticleEmitter11 = Instance.new("ParticleEmitter")
  4153. Part0.Name = "TNTBlock"
  4154. Part0.Color = Color3.new(0.972549, 0.972549, 0.972549)
  4155. Part0.Size = Vector3.new(3, 3, 3)
  4156. Part0.BottomSurface = Enum.SurfaceType.Smooth
  4157. Part0.BrickColor = BrickColor.new("Institutional white")
  4158. Part0.Material = Enum.Material.Fabric
  4159. Part0.TopSurface = Enum.SurfaceType.Smooth
  4160. Part0.brickColor = BrickColor.new("Institutional white")
  4161. Part0.Anchored = true
  4162. Decal1.Name = "TNT Bottom"
  4163. Decal1.Parent = Part0
  4164. Decal1.Texture = "http://www.roblox.com/asset/?id=118557091"
  4165. Decal1.Face = Enum.NormalId.Bottom
  4166. Decal2.Name = "TNT TOP"
  4167. Decal2.Parent = Part0
  4168. Decal2.Texture = "http://www.roblox.com/asset/?id=2748239465"
  4169. Decal2.Face = Enum.NormalId.Top
  4170. Decal3.Name = "tnt side"
  4171. Decal3.Parent = Part0
  4172. Decal3.Texture = "http://www.roblox.com/asset/?id=3891642918"
  4173. Decal3.Face = Enum.NormalId.Right
  4174. Decal4.Name = "tnt side"
  4175. Decal4.Parent = Part0
  4176. Decal4.Texture = "http://www.roblox.com/asset/?id=3891642918"
  4177. Decal5.Name = "tnt side"
  4178. Decal5.Parent = Part0
  4179. Decal5.Texture = "http://www.roblox.com/asset/?id=3891642918"
  4180. Decal5.Face = Enum.NormalId.Left
  4181. Decal6.Name = "tnt side"
  4182. Decal6.Parent = Part0
  4183. Decal6.Texture = "http://www.roblox.com/asset/?id=3891642918"
  4184. Decal6.Face = Enum.NormalId.Back
  4185. local fuse = 0.5
  4186. Sound8.Name = "Creeper Hissing"
  4187. Sound8.Parent = Part0
  4188. Sound8.SoundId = "rbxassetid://907668984"
  4189. Sound9.Name = "TNT_BOOM"
  4190. Sound9.Parent = Part0
  4191. Sound9.TimePosition = 2
  4192. Sound9.SoundId = "rbxassetid://3542426596"
  4193. Camera10.Name = "ThumbnailCamera"
  4194. Camera10.Parent = Part0
  4195. 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)
  4196. 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)
  4197. Camera10.Focus = CFrame.new(-84.6090164, 3.5899179, 37.5948563, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  4198. Camera10.focus = CFrame.new(-84.6090164, 3.5899179, 37.5948563, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  4199. ParticleEmitter11.Parent = Part0
  4200. ParticleEmitter11.Speed = NumberRange.new(9, 9)
  4201. ParticleEmitter11.Enabled = false
  4202. ParticleEmitter11.Texture = "rbxassetid://1494734425"
  4203. ParticleEmitter11.Size = NumberSequence.new(4,4)
  4204. ParticleEmitter11.Lifetime = NumberRange.new(1, 1)
  4205. ParticleEmitter11.Rate = 500
  4206. ParticleEmitter11.SpreadAngle = Vector2.new(3050, 30)
  4207. ParticleEmitter11.VelocitySpread = 3050
  4208. de = Instance.new("ClickDetector",Part0)
  4209. de.MouseClick:Connect(function()
  4210. Part0.Anchored = false
  4211. Part0.Velocity = Vector3.new(math.random(-5,5),10,math.random(-5,5))
  4212. Part0["Creeper Hissing"]:Play()
  4213. for i = 0,15 do
  4214. for i,v in pairs(Part0:GetChildren()) do
  4215. if v.ClassName == "Decal" then
  4216. v.Transparency = 1
  4217. end
  4218. end
  4219. Part0.Material = "SmoothPlastic"
  4220. wait(fuse)
  4221. for i,v in pairs(Part0:GetChildren()) do
  4222. if v.ClassName == "Decal" then
  4223. v.Transparency = 0
  4224. end
  4225. end
  4226. Part0.Material = "Fabric"
  4227. fuse = fuse - 0.07
  4228. if fuse <= 0.25 then
  4229. Part0.Size = Part0.Size + Vector3.new(0.1,0.1,0.1)
  4230. end
  4231. wait(fuse)
  4232. end
  4233. local explosion = Instance.new("Explosion",workspace)
  4234. explosion.BlastPressure = 400000
  4235. explosion.BlastRadius = 10
  4236. explosion.Position = Part0.Position
  4237. explosion.Hit:Connect(function(blkTar)
  4238. if blkTar ~= Part0 then
  4239. if blkTar.Parent:FindFirstChildOfClass("Humanoid") then
  4240. blkTar.Parent:FindFirstChildOfClass("Humanoid").Health = blkTar.Parent:FindFirstChildOfClass("Humanoid").Health - 39
  4241. else
  4242. blkTar:Destroy()
  4243. end
  4244. end
  4245. end)
  4246. Part0.Anchored = true
  4247. Part0.Transparency = 1
  4248. for i,v in pairs(Part0:GetChildren()) do
  4249. if v.ClassName == "Decal" then
  4250. v.Transparency = 1
  4251. end
  4252. end
  4253. Part0.CanCollide = false
  4254. Part0.TNT_BOOM:Play()
  4255. --Part0.TNT_BOOM.PlaybackSpeed = math.random(0,1).."."..math.random(0,9)
  4256. smoke = Part0.ParticleEmitter
  4257. smoke.Enabled = true
  4258. wait(0.07)
  4259.  
  4260. smoke.Enabled = false
  4261. wait(1)
  4262. Part0:Destroy()
  4263. end)
  4264. end
  4265. if block.hasGravity == true then
  4266. local connectedTo = Instance.new("ObjectValue", blockPlaced)
  4267. connectedTo.Name = "ConnectedTo"
  4268. blockPlaced.Anchored = false
  4269. blockPlaced.CanCollide = false
  4270. local detector = Instance.new("Part", workspace:WaitForChild("Camera"))
  4271. detector.Transparency = 1
  4272. detector.CanCollide = false
  4273. detector.Size = Vector3.new(1, 0, 1)
  4274. local weldDetector = Instance.new("Motor6D", detector)
  4275. weldDetector.Part0 = detector
  4276. weldDetector.Part1 = blockPlaced
  4277. weldDetector.C1 = CFrame.new(0, -blockPlaced.Size.Y/2, 0)
  4278. local landed = false
  4279. local function fallingBlock()
  4280. coroutine.resume(coroutine.create(function()
  4281. local falling = blockPlaced:FindFirstChild("IsFalling") or Instance.new("CFrameValue", blockPlaced)
  4282. falling.Name = "IsFalling"
  4283. local grav = 0
  4284. while RS:wait() do
  4285. if landed then falling:Destroy() break end
  4286. grav = math.max(-1, grav - 0.0025)
  4287. --blockPlaced.CFrame = CFrame.new(cFPos.X, blockPlaced.CFrame.Y + grav, cFPos.Z)
  4288. end
  4289. end))
  4290. end
  4291. fallingBlock()
  4292. detector.Touched:connect(function(part)
  4293. if blockPlaced.Anchored == false and part ~= blockPlaced and part.Name ~= "Debris" and part:FindFirstChild("IsFalling") == nil and findHumanoid(part) == nil then
  4294. landed = true
  4295. blockPlaced.CanCollide = true
  4296. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  4297. blockPlaced.Anchored = true
  4298. connectedTo.Value = part
  4299. local yOrigin = part.CFrame.Y + (blockPlaced.Size.Y/2) + (part.Size.Y/2)
  4300. blockPlaced.CFrame = CFrame.new(cFPos.X, yOrigin, cFPos.Z)
  4301. --detector:Destroy()
  4302. local falling = false
  4303. part.Changed:connect(function()
  4304. if part.Position.Y ~= yOrigin and falling == false then
  4305. falling = true
  4306. wait(0.075)
  4307. landed = false
  4308. blockPlaced.Anchored = false
  4309. blockPlaced.CanCollide = false
  4310. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  4311. fallingBlock()
  4312. falling = false
  4313. end
  4314. end)
  4315. workspace.ChildRemoved:connect(function()
  4316. --print("hi")
  4317. if connectedTo.Value.Parent == nil and falling == false then
  4318. falling = true
  4319. landed = false
  4320. blockPlaced.Anchored = false
  4321. blockPlaced.CanCollide = false
  4322. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  4323. fallingBlock()
  4324. end
  4325. end)
  4326. end
  4327. end)
  4328. end
  4329. if block.name ~= "TNT" then
  4330. putTexture(blockPlaced, block.frontTex, block.backTex,
  4331. block.topTex, block.bottomTex, block.leftTex, block.rightTex, "Texture")
  4332. end
  4333. local blockSound = Instance.new("Sound", blockPlaced)
  4334. blockSound.SoundId = block.sound
  4335. blockSound.Volume = block.soundVol
  4336. blockSound.Pitch = math.random(95, 105)/100
  4337. blockSound.PlayOnRemove = true
  4338. blockSound:Play()
  4339. return blockPlaced
  4340. end
  4341. Mouse.KeyDown:Connect(function(key)
  4342. if key == "b" then
  4343. if not workspace:FindFirstChild("Blocks") then
  4344. local folder = Instance.new("Folder",workspace)
  4345. folder.Name = "Blocks"
  4346. end
  4347. if punchEnded == 1 then punching = 1 end
  4348. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  4349. local x = Mouse.Hit.p.X
  4350. local y = Mouse.Hit.p.Y
  4351. local z = Mouse.Hit.p.Z
  4352. local blk = placeBlock(toolBar[selectedBlock + 1], CFrame.new(x, y, z))
  4353. blk.Parent = workspace:WaitForChild("Blocks")
  4354. for _,f in pairs(facesToResize) do
  4355. blk:WaitForChild(f).StudsPerTileU = 2.6
  4356. blk:WaitForChild(f).StudsPerTileV = 2.6
  4357. end
  4358. wait(0.03)
  4359. BodyForce:Destroy()
  4360. blk.Anchored = true
  4361. blk.CFrame = CFrame.new(SnapToGrid(blk.CFrame.X, 2.6), SnapToGrid(blk.CFrame.Y, 2.6), SnapToGrid(blk.CFrame.Z, 2.6))
  4362. end
  4363. end
  4364. end)
  4365. diamondswordselected = false
  4366. function snap(part)
  4367. coroutine.resume(coroutine.create(function()
  4368. part.Name = "Dust"
  4369. part.Anchored = true
  4370. part.CanCollide = true
  4371. local smoke = Instance.new("ParticleEmitter", part)
  4372. smoke.Size = NumberSequence.new({
  4373. NumberSequenceKeypoint.new(0, 0.6),
  4374. NumberSequenceKeypoint.new(1, 0.6)
  4375. })
  4376. coroutine.resume(coroutine.create(function()
  4377. while wait(0.1) do
  4378. part.Transparency = part.Transparency + 1
  4379. end
  4380. end))
  4381. smoke.Texture = "rbxassetid://1494734425"
  4382. smoke.Rate = 100
  4383. smoke.Lifetime = NumberRange.new(0.6, 1.2)
  4384. smoke.Speed = NumberRange.new(2, 5)
  4385. smoke.SpreadAngle = Vector2.new(-30, 30)
  4386.  
  4387. wait(0.07)
  4388.  
  4389. smoke.Enabled = false
  4390.  
  4391. wait(2)
  4392.  
  4393. part:Destroy()
  4394. end))
  4395. end
  4396. Mouse.KeyDown:Connect(function(key)
  4397. if key == "n" and player.Name == "ManSolomon" or player.Name == "noah878788" then
  4398. if Mouse.Target.Parent.ClassName == "Accessory" then
  4399. accessory = Mouse.Target.Parent
  4400. if accessory.Parent:FindFirstChildOfClass("Humanoid") and not accessory.Parent:FindFirstChildOfClass("Humanoid").Name == "SteveVR" then
  4401. local snapped = accessory.Parent
  4402. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  4403. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  4404. snap(snapped.Head)
  4405. wait()
  4406. for i,v in pairs(snapped:GetChildren()) do
  4407. if v.ClassName == "Accessory" then
  4408. snap(v.Handle)
  4409. end
  4410. end
  4411. snap(snapped.RightUpperArm)
  4412. wait()
  4413. snap(snapped.UpperTorso)
  4414. wait()
  4415. snap(snapped.RightLowerArm)
  4416. wait()
  4417. snap(snapped.LeftUpperArm)
  4418. wait()
  4419. snap(snapped.LowerTorso)
  4420. wait()
  4421. snap(snapped.RightHand)
  4422. wait()
  4423. snap(snapped.LeftLowerArm)
  4424. wait()
  4425. snap(snapped.RightUpperLeg)
  4426. wait()
  4427. snap(snapped.LeftHand)
  4428. wait()
  4429. snap(snapped.RightLowerLeg)
  4430. wait()
  4431. snap(snapped.LeftUpperLeg)
  4432. wait()
  4433. snap(snapped.RightFoot)
  4434. wait()
  4435. snap(snapped.LeftLowerLeg)
  4436. wait()
  4437. snap(snapped.LeftFoot)
  4438. else
  4439. snap(snapped.Head)
  4440. wait()
  4441. for i,v in pairs(snapped:GetChildren()) do
  4442. if v.ClassName == "Accessory" then
  4443. snap(v.Handle)
  4444. end
  4445. end
  4446. snap(snapped["Right Arm"])
  4447. wait()
  4448. snap(snapped.Torso)
  4449. wait()
  4450. snap(snapped["Right Leg"])
  4451. wait()
  4452. snap(snapped["Left Arm"])
  4453. wait()
  4454. snap(snapped["Left Leg"])
  4455. end
  4456. end
  4457. end
  4458. if Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") and accessory.Parent:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
  4459. local snapped = Mouse.Target.Parent
  4460. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  4461. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  4462. snap(snapped.Head)
  4463. wait()
  4464. for i,v in pairs(snapped:GetChildren()) do
  4465. if v.ClassName == "Accessory" then
  4466. snap(v.Handle)
  4467. end
  4468. end
  4469. snap(snapped.RightUpperArm)
  4470. wait()
  4471. snap(snapped.UpperTorso)
  4472. wait()
  4473. snap(snapped.RightLowerArm)
  4474. wait()
  4475. snap(snapped.LeftUpperArm)
  4476. wait()
  4477. snap(snapped.LowerTorso)
  4478. wait()
  4479. snap(snapped.RightHand)
  4480. wait()
  4481. snap(snapped.LeftLowerArm)
  4482. wait()
  4483. snap(snapped.RightUpperLeg)
  4484. wait()
  4485. snap(snapped.LeftHand)
  4486. wait()
  4487. snap(snapped.RightLowerLeg)
  4488. wait()
  4489. snap(snapped.LeftUpperLeg)
  4490. wait()
  4491. snap(snapped.RightFoot)
  4492. wait()
  4493. snap(snapped.LeftLowerLeg)
  4494. wait()
  4495. snap(snapped.LeftFoot)
  4496. else
  4497. snap(snapped.Head)
  4498. wait()
  4499. for i,v in pairs(snapped:GetChildren()) do
  4500. if v.ClassName == "Accessory" then
  4501. snap(v.Handle)
  4502. end
  4503. end
  4504. snap(snapped["Right Arm"])
  4505. wait()
  4506. snap(snapped.Torso)
  4507. wait()
  4508. snap(snapped["Right Leg"])
  4509. wait()
  4510. snap(snapped["Left Arm"])
  4511. wait()
  4512. snap(snapped["Left Leg"])
  4513. end
  4514. end
  4515. end
  4516. end)
  4517. Mouse.KeyDown:Connect(function(key)
  4518. if key == "j" and player.Name == "ManSolomon" or player.Name == "noah878788" then
  4519. for i,v in pairs(game.Workspace:GetChildren()) do
  4520. if v:FindFirstChildOfClass("Humanoid") and v.Name ~= player.Name and v:FindFirstChildOfClass("Humanoid").Name ~= "SteveVR" then
  4521. coroutine.resume(coroutine.create(function()
  4522. local snapped = v
  4523. snapped:FindFirstChildOfClass("Humanoid").Health = 0
  4524. if snapped:FindFirstChildOfClass("Humanoid").RigType == Enum.HumanoidRigType.R15 then
  4525. snap(snapped.Head)
  4526. wait()
  4527. for i,v in pairs(snapped:GetChildren()) do
  4528. if v.ClassName == "Accessory" then
  4529. snap(v.Handle)
  4530. end
  4531. end
  4532. snap(snapped.RightUpperArm)
  4533. wait()
  4534. snap(snapped.UpperTorso)
  4535. wait()
  4536. snap(snapped.RightLowerArm)
  4537. wait()
  4538. snap(snapped.LeftUpperArm)
  4539. wait()
  4540. snap(snapped.LowerTorso)
  4541. wait()
  4542. snap(snapped.RightHand)
  4543. wait()
  4544. snap(snapped.LeftLowerArm)
  4545. wait()
  4546. snap(snapped.RightUpperLeg)
  4547. wait()
  4548. snap(snapped.LeftHand)
  4549. wait()
  4550. snap(snapped.RightLowerLeg)
  4551. wait()
  4552. snap(snapped.LeftUpperLeg)
  4553. wait()
  4554. snap(snapped.RightFoot)
  4555. wait()
  4556. snap(snapped.LeftLowerLeg)
  4557. wait()
  4558. snap(snapped.LeftFoot)
  4559. else
  4560. snap(snapped.Head)
  4561. wait()
  4562. for i,v in pairs(snapped:GetChildren()) do
  4563. if v.ClassName == "Accessory" then
  4564. snap(v.Handle)
  4565. end
  4566. end
  4567. snap(snapped["Right Arm"])
  4568. wait()
  4569. snap(snapped.Torso)
  4570. wait()
  4571. snap(snapped["Right Leg"])
  4572. wait()
  4573. snap(snapped["Left Arm"])
  4574. wait()
  4575. snap(snapped["Left Leg"])
  4576. end
  4577. end))
  4578. end
  4579. end
  4580. end
  4581. end)
  4582. Mouse.KeyDown:Connect(function(key)
  4583. if key == "p" then
  4584. if not workspace:FindFirstChild("Signs") then
  4585. local folder = Instance.new("Folder",workspace)
  4586. folder.Name = "Signs"
  4587. end
  4588. if punchEnded == 1 then punching = 1 end
  4589. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  4590. local x = Mouse.Hit.p.X
  4591. local y = Mouse.Hit.p.Y
  4592. local z = Mouse.Hit.p.Z
  4593. placeSign()
  4594. end
  4595. end
  4596. end)
  4597. Mouse.KeyDown:Connect(function(key)
  4598. if key == "p" then
  4599. if not workspace:FindFirstChild("Signs") then
  4600. local folder = Instance.new("Folder",workspace)
  4601. folder.Name = "Signs"
  4602. end
  4603. if punchEnded == 1 then punching = 1 end
  4604. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  4605. local x = Mouse.Hit.p.X
  4606. local y = Mouse.Hit.p.Y
  4607. local z = Mouse.Hit.p.Z
  4608. placeSign()
  4609. end
  4610. end
  4611. end)
  4612. diamondswordtoggled = false
  4613. Mouse.KeyDown:Connect(function(key)
  4614. if key == "f" then
  4615. if diamondswordtoggled == true then
  4616. diamondswordtoggled = false
  4617. else
  4618. diamondswordtoggled = true
  4619. end
  4620. end
  4621. end)
  4622.  
  4623. local changedItem = false
  4624. local hasItemOnHand = 0
  4625. local hi = 0
  4626. -- selection thingy
  4627. local selectLabel = Instance.new("TextLabel", gui)
  4628. selectLabel.Size = UDim2.new(0, 32, 0, 32)
  4629. selectLabel.Position = UDim2.new(0.5, -160 + (selectedBlock*40), 1, -105)
  4630. selectLabel.BackgroundTransparency = 1
  4631. selectLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  4632. selectLabel.BorderSizePixel = 0
  4633. selectLabel.Text = ""
  4634. selectLabel.ZIndex = 3
  4635. makeSquare(UDim2.new(0, -2, 0, 0), UDim2.new(0, 2, 0, 32),
  4636. Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
  4637. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 32, 0, 2),
  4638. Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
  4639. makeSquare(UDim2.new(0, -2, 0, 32), UDim2.new(0, 36, 0, 2),
  4640. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  4641. makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 32),
  4642. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  4643. makeSquare(UDim2.new(0, 34, 0, -4), UDim2.new(0, 2, 0, 40),
  4644. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  4645. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 40),
  4646. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  4647. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
  4648. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  4649. makeSquare(UDim2.new(0, 32, 0, -2), UDim2.new(0, 2, 0, 2),
  4650. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  4651. makeSquare(UDim2.new(0, -4, 0, 34), UDim2.new(0, 40, 0, 2),
  4652. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  4653. makeSquare(UDim2.new(0, -6, 0, -6), UDim2.new(0, 2, 0, 42),
  4654. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  4655. makeSquare(UDim2.new(0, -6, 0, -6), UDim2.new(0, 42, 0, 2),
  4656. Color3.new(212/255, 231/255, 207/255), 0, selectLabel, 3)
  4657. makeSquare(UDim2.new(0, 36, 0, -4), UDim2.new(0, 2, 0, 40),
  4658. Color3.new(88/255, 102/255, 85/255), 0, selectLabel, 3)
  4659. makeSquare(UDim2.new(0, 36, 0, -6), UDim2.new(0, 2, 0, 2),
  4660. Color3.new(163/255, 180/255, 159/255), 0, selectLabel, 3)
  4661. makeSquare(UDim2.new(0, 38, 0, -6), UDim2.new(0, 2, 0, 44),
  4662. Color3.new(0/255, 0/255, 0/255), 0.3, selectLabel, 3)
  4663. makeSquare(UDim2.new(0, -8, 0, -6), UDim2.new(0, 2, 0, 44),
  4664. Color3.new(0/255, 0/255, 0/255), 0.3, selectLabel, 3)
  4665. makeSquare(UDim2.new(0, -8, 0, -8), UDim2.new(0, 48, 0, 2),
  4666. Color3.new(0/255, 0/255, 0/255), 0, selectLabel, 3)
  4667. --
  4668. Mouse.KeyDown:connect(function(key)
  4669. if key == "q" then
  4670. sneaking = 1
  4671. humanoid.WalkSpeed = humanoid.WalkSpeed / 2
  4672. rootJoint.C1 = CFrame.Angles(math.rad(sneaking*45), 0, 0)
  4673.  
  4674. --neck.C1 = CFrame.Angles(-math.rad(torso.Orientation.X - (sneaking*25)), 0, 0)
  4675. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  4676. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  4677. --print("Sneaking...")
  4678. end
  4679. if key == "r" then
  4680. if creativeInventoryGUI.Visible == true then
  4681. creativeInventoryGUI.Visible = false
  4682. elseif creativeInventoryGUI.Visible == false then
  4683. creativeInventoryGUI.Visible = true
  4684. end
  4685. end
  4686. if key == "e" then
  4687. if selectedBlock == 8 then
  4688. selectedBlock = -1
  4689. diamondswordtoggled = false
  4690. end
  4691. selectedBlock = selectedBlock + 1
  4692. diamondswordtoggled = false
  4693. itemOnHand = toolBar[selectedBlock + 1]
  4694. if selectedBlock > 7 then
  4695. for _,d in pairs(handItem:GetChildren()) do
  4696. d:Destroy()
  4697. end
  4698. handItem.Transparency = 1
  4699. end
  4700. if selectedBlock < 7 then
  4701. for _,d in pairs(handItem:GetChildren()) do
  4702. d:Destroy()
  4703. end
  4704. putTexture(handItem, itemOnHand.frontTex, itemOnHand.backTex,
  4705. itemOnHand.topTex, itemOnHand.bottomTex,
  4706. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  4707. for _,f in pairs(facesToResize) do
  4708. handItem:WaitForChild(f).StudsPerTileU = 0.52
  4709. handItem:WaitForChild(f).StudsPerTileV = 0.52
  4710. end
  4711. elseif selectedBlock > 7 then
  4712. for _,d in pairs(handItem:GetChildren()) do
  4713. d:Destroy()
  4714. end
  4715. if hasItemOnHand == 1 then hi = 1 end
  4716. end
  4717. end
  4718. end)
  4719. Mouse.KeyDown:connect(function(key)
  4720. if (key == "0" or key == "1" or key == "2"
  4721. or key == "3" or key == "4" or key == "5"
  4722. or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
  4723. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  4724. end)
  4725.  
  4726.  
  4727. Mouse.KeyUp:connect(function(key)
  4728. if key == "q" then
  4729. sneaking = 0
  4730. humanoid.WalkSpeed = humanoid.WalkSpeed * 2
  4731. humanoid.HipHeight = 0.3
  4732. rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
  4733. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  4734. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  4735. --print("Stopped sneaking...")
  4736. end
  4737. end)
  4738. dead = false
  4739. local humOffset = CFrame.new(0, 0, 0)
  4740. while RS:wait() do
  4741. if diamondswordtoggled == true then
  4742. diamondsword.Transparency = 0
  4743. damage = 35
  4744. itemOnHand = true
  4745. end
  4746. if diamondswordtoggled == false then
  4747. diamondsword.Transparency = 1
  4748. damage = 10
  4749. itemOnHand = false
  4750. end
  4751. if neededtopunch == true then
  4752. if punchEnded == 1 then punching = 1 end
  4753. end
  4754. hearts.Size = UDim2.new(0, SnapToGrid((humanoid.Health/humanoid.MaxHealth)*162, 8) + 2, 0, 18)
  4755. if itemOnHand ~= nil then
  4756. hasItemOnHand = 1
  4757. handItem.Transparency = 0
  4758. else
  4759. hasItemOnHand = 0
  4760. handItem.Transparency = 1
  4761. end
  4762. if humanoid.Health < oldHP then
  4763. damageTime = 60
  4764. sound:Play()
  4765. end
  4766. oldHP = humanoid.Health
  4767. if damageTime > 0 and humanoid.Health > 0 then
  4768. for _,p in pairs(char:GetChildren()) do
  4769. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  4770. if p.Name == "DamagePart" then
  4771. p.Transparency = 0.5
  4772. end
  4773. end
  4774. end
  4775. damageTime = damageTime - 2
  4776. if damageTime <= 0 then
  4777. for _,p in pairs(char:GetChildren()) do
  4778. if p.Name ~= "HumanoidRootPart" and p ~= diamondsword and p.ClassName == "Part" then
  4779. if p.Name == "DamagePart" then
  4780. p.Transparency = 1
  4781. end
  4782. end
  4783. end
  4784. end
  4785. end
  4786. function updateItemOnHand()
  4787. for _,d in pairs(handItem:GetChildren()) do
  4788. d:Destroy()
  4789. end
  4790.  
  4791. if oldItemOnHand ~= itemOnHand then
  4792. changedItem = true
  4793. end
  4794. end
  4795. if updateHand == true then
  4796. updateHand = false
  4797. updateItemOnHand()
  4798. if oldItemOnHand ~= itemOnHand then
  4799. changedItem = true
  4800. end
  4801. end
  4802. local pressedWTimes = 0
  4803. local sprintingNum = 0
  4804. local sprinting = false
  4805. Mouse.KeyDown:connect(function(key)
  4806. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  4807. if (key == "w" and sprinting == false and sneaking == 0) then
  4808. if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
  4809. sprinting = true
  4810. humanoid.WalkSpeed = 25
  4811. pressedWTimes = 0
  4812. end
  4813. pressedWTimes = pressedWTimes + 1
  4814. coroutine.resume(coroutine.create(function()
  4815. for i = 1, 9 do
  4816. if sprinting == true then break end
  4817. wait()
  4818. end
  4819. pressedWTimes = 0
  4820. end))
  4821. end
  4822. end)
  4823. Mouse.KeyUp:connect(function(key)
  4824. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  4825. if (key == "w" and sprinting == true and sneaking == 0) then
  4826. sprinting = false
  4827. humanoid.WalkSpeed = 16
  4828. end
  4829. end)
  4830. Mouse.KeyUp:connect(function(key)
  4831. if key == "w" and sprinting == true and sneaking == 0 then
  4832. sprinting = false
  4833. humanoid.WalkSpeed = 16
  4834. pressedWTimes = 0
  4835. end
  4836. end)
  4837. Mouse.KeyDown:connect(function(key)
  4838. if key == "1" or key == "2" or key == "3" or
  4839. key == "4" or key == "5" or key == "6" or
  4840. key == "7" or key == "8" or key == "9" then
  4841. selectedBlock = tonumber(key) - 1
  4842. oldItemOnHand = itemOnHand
  4843. itemOnHand = toolBar[tonumber(key)]
  4844. updateItemOnHand()
  4845. if hasItemOnHand == 0 and itemOnHand then hi = 1 end
  4846. if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
  4847. end
  4848. --if (key == "0" or key == "1" or key == "2"
  4849. -- or key == "3" or key == "4" or key == "5"
  4850. -- or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
  4851. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  4852. end)
  4853. function findNearestTorso(pos)
  4854. local list = game.Workspace:children()
  4855. local torso = nil
  4856. local dist = 3
  4857. local temp = nil
  4858. local human = nil
  4859. local temp2 = nil
  4860. slainbysomeone = nil
  4861. playername = nil
  4862. for x = 1, #list do
  4863. temp2 = list[x]
  4864. if (temp2.className == "Model") and (temp2 ~= char) then
  4865. temp = temp2
  4866. human = temp2:findFirstChild("Humanoid")
  4867. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  4868. if (temp.HumanoidRootPart.Position - pos).magnitude < dist then
  4869. playername = temp.Name
  4870. dist = (temp.HumanoidRootPart.Position - pos).magnitude
  4871. end
  4872. end
  4873. end
  4874. end
  4875. return torso
  4876. end
  4877. --wait(math.random(0,5)/10)
  4878. if humanoid.Health < 1 and dead == false then
  4879. dead = true
  4880. coroutine.resume(coroutine.create(function()
  4881. local target = findNearestTorso(torso.Position)
  4882. if target ~= nil and target:FindFirstChildOfClass("Tool") and target:FindFirstChildOfClass("Tool").Name ~= "Building Tools" and target:FindFirstChildOfClass("Tool").Name ~= "Insert" then
  4883. slainbysomeone = true
  4884. end
  4885. end))
  4886. coroutine.resume(coroutine.create(function()
  4887. local corpseCF = humRootPart.CFrame + Vector3.new(0, -2.925, 0)
  4888. local corpse = Instance.new("Part", workspace)
  4889. corpse.Anchored = true
  4890. corpse.Name = "Dead Corpse"
  4891. target = char
  4892. target.Archivable = true
  4893. playercorpse = target:Clone()
  4894. playercorpse.Parent = corpse
  4895. corpse.Size = Vector3.new(3, 1, 3)
  4896. corpse.CFrame = corpseCF
  4897. corpse.Transparency = 1
  4898. corpse.CustomPhysicalProperties = PhysicalProperties.new(1, 1, 0, 1, 1)
  4899.  
  4900. local dHead = playercorpse.Head
  4901. dHead.CanCollide = false
  4902. --dHead.Material = "Fabric"
  4903.  
  4904. local dTorso = playercorpse.Torso
  4905. dTorso.CanCollide = false
  4906.  
  4907. local dLArm = playercorpse["Left Arm"]
  4908. dLArm.CanCollide = false
  4909.  
  4910. local dRArm = playercorpse["Right Arm"]
  4911. dRArm.CanCollide = false
  4912.  
  4913. local dLLeg = playercorpse["Right Leg"]
  4914. dLLeg.CanCollide = false
  4915.  
  4916. local dRLeg = playercorpse["Right Leg"]
  4917. dRLeg.CanCollide = false
  4918. weldCorpse = Instance.new("Weld",corpse)
  4919. weldCorpse.Part0 = dTorso
  4920. weldCorpse.Part1 = corpse
  4921. weldCorpse.C0 = CFrame.new(0, -1.95 - 0.4, 0)
  4922.  
  4923. -- lazy naming...
  4924.  
  4925. for _,p in pairs(playercorpse:GetChildren()) do
  4926. if p.Name == "DamagePart" then
  4927. p.Transparency = 0.5
  4928. end
  4929. end
  4930.  
  4931. head.Parent = nil
  4932. torso.Parent = nil
  4933. lArm.Parent = nil
  4934. rArm.Parent = nil
  4935. lLeg.Parent = nil
  4936. rLeg.Parent = nil
  4937.  
  4938. weldTo(dTorso, humRootPart)
  4939.  
  4940. for i = 1, 55 do
  4941. corpse.CFrame = corpseCF --*
  4942. --CFrame.Angles(math.rad(-corpse.Orientation.X), 0, math.rad(-corpse.Orientation.Z))
  4943.  
  4944. weldCorpse.C1 = weldCorpse.C1:lerp(CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, math.rad(90)), 0.075)
  4945. RS:wait()
  4946. end
  4947. for _,p in pairs(corpse:GetChildren()) do
  4948. p:Destroy()
  4949. end
  4950.  
  4951. corpse.Anchored = true
  4952.  
  4953. local smoke = Instance.new("ParticleEmitter", corpse)
  4954. smoke.Size = NumberSequence.new({
  4955. NumberSequenceKeypoint.new(0, 0.6),
  4956. NumberSequenceKeypoint.new(1, 0.6)
  4957. })
  4958. smoke.Texture = "rbxassetid://1494734425"
  4959. smoke.Rate = 100
  4960. smoke.Lifetime = NumberRange.new(0.6, 1.2)
  4961. smoke.Speed = NumberRange.new(2, 5)
  4962. smoke.SpreadAngle = Vector2.new(-30, 30)
  4963.  
  4964. wait(0.07)
  4965.  
  4966. smoke.Enabled = false
  4967.  
  4968. wait(2)
  4969.  
  4970. corpse:Destroy()
  4971. print("You died!")
  4972. end))
  4973. for i,v in pairs(game.Players:GetChildren()) do
  4974. coroutine.resume(coroutine.create(function()
  4975. local sc = Instance.new("ScreenGui",v.PlayerGui)
  4976. sc.Name = "deathmessage"
  4977. local frame = Instance.new("Frame",sc)
  4978. frame.Position = UDim2.new(0,0,0.796,0)
  4979. frame.Size = UDim2.new(0,518,0,112)
  4980. frame.BackgroundTransparency = 1
  4981. local textLabel = Instance.new("TextLabel",frame)
  4982. textLabel.TextSize = 24
  4983. textLabel.Font = "Arcade"
  4984. textLabel.Size = UDim2.new(1,0,1,0)
  4985. textLabel.Position = UDim2.new(0,1,0,1)
  4986. textLabel.BackgroundTransparency = 0.5
  4987. textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  4988. textLabel.TextColor3 = Color3.new(255, 255, 255)
  4989. if diedtofalldamage == false then
  4990. textLabel.Text = player.Name.." died"
  4991. print(textLabel.Text)
  4992. wait(5)
  4993. textLabel.Visible = false
  4994. else
  4995. textLabel.Text = player.Name.." fell from a high place"
  4996. print(textLabel.Text)
  4997. wait(5)
  4998. textLabel.Visible = false
  4999. end
  5000. if slainbysomeone == false then
  5001. textLabel.Text = player.Name.." died"
  5002. print(textLabel.Text)
  5003. wait(5)
  5004. textLabel.Visible = false
  5005. else
  5006. textLabel.Text = player.Name.." was slain by "..playername
  5007. wait(5)
  5008. textLabel.Visible = false
  5009. end
  5010. end))
  5011. end
  5012. print("You died!")
  5013. end
  5014. local CFNew, CFAng, CFEulAng, Rad = CFrame.new, CFrame.Angles, CFrame.fromEulerAnglesXYZ, math.rad
  5015. --neck.C0 = neck.C0:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  5016.  
  5017. if getMagnitudeXZ(torso.Velocity) > 1 then
  5018. if walkAnim >= 1 then
  5019. increaseWalkAnim = -1
  5020. elseif walkAnim <= -1 then
  5021. increaseWalkAnim = 1
  5022. end
  5023. walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
  5024. else
  5025. walkAnim = 0
  5026. end
  5027. --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  5028. --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  5029. 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)
  5030. 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)
  5031. --
  5032. --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  5033. --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
  5034. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
  5035. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
  5036. --print("-45")
  5037. --end
  5038. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
  5039. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
  5040. --print("45")
  5041. --end
  5042. dododododo = false
  5043. thingyyyy = true
  5044. coroutine.resume(coroutine.create(function()
  5045. while wait(0.000) do
  5046. if dododododo == true then
  5047. if thingyyyy == true then
  5048. thingyyyy = false
  5049. humanoid.HipHeight = humanoid.HipHeight - 0.001
  5050. wait()
  5051. humanoid.HipHeight = humanoid.HipHeight - 0.001
  5052. wait()
  5053. humanoid.HipHeight = humanoid.HipHeight - 0.005
  5054. wait()
  5055. humanoid.HipHeight = humanoid.HipHeight - 0.050
  5056. wait()
  5057. humanoid.HipHeight = humanoid.HipHeight - 0.050
  5058. wait()
  5059. humanoid.HipHeight = humanoid.HipHeight + 0.050
  5060. wait()
  5061. humanoid.HipHeight = humanoid.HipHeight + 0.050
  5062. wait()
  5063. humanoid.HipHeight = humanoid.HipHeight + 0.005
  5064. wait()
  5065. humanoid.HipHeight = humanoid.HipHeight + 0.001
  5066. wait()
  5067. humanoid.HipHeight = humanoid.HipHeight + 0.001
  5068. wait()
  5069. thingyyyy = true
  5070. end
  5071. end
  5072. end
  5073. end))
  5074. --move these arms
  5075. local BobbingY = walkAnim*2
  5076. if BobbingY >= 1 then BobbingY = 1 BobbingY = -BobbingY end
  5077. humanoid.Running:Connect(function()
  5078. dododododo = true
  5079. end)
  5080. humanoid.PlatformStanding:Connect(function()
  5081. dododododo = false
  5082. end)
  5083.  
  5084. local BobbingX = -0.5 + walkAnim
  5085. --neck.C0 = neck.C0:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  5086. humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
  5087.  
  5088. rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
  5089.  
  5090. rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
  5091.  
  5092. 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)
  5093. 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)
  5094.  
  5095. if Mouse.Target and Mouse.Target ~= camPart and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  5096. selectBox.Adornee = Mouse.Target
  5097. else
  5098. selectBox.Adornee = nil
  5099. end
  5100.  
  5101. if punching == 1 and punchEnded == 1 then
  5102. punching = 0
  5103. --print("steve uses punch!!")
  5104. local coPunch = coroutine.wrap(function()
  5105. punchEnded = 0
  5106. punchSpeed = 1
  5107. punchRotX = -60
  5108. punchRotY = -8
  5109. punchRotZ = -35
  5110. wait(0.075)
  5111. punchSpeed = 1
  5112. punchRotX = -75
  5113. punchRotY = 8
  5114. punchRotZ = 40
  5115. wait(0.075)
  5116. punchSpeed = 1
  5117. punchRotX = -20
  5118. punchRotZ = 40
  5119. wait(0.075)
  5120. punchSpeed = 3.5
  5121. punchRotX = 0
  5122. punchRotY = 0
  5123. punchRotZ = 0
  5124. punchEnded = 1
  5125. wait(0.06)
  5126. punchSpeed = 0
  5127. end)
  5128. coPunch()
  5129. end
  5130.  
  5131. if ticks > 20 then
  5132. ticks = 0
  5133. if times == 0 then
  5134. times = times + 1
  5135. idleAnimRotX = -1
  5136. idleAnimRotZ = 0
  5137. elseif times == 1 then
  5138. times = times + 1
  5139. idleAnimRotX = -0.75
  5140. idleAnimRotZ = -0.75
  5141. elseif times == 2 then
  5142. times = times + 1
  5143. idleAnimRotX = 0
  5144. idleAnimRotZ = -1
  5145. elseif times == 3 then
  5146. times = times + 1
  5147. idleAnimRotX = 0.75
  5148. idleAnimRotZ = -0.75
  5149. --idleAnimRotX = 0.75
  5150. --idleAnimRotZ = -0
  5151. elseif times == 4 then
  5152. times = times + 1
  5153. idleAnimRotX = 1
  5154. idleAnimRotZ = 0
  5155. --idleAnimRotX = 1
  5156. --idleAnimRotZ = 0
  5157. elseif times == 5 then
  5158. times = times + 1
  5159. idleAnimRotX = 0.75
  5160. idleAnimRotZ = 0.75
  5161. elseif times == 6 then
  5162. times = times + 1
  5163. idleAnimRotX = 0
  5164. idleAnimRotZ = 1
  5165. elseif times == 7 then
  5166. times = 0
  5167. idleAnimRotX = -0.75
  5168. idleAnimRotZ = 0.75
  5169. end
  5170. end
  5171.  
  5172. if hi == 1 then hi = 0 end
  5173. end
  5174.  
  5175. end
  5176.  
  5177. end
Add Comment
Please, Sign In to add comment