Advertisement
Guest User

Untitled

a guest
Feb 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.48 KB | None | 0 0
  1. --[[
  2.  
  3.  
  4.  
  5. ▓▒▒▓▓ ░▓▒▒██▒▒▓█▒▒▓▓ █▒▒▓█▒▒▒▒▒▒▒█▓▒▒▒▒▒▒▒█▒▓▒▒▒▒▒▓█▒▒▒▒▒▒▒█▓▒▒▒▓▒▒▓█▒▒▒▒▒▓▒▓░
  6. ▓ ░█▒ ▓░ ▓▓ ░█ ░█░▒ ▒▒ █░ █ ░ ▒▓ ▓▒ █ ░░
  7. ░░ ░ ▒██░░░ █░ ▓▓ ░░█░ ▓▒ ▒█████░ ▓█████░░ ▓▓ ░█ ▒█░█▓ ▒▓ ░███████▓ ██░
  8. ▓ ▓█▓ ▒▒█ █▒ ░█ ▓▒ ▒█████░ ▓█████░░ ▓▓ ░█ ▒█▓░ ░▓ ▓███████ █▓
  9. ▓ ░░ ▒█ █▒ ░ █░ ░░░░█░ ▓█████░ ▒██░ ▒██▒ ░█ ░ ░███ ▒░
  10. ▒░ ░░ ▓▓ █░ ▓▒ █░ ░░ ░█░ ▓█████░ █░ ░░ ░ █░ ░ ███░ ░▒
  11. ▒░ ▓▓ ▒▓ █░ ▒█ █▒ ░ █ ▓█████░ ▓ █░ ▒▓ █▒ ░ █▒ ▒█▓█████▓ ░▒
  12. ▒░▒░█▒▒█▓ █░ ▓█ ██░ ░ █░ ▓█████░ ▓█████░ ▒█ ░ █▒ ▒█ ░ █▒ ░███▓███▓░ ▒
  13. ░▒░ ▒█▓ ▒▒ ▒█░ ▓▓ ░██ ░▓ ▒ ░ █░ █░ ▒█ ▓▒ ░█ ▒▓ ███ ▓███░ ▒░
  14. ▒░ ░▓██▒░░ ▓▓ █▒ ▒██ ▓▓ ░ ░ ░█░ ░ █░ ▒█ ▓▓ █░ ▒█ █▓░ ░███▒ ░▒
  15. ▒▒ ▒███░▒ ░█ █▓ ░██░ ▒█ ░ █░ ░ █░ ▒█ █▒ ░█ ▓▓ ░█ ░██▓▒ ▓░
  16. ▒▒ ▒██▓▓▒ ▒▓ █░ ▓█▓ █░ ▒█░ █░ ▓▓ ░█░ ▓▒ ░█▒ ▓ ▓█▒░ ▒▒
  17. ▒▒░ █▓ ▓▒░▒█▒░░▓█░░▒█▒▒░░▓▓░▒▒▒░░▒█▒░░░░░░░█▒░▒█▓░░▓█▒░▒█░░░█▓░░▓▒ ▓█░░▒▒
  18. ░▒▒▒░ ▒░░▒▒░░░░░░░░ ▒░░░▒▒▒▒▒▒▒▒░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒░▒▒▒░░░░ ░░░▒░
  19. ASCII Art Generators are cool :)
  20.  
  21.  
  22.  
  23. ]]
  24.  
  25. -- Scroll down for changelog...
  26.  
  27. -- ORIGINAL CREATOR: Depr1
  28.  
  29. -- If this script isn't on pastebin or the user who uploaded this isn't called "Delros12"
  30. -- (and yes my pastebin account is Delros12) or the link is not https://pastebin.com/2NNDTLjL
  31. -- then this is not the original link of this script.
  32.  
  33. -- The original link of the script gets edited constantly for updates, if you use the original
  34. -- link you will be able to enjoy the most recent updates of this script without changing to
  35. -- another link which contains updated script.
  36.  
  37. -- Controls: Q to sneak, use the keypad numbers 1-9 to change blocks,
  38. -- choose a empty slot if you want to remove a block, E to open creative
  39. -- inventory, right-click to destroy a block in your toolbar in creative
  40. -- inventory, R to make camera face your character's front or back.
  41.  
  42. -- You will become steve when you use this script, if you die after
  43. -- using this script, keep trying to use it or wait 60 seconds
  44. -- (it doesn't work at first but eventually it will)
  45.  
  46. -- Enjoy! :)
  47.  
  48. local updateHand = false
  49. local Changelog = [[
  50.  
  51. 17/02/2018:
  52. + You can't break your neck anymore (360 head you know)
  53. + Added this changelog
  54. - Removed the name tag, since it causes it to get banned on
  55. some servers for some reason (really voidacity?).
  56. * Walking animation is now more accurate
  57.  
  58. Note: It's been a while since i don't update the script, but i'll
  59. get back to updating it.
  60.  
  61. 05/02/2018:
  62. + Added gravity to sand and gravel (WARNING: Can be laggy!)
  63.  
  64. 04/02/2018:
  65. + Added creative inventory
  66. + Added 31 blocks (that's a lot, but not near minecraft's level)
  67. + Added sprinting (i'll add footsteps and particles later)
  68. - Removed Herobrine
  69. * Fixed a bug where the hand dissapears if u look down while sneaking
  70. * Fixed? (not sure) a bug where if u ran the script you would die
  71.  
  72. 01/02/2018:
  73. + Added the hand that appears on minecraft when ur first person
  74. + Added a walking animation to the hand
  75. + Punching animation added to the hand
  76. + Camera bobbing
  77. + Sneaking now lowers your camera just like in minecraft
  78. + Blocks now have sounds (i chose the ones that are the closest to minecraft sounds)
  79. + When a block is broken, particles will fall from it
  80. ]]
  81.  
  82. workspace:WaitForChild("Camera"):ClearAllChildren()
  83. local RS = game:GetService("RunService").RenderStepped
  84. local targetName = game.Players.LocalPlayer.Name
  85. local player = game.Players:FindFirstChild(targetName)
  86. local creativeInventory = {
  87. {
  88. name = "Dirt",
  89. size = Vector3.new(2.6, 2.6, 2.6),
  90. transparency = 0;
  91. frontTex = "rbxassetid://11457717",
  92. backTex = "rbxassetid://11457717",
  93. topTex = "rbxassetid://608408665",
  94. bottomTex = "rbxassetid://11457717",
  95. leftTex = "rbxassetid://11457717",
  96. rightTex = "rbxassetid://11457717",
  97. sound = "rbxassetid://1102186681",
  98. soundVol = 1.25,
  99. hasGravity = false
  100. },
  101. {
  102. name = "Grass",
  103. size = Vector3.new(2.6, 2.6, 2.6),
  104. transparency = 0;
  105. frontTex = "rbxassetid://96430337",
  106. backTex = "rbxassetid://96430337",
  107. topTex = "rbxassetid://96430265",
  108. bottomTex = "rbxassetid://179655033",
  109. leftTex = "rbxassetid://96430337",
  110. rightTex = "rbxassetid://96430337",
  111. sound = "rbxassetid://1102186681",
  112. soundVol = 1.25,
  113. hasGravity = false
  114. },
  115. {
  116. name = "Sand",
  117. size = Vector3.new(2.6, 2.6, 2.6),
  118. transparency = 0;
  119. frontTex = "rbxassetid://347007448",
  120. backTex = "rbxassetid://347007448",
  121. topTex = "rbxassetid://347007448",
  122. bottomTex = "rbxassetid://347007448",
  123. leftTex = "rbxassetid://347007448",
  124. rightTex = "rbxassetid://347007448",
  125. sound = "rbxassetid://1102186681",
  126. soundVol = 1.25,
  127. hasGravity = true
  128. },
  129. {
  130. name = "Gravel",
  131. size = Vector3.new(2.6, 2.6, 2.6),
  132. transparency = 0;
  133. frontTex = "rbxassetid://151701568",
  134. backTex = "rbxassetid://151701568",
  135. topTex = "rbxassetid://151701568",
  136. bottomTex = "rbxassetid://151701568",
  137. leftTex = "rbxassetid://151701568",
  138. rightTex = "rbxassetid://151701568",
  139. sound = "rbxassetid://1102186681",
  140. soundVol = 1.25,
  141. hasGravity = true
  142. },
  143. {
  144. name = "Stone",
  145. size = Vector3.new(2.6, 2.6, 2.6),
  146. transparency = 0;
  147. frontTex = "rbxassetid://75880927",
  148. backTex = "rbxassetid://75880927",
  149. topTex = "rbxassetid://75880927",
  150. bottomTex = "rbxassetid://75880927",
  151. leftTex = "rbxassetid://75880927",
  152. rightTex = "rbxassetid://75880927",
  153. sound = "rbxassetid://1016978163",
  154. soundVol = 2,
  155. hasGravity = false
  156. },
  157. {
  158. name = "Diamond Ore",
  159. size = Vector3.new(2.6, 2.6, 2.6),
  160. transparency = 0;
  161. frontTex = "rbxassetid://57928490",
  162. backTex = "rbxassetid://57928490",
  163. topTex = "rbxassetid://57928490",
  164. bottomTex = "rbxassetid://57928490",
  165. leftTex = "rbxassetid://57928490",
  166. rightTex = "rbxassetid://57928490",
  167. sound = "rbxassetid://1016978163",
  168. soundVol = 2,
  169. hasGravity = false
  170. },
  171. {
  172. name = "Diamond Block",
  173. size = Vector3.new(2.6, 2.6, 2.6),
  174. transparency = 0;
  175. frontTex = "rbxassetid://56749955",
  176. backTex = "rbxassetid://56749955",
  177. topTex = "rbxassetid://56749955",
  178. bottomTex = "rbxassetid://56749955",
  179. leftTex = "rbxassetid://56749955",
  180. rightTex = "rbxassetid://56749955",
  181. sound = "rbxassetid://1016978163",
  182. soundVol = 2,
  183. hasGravity = false
  184. },
  185. {
  186. name = "Emerald Block",
  187. size = Vector3.new(2.6, 2.6, 2.6),
  188. transparency = 0;
  189. frontTex = "rbxassetid://152410853",
  190. backTex = "rbxassetid://152410853",
  191. topTex = "rbxassetid://152410853",
  192. bottomTex = "rbxassetid://152410853",
  193. leftTex = "rbxassetid://152410853",
  194. rightTex = "rbxassetid://152410853",
  195. sound = "rbxassetid://1016978163",
  196. soundVol = 2,
  197. hasGravity = false
  198. },
  199. {
  200. name = "Emerald Ore",
  201. size = Vector3.new(2.6, 2.6, 2.6),
  202. transparency = 0;
  203. frontTex = "rbxassetid://152410868",
  204. backTex = "rbxassetid://152410868",
  205. topTex = "rbxassetid://152410868",
  206. bottomTex = "rbxassetid://152410868",
  207. leftTex = "rbxassetid://152410868",
  208. rightTex = "rbxassetid://152410868",
  209. sound = "rbxassetid://1016978163",
  210. soundVol = 2,
  211. hasGravity = false
  212. },
  213. {
  214. name = "Obsidian",
  215. size = Vector3.new(2.6, 2.6, 2.6),
  216. transparency = 0;
  217. frontTex = "rbxassetid://112560322",
  218. backTex = "rbxassetid://112560322",
  219. topTex = "rbxassetid://112560322",
  220. bottomTex = "rbxassetid://112560322",
  221. leftTex = "rbxassetid://112560322",
  222. rightTex = "rbxassetid://112560322",
  223. sound = "rbxassetid://1016978163",
  224. soundVol = 2,
  225. hasGravity = false
  226. },
  227. {
  228. name = "Gold Block",
  229. size = Vector3.new(2.6, 2.6, 2.6),
  230. transparency = 0;
  231. frontTex = "rbxassetid://152572128",
  232. backTex = "rbxassetid://152572128",
  233. topTex = "rbxassetid://152572128",
  234. bottomTex = "rbxassetid://152572128",
  235. leftTex = "rbxassetid://152572128",
  236. rightTex = "rbxassetid://152572128",
  237. sound = "rbxassetid://1016978163",
  238. soundVol = 2,
  239. hasGravity = false
  240. },
  241. {
  242. name = "Gold Ore",
  243. size = Vector3.new(2.6, 2.6, 2.6),
  244. transparency = 0;
  245. frontTex = "rbxassetid://152572121",
  246. backTex = "rbxassetid://152572121",
  247. topTex = "rbxassetid://152572121",
  248. bottomTex = "rbxassetid://152572121",
  249. leftTex = "rbxassetid://152572121",
  250. rightTex = "rbxassetid://152572121",
  251. sound = "rbxassetid://1016978163",
  252. soundVol = 2,
  253. hasGravity = false
  254. },
  255. {
  256. name = "Iron Block",
  257. size = Vector3.new(2.6, 2.6, 2.6),
  258. transparency = 0;
  259. frontTex = "rbxassetid://152572134",
  260. backTex = "rbxassetid://152572134",
  261. topTex = "rbxassetid://152572134",
  262. bottomTex = "rbxassetid://152572134",
  263. leftTex = "rbxassetid://152572134",
  264. rightTex = "rbxassetid://152572134",
  265. sound = "rbxassetid://1016978163",
  266. soundVol = 2,
  267. hasGravity = false
  268. },
  269. {
  270. name = "Iron Ore",
  271. size = Vector3.new(2.6, 2.6, 2.6),
  272. transparency = 0;
  273. frontTex = "rbxassetid://132879562",
  274. backTex = "rbxassetid://132879562",
  275. topTex = "rbxassetid://132879562",
  276. bottomTex = "rbxassetid://132879562",
  277. leftTex = "rbxassetid://132879562",
  278. rightTex = "rbxassetid://132879562",
  279. sound = "rbxassetid://1016978163",
  280. soundVol = 2,
  281. hasGravity = false
  282. },
  283. {
  284. name = "Redstone Block",
  285. size = Vector3.new(2.6, 2.6, 2.6),
  286. transparency = 0;
  287. frontTex = "rbxassetid://136260219",
  288. backTex = "rbxassetid://136260219",
  289. topTex = "rbxassetid://136260219",
  290. bottomTex = "rbxassetid://136260219",
  291. leftTex = "rbxassetid://136260219",
  292. rightTex = "rbxassetid://136260219",
  293. sound = "rbxassetid://1016978163",
  294. soundVol = 2,
  295. hasGravity = false
  296. },
  297. {
  298. name = "Redstone Ore",
  299. size = Vector3.new(2.6, 2.6, 2.6),
  300. transparency = 0;
  301. frontTex = "rbxassetid://152572209",
  302. backTex = "rbxassetid://152572209",
  303. topTex = "rbxassetid://152572209",
  304. bottomTex = "rbxassetid://152572209",
  305. leftTex = "rbxassetid://152572209",
  306. rightTex = "rbxassetid://152572209",
  307. sound = "rbxassetid://1016978163",
  308. soundVol = 2,
  309. hasGravity = false
  310. },
  311. {
  312. name = "Coal Block",
  313. size = Vector3.new(2.6, 2.6, 2.6),
  314. transparency = 0;
  315. frontTex = "rbxassetid://152527418",
  316. backTex = "rbxassetid://152527418",
  317. topTex = "rbxassetid://152527418",
  318. bottomTex = "rbxassetid://152527418",
  319. leftTex = "rbxassetid://152527418",
  320. rightTex = "rbxassetid://152527418",
  321. sound = "rbxassetid://1016978163",
  322. soundVol = 2,
  323. hasGravity = false
  324. },
  325. {
  326. name = "Coal Ore",
  327. size = Vector3.new(2.6, 2.6, 2.6),
  328. transparency = 0;
  329. frontTex = "rbxassetid://152572101",
  330. backTex = "rbxassetid://152572101",
  331. topTex = "rbxassetid://152572101",
  332. bottomTex = "rbxassetid://152572101",
  333. leftTex = "rbxassetid://152572101",
  334. rightTex = "rbxassetid://152572101",
  335. sound = "rbxassetid://1016978163",
  336. soundVol = 2,
  337. hasGravity = false
  338. },
  339. {
  340. name = "Bedrock",
  341. size = Vector3.new(2.6, 2.6, 2.6),
  342. transparency = 0;
  343. frontTex = "rbxassetid://75881126",
  344. backTex = "rbxassetid://75881126",
  345. topTex = "rbxassetid://75881126",
  346. bottomTex = "rbxassetid://75881126",
  347. leftTex = "rbxassetid://75881126",
  348. rightTex = "rbxassetid://75881126",
  349. sound = "rbxassetid://1016978163",
  350. soundVol = 2,
  351. hasGravity = false
  352. },
  353. {
  354. name = "Cobblestone",
  355. size = Vector3.new(2.6, 2.6, 2.6),
  356. transparency = 0;
  357. frontTex = "rbxassetid://152572105",
  358. backTex = "rbxassetid://152572105",
  359. topTex = "rbxassetid://152572105",
  360. bottomTex = "rbxassetid://152572105",
  361. leftTex = "rbxassetid://152572105",
  362. rightTex = "rbxassetid://152572105",
  363. sound = "rbxassetid://1016978163",
  364. soundVol = 2,
  365. hasGravity = false
  366. },
  367. {
  368. name = "Mossy Stone Brick",
  369. size = Vector3.new(2.6, 2.6, 2.6),
  370. transparency = 0;
  371. frontTex = "rbxassetid://61826751",
  372. backTex = "rbxassetid://61826751",
  373. topTex = "rbxassetid://61826751",
  374. bottomTex = "rbxassetid://61826751",
  375. leftTex = "rbxassetid://61826751",
  376. rightTex = "rbxassetid://61826751",
  377. sound = "rbxassetid://1016978163",
  378. soundVol = 2,
  379. hasGravity = false
  380. },
  381. {
  382. name = "Cracked Stone Brick",
  383. size = Vector3.new(2.6, 2.6, 2.6),
  384. transparency = 0;
  385. frontTex = "rbxassetid://151802087",
  386. backTex = "rbxassetid://151802087",
  387. topTex = "rbxassetid://151802087",
  388. bottomTex = "rbxassetid://151802087",
  389. leftTex = "rbxassetid://151802087",
  390. rightTex = "rbxassetid://151802087",
  391. sound = "rbxassetid://1016978163",
  392. soundVol = 2,
  393. hasGravity = false
  394. },
  395. {
  396. name = "Chiseled Stone Brick",
  397. size = Vector3.new(2.6, 2.6, 2.6),
  398. transparency = 0;
  399. frontTex = "rbxassetid://151802074",
  400. backTex = "rbxassetid://151802074",
  401. topTex = "rbxassetid://151802074",
  402. bottomTex = "rbxassetid://151802074",
  403. leftTex = "rbxassetid://151802074",
  404. rightTex = "rbxassetid://151802074",
  405. sound = "rbxassetid://1016978163",
  406. soundVol = 2,
  407. hasGravity = false
  408. },
  409. {
  410. name = "Stone Brick",
  411. size = Vector3.new(2.6, 2.6, 2.6),
  412. transparency = 0;
  413. frontTex = "rbxassetid://61826773",
  414. backTex = "rbxassetid://61826773",
  415. topTex = "rbxassetid://61826773",
  416. bottomTex = "rbxassetid://61826773",
  417. leftTex = "rbxassetid://61826773",
  418. rightTex = "rbxassetid://61826773",
  419. sound = "rbxassetid://1016978163",
  420. soundVol = 2,
  421. hasGravity = false
  422. },
  423. {
  424. name = "Nether Brick",
  425. size = Vector3.new(2.6, 2.6, 2.6),
  426. transparency = 0;
  427. frontTex = "rbxassetid://151802104",
  428. backTex = "rbxassetid://151802104",
  429. topTex = "rbxassetid://151802104",
  430. bottomTex = "rbxassetid://151802104",
  431. leftTex = "rbxassetid://151802104",
  432. rightTex = "rbxassetid://151802104",
  433. sound = "rbxassetid://1016978163",
  434. soundVol = 2,
  435. hasGravity = false
  436. },
  437. {
  438. name = "Granite",
  439. size = Vector3.new(2.6, 2.6, 2.6),
  440. transparency = 0;
  441. frontTex = "rbxassetid://151776467",
  442. backTex = "rbxassetid://151776467",
  443. topTex = "rbxassetid://151776467",
  444. bottomTex = "rbxassetid://151776467",
  445. leftTex = "rbxassetid://151776467",
  446. rightTex = "rbxassetid://151776467",
  447. sound = "rbxassetid://1016978163",
  448. soundVol = 2,
  449. hasGravity = false
  450. },
  451. {
  452. name = "Diorite",
  453. size = Vector3.new(2.6, 2.6, 2.6),
  454. transparency = 0;
  455. frontTex = "rbxassetid://151776452",
  456. backTex = "rbxassetid://151776452",
  457. topTex = "rbxassetid://151776452",
  458. bottomTex = "rbxassetid://151776452",
  459. leftTex = "rbxassetid://151776452",
  460. rightTex = "rbxassetid://151776452",
  461. sound = "rbxassetid://1016978163",
  462. soundVol = 2,
  463. hasGravity = false
  464. },
  465. {
  466. name = "Andesite",
  467. size = Vector3.new(2.6, 2.6, 2.6),
  468. transparency = 0;
  469. frontTex = "rbxassetid://151776422",
  470. backTex = "rbxassetid://151776422",
  471. topTex = "rbxassetid://151776422",
  472. bottomTex = "rbxassetid://151776422",
  473. leftTex = "rbxassetid://151776422",
  474. rightTex = "rbxassetid://151776422",
  475. sound = "rbxassetid://1016978163",
  476. soundVol = 2,
  477. hasGravity = false
  478. },
  479. {
  480. name = "Polished Granite",
  481. size = Vector3.new(2.6, 2.6, 2.6),
  482. transparency = 0;
  483. frontTex = "rbxassetid://151776506",
  484. backTex = "rbxassetid://151776506",
  485. topTex = "rbxassetid://151776506",
  486. bottomTex = "rbxassetid://151776506",
  487. leftTex = "rbxassetid://151776506",
  488. rightTex = "rbxassetid://151776506",
  489. sound = "rbxassetid://1016978163",
  490. soundVol = 2,
  491. hasGravity = false
  492. },
  493. {
  494. name = "Polished Diorite",
  495. size = Vector3.new(2.6, 2.6, 2.6),
  496. transparency = 0;
  497. frontTex = "rbxassetid://151776533",
  498. backTex = "rbxassetid://151776533",
  499. topTex = "rbxassetid://151776533",
  500. bottomTex = "rbxassetid://151776533",
  501. leftTex = "rbxassetid://151776533",
  502. rightTex = "rbxassetid://151776533",
  503. sound = "rbxassetid://1016978163",
  504. soundVol = 2,
  505. hasGravity = false
  506. },
  507. {
  508. name = "Polished Andesite",
  509. size = Vector3.new(2.6, 2.6, 2.6),
  510. transparency = 0;
  511. frontTex = "rbxassetid://151776506",
  512. backTex = "rbxassetid://151776506",
  513. topTex = "rbxassetid://151776506",
  514. bottomTex = "rbxassetid://151776506",
  515. leftTex = "rbxassetid://151776506",
  516. rightTex = "rbxassetid://151776506",
  517. sound = "rbxassetid://1016978163",
  518. soundVol = 2,
  519. hasGravity = false
  520. },
  521. {
  522. name = "Brick Block",
  523. size = Vector3.new(2.6, 2.6, 2.6),
  524. transparency = 0;
  525. frontTex = "rbxassetid://59389191",
  526. backTex = "rbxassetid://59389191",
  527. topTex = "rbxassetid://59389191",
  528. bottomTex = "rbxassetid://59389191",
  529. leftTex = "rbxassetid://59389191",
  530. rightTex = "rbxassetid://59389191",
  531. sound = "rbxassetid://1016978163",
  532. soundVol = 2,
  533. hasGravity = false
  534. },
  535. {
  536. name = "Packed Ice",
  537. size = Vector3.new(2.6, 2.6, 2.6),
  538. transparency = 0;
  539. frontTex = "rbxassetid://152528023",
  540. backTex = "rbxassetid://152528023",
  541. topTex = "rbxassetid://152528023",
  542. bottomTex = "rbxassetid://152528023",
  543. leftTex = "rbxassetid://152528023",
  544. rightTex = "rbxassetid://152528023",
  545. sound = "rbxassetid://1016978163",
  546. soundVol = 2,
  547. hasGravity = false
  548. },
  549. {
  550. name = "Ice Block",
  551. size = Vector3.new(2.6, 2.6, 2.6),
  552. transparency = 1;
  553. frontTex = "rbxassetid://118555586",
  554. backTex = "rbxassetid://118555586",
  555. topTex = "rbxassetid://118555586",
  556. bottomTex = "rbxassetid://118555586",
  557. leftTex = "rbxassetid://118555586",
  558. rightTex = "rbxassetid://118555586",
  559. sound = "rbxassetid://1016978163",
  560. soundVol = 2,
  561. hasGravity = false
  562. },
  563. {
  564. name = "Netherrack",
  565. size = Vector3.new(2.6, 2.6, 2.6),
  566. transparency = 0;
  567. frontTex = "rbxassetid://151802119",
  568. backTex = "rbxassetid://151802119",
  569. topTex = "rbxassetid://151802119",
  570. bottomTex = "rbxassetid://151802119",
  571. leftTex = "rbxassetid://151802119",
  572. rightTex = "rbxassetid://151802119",
  573. sound = "rbxassetid://1016978163",
  574. soundVol = 2,
  575. hasGravity = false
  576. },
  577. {
  578. name = "End Stone",
  579. size = Vector3.new(2.6, 2.6, 2.6),
  580. transparency = 0;
  581. frontTex = "rbxassetid://151802091",
  582. backTex = "rbxassetid://151802091",
  583. topTex = "rbxassetid://151802091",
  584. bottomTex = "rbxassetid://151802091",
  585. leftTex = "rbxassetid://151802091",
  586. rightTex = "rbxassetid://151802091",
  587. sound = "rbxassetid://1016978163",
  588. soundVol = 2,
  589. hasGravity = false
  590. },
  591. {
  592. name = "Glass Block",
  593. size = Vector3.new(2.6, 2.6, 2.6),
  594. transparency = 1;
  595. frontTex = "rbxassetid://152239003",
  596. backTex = "rbxassetid://152239003",
  597. topTex = "rbxassetid://152239003",
  598. bottomTex = "rbxassetid://152239003",
  599. leftTex = "rbxassetid://152239003",
  600. rightTex = "rbxassetid://152239003",
  601. sound = "rbxassetid://1016978163",
  602. soundVol = 2,
  603. hasGravity = false
  604. },
  605. {
  606. name = "Glowstone",
  607. size = Vector3.new(2.6, 2.6, 2.6),
  608. transparency = 0;
  609. frontTex = "rbxassetid://54790811",
  610. backTex = "rbxassetid://54790811",
  611. topTex = "rbxassetid://54790811",
  612. bottomTex = "rbxassetid://54790811",
  613. leftTex = "rbxassetid://54790811",
  614. rightTex = "rbxassetid://54790811",
  615. sound = "rbxassetid://1016978163",
  616. soundVol = 2,
  617. hasGravity = false
  618. },
  619. {
  620. name = "Bookshelf",
  621. size = Vector3.new(2.6, 2.6, 2.6),
  622. transparency = 0;
  623. frontTex = "rbxassetid://118554092",
  624. backTex = "rbxassetid://118554092",
  625. topTex = "rbxassetid://346201871",
  626. bottomTex = "rbxassetid://346201871",
  627. leftTex = "rbxassetid://118554092",
  628. rightTex = "rbxassetid://118554092",
  629. sound = "rbxassetid://507863457",
  630. soundVol = 2,
  631. hasGravity = false
  632. },
  633. {
  634. name = "Oak Wood Planks",
  635. size = Vector3.new(2.6, 2.6, 2.6),
  636. transparency = 0;
  637. frontTex = "rbxassetid://346201871",
  638. backTex = "rbxassetid://346201871",
  639. topTex = "rbxassetid://346201871",
  640. bottomTex = "rbxassetid://346201871",
  641. leftTex = "rbxassetid://346201871",
  642. rightTex = "rbxassetid://346201871",
  643. sound = "rbxassetid://507863457",
  644. soundVol = 2,
  645. hasGravity = false
  646. },
  647. {
  648. name = "Oak Log",
  649. size = Vector3.new(2.6, 2.6, 2.6),
  650. transparency = 0;
  651. frontTex = "rbxassetid://71445924",
  652. backTex = "rbxassetid://71445924",
  653. topTex = "rbxassetid://152538557",
  654. bottomTex = "rbxassetid://152538557",
  655. leftTex = "rbxassetid://71445924",
  656. rightTex = "rbxassetid://71445924",
  657. sound = "rbxassetid://507863457",
  658. soundVol = 2,
  659. hasGravity = false
  660. },
  661. {
  662. name = "Oak Leaves",
  663. size = Vector3.new(2.6, 2.6, 2.6),
  664. transparency = 1;
  665. frontTex = "rbxassetid://151708391",
  666. backTex = "rbxassetid://151708391",
  667. topTex = "rbxassetid://151708391",
  668. bottomTex = "rbxassetid://151708391",
  669. leftTex = "rbxassetid://151708391",
  670. rightTex = "rbxassetid://151708391",
  671. sound = "rbxassetid://507863457",
  672. -- couldn't find a leaves sound for this one, sorry lol
  673. soundVol = 2,
  674. hasGravity = false
  675. }
  676. }
  677. local toolBar = {
  678. {
  679. name = "Dirt Block",
  680. size = Vector3.new(2.6, 2.6, 2.6),
  681. transparency = 0;
  682. frontTex = "rbxassetid://152569532",
  683. backTex = "rbxassetid://152569532",
  684. topTex = "rbxassetid://152569532",
  685. bottomTex = "rbxassetid://152569532",
  686. leftTex = "rbxassetid://152569532",
  687. rightTex = "rbxassetid://152569532",
  688. sound = "rbxassetid://1102186681",
  689. soundVol = 1.25,
  690. hasGravity = false
  691. },
  692. {
  693. name = "Grass Block",
  694. size = Vector3.new(2.6, 2.6, 2.6),
  695. transparency = 0;
  696. frontTex = "rbxassetid://96430337",
  697. backTex = "rbxassetid://96430337",
  698. topTex = "rbxassetid://96430265",
  699. bottomTex = "rbxassetid://179655033",
  700. leftTex = "rbxassetid://96430337",
  701. rightTex = "rbxassetid://96430337",
  702. sound = "rbxassetid://1102186681",
  703. soundVol = 1.25,
  704. hasGravity = false
  705. },
  706. {
  707. name = "Stone",
  708. size = Vector3.new(2.6, 2.6, 2.6),
  709. transparency = 0;
  710. frontTex = "rbxassetid://75880927",
  711. backTex = "rbxassetid://75880927",
  712. topTex = "rbxassetid://75880927",
  713. bottomTex = "rbxassetid://75880927",
  714. leftTex = "rbxassetid://75880927",
  715. rightTex = "rbxassetid://75880927",
  716. sound = "rbxassetid://1016978163",
  717. soundVol = 2,
  718. hasGravity = false
  719. },
  720. {
  721. name = "Diamond Ore",
  722. size = Vector3.new(2.6, 2.6, 2.6),
  723. transparency = 0;
  724. frontTex = "rbxassetid://57928490",
  725. backTex = "rbxassetid://57928490",
  726. topTex = "rbxassetid://57928490",
  727. bottomTex = "rbxassetid://57928490",
  728. leftTex = "rbxassetid://57928490",
  729. rightTex = "rbxassetid://57928490",
  730. sound = "rbxassetid://1016978163",
  731. soundVol = 2,
  732. hasGravity = false
  733. },
  734. {
  735. name = "Diamond Block",
  736. size = Vector3.new(2.6, 2.6, 2.6),
  737. transparency = 0;
  738. frontTex = "rbxassetid://56749955",
  739. backTex = "rbxassetid://56749955",
  740. topTex = "rbxassetid://56749955",
  741. bottomTex = "rbxassetid://56749955",
  742. leftTex = "rbxassetid://56749955",
  743. rightTex = "rbxassetid://56749955",
  744. sound = "rbxassetid://1016978163",
  745. soundVol = 2,
  746. hasGravity = false
  747. },
  748. {
  749. name = "Oak Wood Planks",
  750. size = Vector3.new(2.6, 2.6, 2.6),
  751. transparency = 0;
  752. frontTex = "rbxassetid://346201871",
  753. backTex = "rbxassetid://346201871",
  754. topTex = "rbxassetid://346201871",
  755. bottomTex = "rbxassetid://346201871",
  756. leftTex = "rbxassetid://346201871",
  757. rightTex = "rbxassetid://346201871",
  758. sound = "rbxassetid://507863457",
  759. soundVol = 2,
  760. hasGravity = false
  761. },
  762. {
  763. name = "Oak Log",
  764. size = Vector3.new(2.6, 2.6, 2.6),
  765. transparency = 0;
  766. frontTex = "rbxassetid://71445924",
  767. backTex = "rbxassetid://71445924",
  768. topTex = "rbxassetid://152538557",
  769. bottomTex = "rbxassetid://152538557",
  770. leftTex = "rbxassetid://71445924",
  771. rightTex = "rbxassetid://71445924",
  772. sound = "rbxassetid://507863457",
  773. soundVol = 2,
  774. hasGravity = false
  775. }
  776. }
  777. function putTexture(part, frontF, backF, topF, bottomF, leftF, rightF, className)
  778. local faces = {"Front", "Back", "Top", "Bottom", "Left", "Right"}
  779. for i,f in pairs(faces) do
  780. local decal = Instance.new(className, part)
  781. if i == 1 then decal.Texture = frontF decal.Name = f end
  782. if i == 2 then decal.Texture = backF or frontF decal.Name = f end
  783. if i == 3 then decal.Texture = topF or frontF decal.Name = f end
  784. if i == 4 then decal.Texture = bottomF or frontF decal.Name = f end
  785. if i == 5 then decal.Texture = leftF or frontF decal.Name = f end
  786. if i == 6 then decal.Texture = rightF or frontF decal.Name = f end
  787. decal.Face = f
  788. end
  789. return part
  790. end
  791. function makeSquare(position, size, color, transparency, parent, zindex)
  792. local label = Instance.new("TextLabel", parent)
  793. label.Text = ""
  794. label.BorderSizePixel = 0
  795. label.BackgroundTransparency = transparency
  796. label.Position = position
  797. label.Size = size
  798. label.BackgroundColor3 = color
  799. if zindex == nil then label.ZIndex = 1 else label.ZIndex = zindex end
  800. return label
  801. end
  802. function putInventorySlot(position, image, parent, zindex)
  803. local button = Instance.new("TextButton", parent)
  804. button.Position = position
  805. button.Size = UDim2.new(0, 36, 0, 36)
  806. button.BackgroundColor3 = Color3.new(139/255, 139/255, 139/255)
  807. button.Text = ""
  808. button.BorderSizePixel = 0
  809. button.ZIndex = zindex
  810. local imageLabel = Instance.new("ImageLabel", button)
  811. imageLabel.BackgroundTransparency = 0.9
  812. imageLabel.Position = UDim2.new(0, 2, 0, 2)
  813. imageLabel.Size = UDim2.new(0, 32, 0, 32)
  814. imageLabel.Image = image
  815. imageLabel.BorderSizePixel = 0
  816. imageLabel.ZIndex = zindex
  817. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 34, 0, 2),
  818. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  819. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 34),
  820. Color3.new(55/255, 55/255, 55/255), 0, button, zindex)
  821. makeSquare(UDim2.new(0, 34, 0, 2), UDim2.new(0, 2, 0, 34),
  822. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  823. makeSquare(UDim2.new(0, 2, 0, 34), UDim2.new(0, 34, 0, 2),
  824. Color3.new(255/255, 255/255, 255/255), 0, button, zindex)
  825. return button
  826. end
  827.  
  828. function AngleDifference(Angle1, Angle2)
  829. local Difference = {X = 0, Y = 0, Z = 0}
  830. Difference.X = Angle2.X - Angle1.X
  831.  
  832. if (Difference.X > 180) then
  833. Difference.X = Difference.X - 360
  834. elseif (Difference.X < -180) then
  835. Difference.X = Difference.X + 360
  836. end
  837.  
  838. Difference.Y = Angle2.Y - Angle1.Y
  839.  
  840. if (Difference.Y > 180) then
  841. Difference.Y = Difference.Y - 360
  842. elseif (Difference.Y < -180) then
  843. Difference.Y = Difference.Y + 360
  844. end
  845.  
  846. Difference.Z = Angle2.Z - Angle1.Z
  847.  
  848. if (Difference.Z > 180) then
  849. Difference.Z = Difference.Z - 360
  850. elseif (Difference.Z < -180) then
  851. Difference.Z = Difference.Z + 360
  852. end
  853.  
  854. return Vector3.new(Difference.X, Difference.Y, Difference.Z)
  855. end
  856.  
  857. local draggingBlock = nil
  858. function makeInventory()
  859. local playerGui = player:FindFirstChild("PlayerGui")
  860. if playerGui then
  861. local invGui = Instance.new("ScreenGui", playerGui)
  862. local creativeInv = Instance.new("Frame", invGui)
  863. creativeInv.BackgroundTransparency = 1
  864. creativeInv.Position = UDim2.new(0.5, -170, 0.5, -202)
  865.  
  866. creativeInv.Visible = false
  867.  
  868. -- creative inventory GUI...
  869.  
  870. local blackOut = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0),
  871. Color3.new(0/255, 0/255, 0/255), 0.3, invGui, 1)
  872. blackOut.Visible = false
  873.  
  874. creativeInv.Changed:connect(function()
  875. blackOut.Visible = creativeInv.Visible
  876. end)
  877.  
  878. local changeLog = Instance.new("TextLabel", invGui)
  879. changeLog.Text = Changelog
  880. changeLog.Font = "SourceSans"
  881. changeLog.FontSize = Enum.FontSize.Size12
  882. changeLog.Size = UDim2.new(0, changeLog.TextBounds.X, 0, changeLog.TextBounds.Y + 2)
  883. changeLog.BackgroundColor3 = Color3.new(0, 0, 0)
  884. changeLog.BorderSizePixel = 0
  885. changeLog.BackgroundTransparency = 0.5
  886. changeLog.Position = UDim2.new(0.5, -changeLog.Size.X.Offset/2, 0.5, -changeLog.Size.Y.Offset/2)
  887. changeLog.TextColor3 = Color3.new(1, 1, 1)
  888. changeLog.TextXAlignment = "Left"
  889. changeLog.TextYAlignment = "Top"
  890.  
  891. local coolButton = Instance.new("TextButton", changeLog)
  892. coolButton.Position = UDim2.new(1, -17, 0, 1)
  893. coolButton.Size = UDim2.new(0, 16, 0, 12)
  894. coolButton.Text = "X"
  895. coolButton.Font = "SourceSans"
  896. coolButton.FontSize = Enum.FontSize.Size12
  897. coolButton.BorderSizePixel = 0
  898. coolButton.BackgroundColor3 = Color3.new(1, 0, 0)
  899. coolButton.BackgroundTransparency = 0.2
  900. coolButton.TextColor3 = Color3.new(1, 1, 1)
  901. coolButton.TextStrokeTransparency = 0.5
  902. coolButton.ZIndex = 2
  903.  
  904. local line = makeSquare(UDim2.new(0, 0, 1, -14), UDim2.new(1, 0, 0, 14),
  905. Color3.new(0, 0, 0), 0.75, changeLog, 2)
  906.  
  907. local line2 = makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 0, 14),
  908. Color3.new(1, 1, 1), 0.9, changeLog, 1)
  909.  
  910. line2.Text = "Change Log"
  911. line2.TextColor3 = Color3.new(1, 1, 1)
  912. line2.TextStrokeTransparency = 0.75
  913. line2.Font = "SourceSans"
  914. line2.FontSize = Enum.FontSize.Size12
  915.  
  916. line.Text = "Made by Depr1"
  917. line.TextColor3 = Color3.new(1, 0.65, 0)
  918. line.TextStrokeTransparency = 0.5
  919. line.Font = "SourceSans"
  920. line.FontSize = Enum.FontSize.Size14
  921. line.TextXAlignment = "Left"
  922.  
  923. coolButton.MouseButton1Click:connect(function()
  924. changeLog.Visible = false
  925. end)
  926.  
  927. makeSquare(UDim2.new(0, -2, 0, 2), UDim2.new(0, 340, 0, 404),
  928. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  929. makeSquare(UDim2.new(0, 338, 0, 0), UDim2.new(0, 6, 0, 406),
  930. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 2)
  931. makeSquare(UDim2.new(0, 0, 0, 404), UDim2.new(0, 342, 0, 4),
  932. Color3.new(85/255, 85/255, 85/255), 0, creativeInv, 3)
  933. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 338, 0, 402),
  934. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 3)
  935. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 4, 0, 406),
  936. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 3)
  937. makeSquare(UDim2.new(0, -2, 0, -4), UDim2.new(0, 342, 0, 6),
  938. Color3.new(255/255, 255/255, 255/255), 0, creativeInv, 2)
  939. makeSquare(UDim2.new(0, 340, 0, -2), UDim2.new(0, 2, 0, 2),
  940. Color3.new(198/255, 198/255, 198/255), 0, creativeInv, 2)
  941. makeSquare(UDim2.new(0, 340, 0, -4), UDim2.new(0, 2, 0, 4),
  942. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  943. makeSquare(UDim2.new(0, 342, 0, -2), UDim2.new(0, 2, 0, 2),
  944. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  945. makeSquare(UDim2.new(0, 344, 0, 0), UDim2.new(0, 2, 0, 406),
  946. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  947. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 2, 0, 4),
  948. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  949. makeSquare(UDim2.new(0, -2, 0, -6), UDim2.new(0, 342, 0, 4),
  950. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  951. makeSquare(UDim2.new(0, 0, 0, 406), UDim2.new(0, 342, 0, 4),
  952. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  953. makeSquare(UDim2.new(0, 342, 0, 404), UDim2.new(0, 2, 0, 4),
  954. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  955. makeSquare(UDim2.new(0, -4, 0, 404), UDim2.new(0, 2, 0, 2),
  956. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  957. makeSquare(UDim2.new(0, -2, 0, 406), UDim2.new(0, 2, 0, 2),
  958. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  959. makeSquare(UDim2.new(0, -6, 0, -2), UDim2.new(0, 2, 0, 406),
  960. Color3.new(0/255, 0/255, 0/255), 0, creativeInv, 1)
  961. 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)
  962. text.Text = "Creative Inventory"
  963. text.Font = "SourceSansSemibold"
  964. text.TextSize = 14
  965. text.TextXAlignment = "Left"
  966. --
  967. local draggingBlockPicture = Instance.new("ImageLabel", invGui)
  968. draggingBlockPicture.BackgroundTransparency = 1
  969. draggingBlockPicture.Size = UDim2.new(0, 32, 0, 32)
  970. draggingBlockPicture.ZIndex = 5
  971. coroutine.resume(coroutine.create(function()
  972. local invMouse = player:GetMouse()
  973. --local RS = game:GetService("RunService").RenderStepped
  974. invMouse.Button2Down:connect(function()
  975. draggingBlock = nil
  976. end)
  977. while RS:wait() do
  978. draggingBlockPicture.Position = UDim2.new(0, invMouse.X - 16, 0, invMouse.Y - 16)
  979. if draggingBlock ~= nil then
  980. draggingBlockPicture.Image = draggingBlock.frontTex
  981. else
  982. draggingBlockPicture.Image = ""
  983. end
  984. end
  985. end))
  986.  
  987. local done = false
  988. local x = 0
  989. local y = 0
  990.  
  991. for i,b in pairs(creativeInventory) do
  992. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), b.frontTex, creativeInv, 4).MouseButton1Down:connect(function()
  993. if draggingBlock == nil then
  994. draggingBlock = b
  995. end
  996. end)
  997. x = x + 1
  998. if x >= 8 then
  999. x = 0
  1000. y = y + 1
  1001. end
  1002. end
  1003. if x == 0 then done = true end
  1004. while x < 8 and done == false do
  1005. putInventorySlot(UDim2.new(0.5, (x*36) + 8, 0.5, (y*36) + 28), "", creativeInv, 4)
  1006. x = x + 1
  1007. end
  1008. for i = 1, 9 do
  1009. if toolBar[i] ~= nil then
  1010. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), toolBar[i].frontTex, creativeInv, 4)
  1011. invSlot.MouseButton2Down:connect(function()
  1012. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1013. if imgLabel then
  1014. toolBar[i] = nil
  1015. imgLabel.Image = ""
  1016. end
  1017. end)
  1018. invSlot.MouseButton1Down:connect(function()
  1019. --updateHand = true
  1020. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1021. if toolBar[i] == nil then
  1022. toolBar[i] = draggingBlock
  1023. imgLabel.Image = draggingBlock.frontTex
  1024. draggingBlock = nil
  1025. return
  1026. end
  1027. if toolBar[i] ~= nil and draggingBlock == nil then
  1028. draggingBlock = toolBar[i]
  1029. toolBar[i] = nil
  1030. imgLabel.Image = ""
  1031. return
  1032. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1033. --draggingBlock = toolBar[i]
  1034. --toolBar[i] = nil
  1035. imgLabel.Image = ""
  1036. local temp = toolBar[i]
  1037. toolBar[i] = draggingBlock
  1038. if imgLabel and draggingBlock ~= nil then
  1039. imgLabel.Image = draggingBlock.frontTex
  1040. end
  1041. if imgLabel and draggingBlock == nil then
  1042. imgLabel.Image = ""
  1043. end
  1044. draggingBlock = temp
  1045. return
  1046. end
  1047. end)
  1048. else
  1049. local invSlot = putInventorySlot(UDim2.new(0, 8 + ((i-1)*36), 0, 360), "", creativeInv, 4)
  1050. invSlot.MouseButton2Down:connect(function()
  1051. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1052. if imgLabel then
  1053. toolBar[i] = nil
  1054. imgLabel.Image = ""
  1055. end
  1056. end)
  1057. invSlot.MouseButton1Down:connect(function()
  1058. --updateHand = true
  1059. local imgLabel = invSlot:FindFirstChild("ImageLabel")
  1060. if toolBar[i] == nil then
  1061. toolBar[i] = draggingBlock
  1062. imgLabel.Image = draggingBlock.frontTex
  1063. draggingBlock = nil
  1064. return
  1065. end
  1066. if toolBar[i] ~= nil and draggingBlock == nil then
  1067. draggingBlock = toolBar[i]
  1068. toolBar[i] = nil
  1069. imgLabel.Image = ""
  1070. return
  1071. elseif toolBar[i] ~= nil and draggingBlock ~= nil then
  1072. --draggingBlock = toolBar[i]
  1073. --toolBar[i] = nil
  1074. imgLabel.Image = ""
  1075. local temp = toolBar[i]
  1076. toolBar[i] = draggingBlock
  1077. if imgLabel and draggingBlock ~= nil then
  1078. imgLabel.Image = draggingBlock.frontTex
  1079. end
  1080. if imgLabel and draggingBlock == nil then
  1081. imgLabel.Image = ""
  1082. end
  1083. draggingBlock = temp
  1084. return
  1085. end
  1086. end)
  1087. end
  1088. end
  1089. return creativeInv
  1090. end
  1091. end
  1092. function putToolBarSlot(position, image, zindex)
  1093. local playerGui = player:FindFirstChild("PlayerGui")
  1094. if playerGui then
  1095. local gui = playerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", playerGui)
  1096. gui.Name = "ToolBar"
  1097. local slot = Instance.new("ImageLabel", gui)
  1098. slot.Position = position
  1099. slot.Size = UDim2.new(0, 32, 0, 32)
  1100. slot.BackgroundTransparency = 1
  1101. slot.ImageTransparency = 0
  1102. slot.Image = image
  1103. slot.ZIndex = 2
  1104.  
  1105. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 32, 0, 32),
  1106. Color3.new(95/255, 89/255, 76/255), 0, slot)
  1107. makeSquare(UDim2.new(0, 0, 0, 0), UDim2.new(0, 2, 0, 32),
  1108. Color3.new(0/255, 0/255, 0/255), 0.5, slot)
  1109. makeSquare(UDim2.new(0, 2, 0, 0), UDim2.new(0, 30, 0, 2),
  1110. Color3.new(0/255, 0/255, 0/255), 0.5, slot)
  1111. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 36, 0, 2),
  1112. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1113. makeSquare(UDim2.new(0, -2, 0, -2), UDim2.new(0, 2, 0, 36),
  1114. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1115. makeSquare(UDim2.new(0, 0, 0, 32), UDim2.new(0, 34, 0, 2),
  1116. Color3.new(130/255, 130/255, 130/255), 0, slot)
  1117. makeSquare(UDim2.new(0, 32, 0, 0), UDim2.new(0, 2, 0, 34),
  1118. Color3.new(130/255, 130/255, 130/255), 0, slot)
  1119. makeSquare(UDim2.new(0, -4, 0, -2), UDim2.new(0, 2, 0, 38),
  1120. Color3.new(130/255, 130/255, 130/255), 0, slot)
  1121. makeSquare(UDim2.new(0, 34, 0, -2), UDim2.new(0, 2, 0, 36),
  1122. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1123. makeSquare(UDim2.new(0, -2, 0, 34), UDim2.new(0, 38, 0, 2),
  1124. Color3.new(106/255, 106/255, 106/255), 0, slot)
  1125. makeSquare(UDim2.new(0, -4, 0, -4), UDim2.new(0, 40, 0, 2),
  1126. Color3.new(156/255, 156/255, 156/255), 0, slot)
  1127. return slot
  1128. end
  1129. end
  1130. function divide(x, d)
  1131. if x ~= 0 and d ~= 0 then
  1132. return x/d
  1133. else
  1134. return x
  1135. end
  1136. end -- so it doesn't divide by zero
  1137. function getDistance(v1, v2)
  1138. return math.abs((Vector3.new(math.abs(v2.X - v1.X), math.abs(v2.Y - v1.Y), math.abs(v2.Z - v1.Z))).Magnitude)
  1139. end
  1140. function round(x)
  1141. if x%2 ~= 0.5 then
  1142. return math.floor(x+0.5)
  1143. end
  1144. return x-0.5
  1145. end
  1146. function weldTo(part1, part2)
  1147. local weld = Instance.new("Weld", part1)
  1148. weld.Part0 = part1
  1149. weld.Part1 = part2
  1150. end
  1151. function getMagnitudeXZ(velocity)
  1152. return math.sqrt(math.abs(velocity.X)^2 + math.abs(velocity.Z)^2)
  1153. end
  1154. function findHumanoid(inst)
  1155. local find = inst
  1156. local hum = nil
  1157. repeat
  1158. if find.Name == "Workspace" then return nil end
  1159. find = find.Parent
  1160. hum = find:FindFirstChild("Humanoid")
  1161. until hum
  1162. --if hum then print("found!!") else print("aw... not found") end
  1163. --if hum.ClassName ~= "Humanoid" then hum = nil end
  1164. return hum
  1165. end
  1166. function placeBlock(block, cFPos, Mouse)
  1167. if block == nil then
  1168. if Mouse.Target.Size.X <= 10 and Mouse.Target.Size.Y <= 10 and Mouse.Target.Size.Z <= 10 and Mouse.Target then
  1169. if Mouse.Target.Parent.Name ~= "Camera" then
  1170. --print(Mouse.Target:GetFullName())
  1171. local blkTar = Mouse.Target
  1172. --Mouse.Target.Parent = nil
  1173. for i = 1, 9 do
  1174. local part = Instance.new("Part", workspace)
  1175. part.Size = Vector3.new(0, 0, 0)
  1176. part.Transparency = 1
  1177. part.CanCollide = false
  1178. part.Velocity = Vector3.new(math.random(-5, 5), 5, math.random(-5, 5))
  1179. part.Name = "Debris"
  1180.  
  1181. part.CFrame =
  1182. Mouse.Target.CFrame *
  1183. 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))
  1184.  
  1185. local billboard = Instance.new("BillboardGui", part)
  1186. billboard.Size = UDim2.new(1.2, 0, 1.2, 0)
  1187.  
  1188. local clipDescendant = Instance.new("TextLabel", billboard)
  1189. clipDescendant.Size = UDim2.new(0.5, 0, 0.5, 0)
  1190. clipDescendant.BackgroundTransparency = 1
  1191. clipDescendant.Text = ""
  1192. clipDescendant.ClipsDescendants = true
  1193.  
  1194. local img = Instance.new("ImageLabel", clipDescendant)
  1195. img.Size = UDim2.new(2, 0, 2, 0)
  1196. img.BackgroundTransparency = 1
  1197. img.Position = UDim2.new((math.random(0, 100)-50)/100, 0, (math.random(0, 100)-50)/100, 0)
  1198.  
  1199. local tex = blkTar:FindFirstChild("Front")
  1200. if tex then
  1201. img.Image = tex.Texture
  1202. else
  1203. img.Image = "rbxassetid://744949545"
  1204. end
  1205.  
  1206. if img.Image == "rbxassetid://744949545" then
  1207. img.ImageColor3 = blkTar.Color
  1208. end
  1209.  
  1210. part.Touched:connect(function(prt)
  1211. if prt ~= blkTar then
  1212. part.CanCollide = true
  1213. end
  1214. end)
  1215.  
  1216. coroutine.resume(coroutine.create(function()
  1217. wait(math.random(50, 65)/100)
  1218. part:Destroy()
  1219. end))
  1220. --part.Anchored = false
  1221. end
  1222. blkTar:Destroy()
  1223. end
  1224. end
  1225. return nil
  1226. else
  1227. local blockPlaced = Instance.new("Part", workspace)
  1228. blockPlaced.Material = "Fabric"
  1229. blockPlaced.Transparency = block.transparency
  1230. blockPlaced.Anchored = true
  1231. blockPlaced.Size = block.size
  1232. blockPlaced.CFrame = cFPos
  1233. blockPlaced.Name = block.name
  1234. putTexture(blockPlaced, block.frontTex, block.backTex,
  1235. block.topTex, block.bottomTex, block.leftTex, block.rightTex, "Texture")
  1236.  
  1237. if block.hasGravity == true then
  1238. local connectedTo = Instance.new("ObjectValue", blockPlaced)
  1239. connectedTo.Name = "ConnectedTo"
  1240. blockPlaced.Anchored = false
  1241. blockPlaced.CanCollide = false
  1242. local detector = Instance.new("Part", workspace:WaitForChild("Camera"))
  1243. detector.Transparency = 1
  1244. detector.CanCollide = false
  1245. detector.Size = Vector3.new(1, 0, 1)
  1246. local weldDetector = Instance.new("Motor6D", detector)
  1247. weldDetector.Part0 = detector
  1248. weldDetector.Part1 = blockPlaced
  1249. weldDetector.C1 = CFrame.new(0, -blockPlaced.Size.Y/2, 0)
  1250. local landed = false
  1251. local function fallingBlock()
  1252. coroutine.resume(coroutine.create(function()
  1253. local falling = Instance.new("CFrameValue", blockPlaced)
  1254. falling.Name = "IsFalling"
  1255. local grav = 0
  1256. while RS:wait() do
  1257. if landed then falling:Destroy() break end
  1258. grav = math.max(-1, grav - 0.0025)
  1259. blockPlaced.CFrame = CFrame.new(cFPos.X, blockPlaced.CFrame.Y + grav, cFPos.Z)
  1260. end
  1261. end))
  1262. end
  1263. fallingBlock()
  1264. detector.Touched:connect(function(part)
  1265. if blockPlaced.Anchored == false and part ~= blockPlaced and part.Name ~= "Debris" and part:FindFirstChild("IsFalling") == nil and findHumanoid(part) == nil then
  1266. landed = true
  1267. blockPlaced.CanCollide = true
  1268. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  1269. blockPlaced.Anchored = true
  1270. connectedTo.Value = part
  1271. local yOrigin = part.CFrame.Y + (blockPlaced.Size.Y/2) + (part.Size.Y/2)
  1272. blockPlaced.CFrame = CFrame.new(cFPos.X, yOrigin, cFPos.Z)
  1273. --detector:Destroy()
  1274. local falling = false
  1275. part.Changed:connect(function()
  1276. if part.Position.Y ~= yOrigin and falling == false then
  1277. falling = true
  1278. wait(0.075)
  1279. landed = false
  1280. blockPlaced.Anchored = false
  1281. blockPlaced.CanCollide = false
  1282. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  1283. fallingBlock()
  1284. falling = false
  1285. end
  1286. end)
  1287. workspace.ChildRemoved:connect(function()
  1288. --print("hi")
  1289. if connectedTo.Value.Parent == nil and falling == false then
  1290. falling = true
  1291. landed = false
  1292. blockPlaced.Anchored = false
  1293. blockPlaced.CanCollide = false
  1294. blockPlaced.Velocity = Vector3.new(0, 0, 0)
  1295. fallingBlock()
  1296. end
  1297. end)
  1298. end
  1299. end)
  1300. end
  1301.  
  1302. local blockSound = Instance.new("Sound", blockPlaced)
  1303. blockSound.SoundId = block.sound
  1304. blockSound.Volume = block.soundVol
  1305. blockSound.Pitch = math.random(95, 105)/100
  1306. blockSound.PlayOnRemove = true
  1307. blockSound:Play()
  1308. return blockPlaced
  1309. end
  1310. end
  1311. if player then
  1312. local char = player.Character
  1313. if char then
  1314. for _,cM in pairs(char:GetChildren()) do
  1315. if cM.ClassName == "CharacterMesh" then cM:Destroy() end
  1316. end
  1317.  
  1318. --[]
  1319. local gui = player.PlayerGui:FindFirstChild("ToolBar") or Instance.new("ScreenGui", player.PlayerGui)
  1320. gui.Name = "ToolBar"
  1321.  
  1322. makeSquare(UDim2.new(0.5, -166, 1, -111), UDim2.new(0, 364, 0, 44),
  1323. Color3.new(0/255, 0/255, 0/255), 0, gui)
  1324.  
  1325. for i = 1, 9 do
  1326. if toolBar[i] ~= nil then
  1327. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), toolBar[i].frontTex)
  1328. coroutine.resume(coroutine.create(function()
  1329. while wait() do
  1330. if toolBar[i] ~= nil then
  1331. img.Image = toolBar[i].frontTex
  1332. else
  1333. img.Image = ""
  1334. end
  1335. end
  1336. end))
  1337. else
  1338. local img = putToolBarSlot(UDim2.new(0.5, -160 + ((i-1)*40), 1, -105), "")
  1339. coroutine.resume(coroutine.create(function()
  1340. while wait() do
  1341. if toolBar[i] ~= nil then
  1342. img.Image = toolBar[i].frontTex
  1343. else
  1344. img.Image = ""
  1345. end
  1346. end
  1347. end))
  1348. end
  1349. end
  1350.  
  1351. local creativeInventoryGUI = makeInventory()
  1352.  
  1353. local humRootPart = char:WaitForChild("HumanoidRootPart")
  1354. local head = char:WaitForChild("Head")
  1355. local torso = char:WaitForChild("Torso")
  1356. local lArm = char:WaitForChild("Left Arm")
  1357. local rArm = char:WaitForChild("Right Arm")
  1358. local lLeg = char:WaitForChild("Left Leg")
  1359. local rLeg = char:WaitForChild("Right Leg")
  1360.  
  1361. local humanoid = char:WaitForChild("Humanoid")
  1362. char.Humanoid:ClearAllChildren()
  1363. humanoid.HipHeight = 0.3
  1364. humanoid.AutoRotate = false
  1365.  
  1366. humanoid.Parent = nil
  1367.  
  1368. if char:FindFirstChild("Animate") then
  1369. char.Animate:Remove()
  1370. end
  1371.  
  1372. head.Size = Vector3.new(1.3, 1.3, 1.3)
  1373. putTexture(head, "rbxassetid://38738031", "rbxassetid://36047330",
  1374. "rbxassetid://36047341", "rbxassetid://36047347",
  1375. "rbxassetid://36047323", "rbxassetid://36047315", "Decal")
  1376. head:WaitForChild("Mesh"):Destroy()
  1377. head:WaitForChild("face"):Destroy()
  1378.  
  1379. torso.Size = Vector3.new(1.3, 1.95, 0.65)
  1380. putTexture(torso, "rbxassetid://38934753", "rbxassetid://38934731",
  1381. "rbxassetid://38934780", "rbxassetid://38934740",
  1382. "rbxassetid://38934762", "rbxassetid://38934762", "Decal")
  1383.  
  1384. lArm.Size = Vector3.new(0.65, 1.95, 0.65)
  1385. putTexture(lArm, "rbxassetid://38934581", "rbxassetid://38934560",
  1386. "rbxassetid://38934613", "rbxassetid://38934568",
  1387. "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
  1388.  
  1389. rArm.Size = Vector3.new(0.65, 1.95, 0.65)
  1390. putTexture(rArm, "rbxassetid://38934560", "rbxassetid://38934581",
  1391. "rbxassetid://38934613", "rbxassetid://38934568",
  1392. "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
  1393.  
  1394. lLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  1395. putTexture(lLeg, "rbxassetid://38936226", "rbxassetid://38936209",
  1396. "rbxassetid://38934719", "rbxassetid://38934712",
  1397. "rbxassetid://38936255", "rbxassetid://38936242", "Decal")
  1398.  
  1399. rLeg.Size = Vector3.new(0.65, 1.95, 0.65)
  1400. putTexture(rLeg, "rbxassetid://38936209", "rbxassetid://38936226",
  1401. "rbxassetid://38934719", "rbxassetid://38934712",
  1402. "rbxassetid://38936242", "rbxassetid://38936255", "Decal")
  1403.  
  1404. -- now for the real stuff
  1405. -- |
  1406. -- |
  1407. -- V
  1408. Instance.new("BlockMesh", torso)
  1409. Instance.new("BlockMesh", lArm)
  1410. Instance.new("BlockMesh", rArm)
  1411. Instance.new("BlockMesh", lLeg)
  1412. Instance.new("BlockMesh", rLeg)
  1413.  
  1414. local camera = workspace.Camera
  1415.  
  1416. local camPart = Instance.new("Part", camera)
  1417. camPart.Size = Vector3.new(0, 0, 0)
  1418. camPart.CFrame = camera.CFrame
  1419. camPart.CanCollide = false
  1420. camPart.Anchored = true
  1421. camPart.Transparency = 1
  1422.  
  1423. local cameraHand = Instance.new("Part", camera)
  1424. cameraHand.Size = Vector3.new(0.65, 1.95, 0.65)
  1425. cameraHand.CanCollide = false
  1426. cameraHand.Anchored = true
  1427. cameraHand.Name = "CameraHand"
  1428. putTexture(cameraHand, "rbxassetid://38934560", "rbxassetid://38934581",
  1429. "rbxassetid://38934613", "rbxassetid://38934568",
  1430. "rbxassetid://38934601", "rbxassetid://38934591", "Decal")
  1431.  
  1432. local cameraHandItem = Instance.new("Part", camera)
  1433. cameraHandItem.Name = "CameraHandItem"
  1434. cameraHandItem.Size = Vector3.new(1.1, 1.1, 1.1)
  1435. cameraHandItem.Anchored = true
  1436. cameraHandItem.CanCollide = false
  1437. cameraHandItem.Transparency = 1
  1438.  
  1439. -- welding doesn't really work.
  1440. --local cameraHandWeld = Instance.new("Motor6D", camPart)
  1441. --cameraHandWeld.Part0 = camPart
  1442. --cameraHandWeld.Part1 = cameraHand
  1443. --cameraHandWeld.C0 = CFrame.new(5, 0, 0)
  1444.  
  1445. local rootJoint = torso:FindFirstChild("RootJoint") or Instance.new("Motor6D", torso)
  1446. rootJoint.Name = "RootJoint"
  1447. rootJoint.Part0 = humRootPart
  1448. rootJoint.Part1 = torso
  1449. rootJoint.C1 = CFrame.new(0, 0.05, 0)
  1450.  
  1451. local neck = torso:FindFirstChild("Neck") or Instance.new("Motor6D", torso)
  1452. neck.Name = "Neck"
  1453. neck.Part0 = head
  1454. neck.Part1 = torso
  1455.  
  1456. local lS = torso:FindFirstChild("Left Shoulder") or Instance.new("Motor6D", torso)
  1457. lS.Name = "Left Shoulder"
  1458. lS.Part0 = lArm
  1459. lS.Part1 = torso
  1460. lS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
  1461. lS.C1 = CFrame.new(0.65, 0.975, 0)
  1462.  
  1463. local rS = torso:FindFirstChild("Right Shoulder") or Instance.new("Motor6D", torso)
  1464. rS.Name = "Right Shoulder"
  1465. rS.Part0 = rArm
  1466. rS.Part1 = torso
  1467. rS.C0 = CFrame.new(-0.325, 0.975, 0) * CFrame.Angles(0, 0, 0)
  1468. rS.C1 = CFrame.new(-0.65, 0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
  1469.  
  1470. local lH = torso:FindFirstChild("Left Hip") or Instance.new("Motor6D", torso)
  1471. lH.Name = "Left Hip"
  1472. lH.Part0 = lLeg
  1473. lH.Part1 = torso
  1474. lH.C0 = CFrame.new(0, 0.975, 0)
  1475. lH.C1 = CFrame.new(0.325, -0.975, 0) * CFrame.Angles(0, 0, 0)
  1476.  
  1477. local rH = torso:FindFirstChild("Right Hip") or Instance.new("Motor6D", torso)
  1478. rH.Name = "Right Hip"
  1479. rH.Part0 = rLeg
  1480. rH.Part1 = torso
  1481. rH.C0 = CFrame.new(0, 0.975, 0)
  1482. rH.C1 = CFrame.new(-0.325, -0.975, 0) * CFrame.Angles(0, -math.rad(180), 0)
  1483.  
  1484. for _,p in pairs(char:GetChildren()) do
  1485. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  1486. local hit = Instance.new("Part", char)
  1487. hit.Name = "DamagePart"
  1488. hit.BrickColor = BrickColor.new("Bright red")
  1489. hit.Material = "SmoothPlastic"
  1490. hit.Transparency = 1
  1491. hit.Size = Vector3.new(p.Size.X + 0.05, p.Size.Y + 0.05, p.Size.Z + 0.05)
  1492. hit.CanCollide = false
  1493. weldTo(hit, p)
  1494. end
  1495. end
  1496.  
  1497. wait(0.25)
  1498.  
  1499. -- local billNameTag = Instance.new("BillboardGui", char)
  1500. -- billNameTag.Size = UDim2.new(1, 0, 1, 0)
  1501. -- billNameTag.Adornee = head
  1502. -- billNameTag.PlayerToHideFrom = player
  1503. --
  1504. -- local textLabel = Instance.new("TextLabel", billNameTag)
  1505. -- textLabel.Font = "Arcade"
  1506. -- --textLabel.Size = UDim2.new(1, 0, 1, 0)
  1507. -- textLabel.TextScaled = true
  1508. -- --textLabel.TextSize = 100
  1509. -- textLabel.Text = targetName
  1510. -- textLabel.Size = UDim2.new(textLabel.TextBounds.X/100, 0, 0.75, 0)
  1511. -- textLabel.BorderSizePixel = 0
  1512. -- textLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  1513. -- textLabel.TextColor3 = Color3.new(1, 1, 1)
  1514. -- textLabel.BackgroundTransparency = 0.5
  1515. --
  1516. -- if textLabel.Text == "Depr1" then
  1517. -- textLabel.TextColor3 = Color3.new(1, 0.75, 0)
  1518. -- end
  1519. --
  1520. -- billNameTag.SizeOffset = Vector2.new(-textLabel.TextBounds.X/200 + 0.5, 0)
  1521. -- billNameTag.StudsOffset = Vector3.new(0, 1.5, 0)
  1522.  
  1523.  
  1524. humanoid.Parent = char
  1525.  
  1526. local ticks = 0
  1527. local times = 0
  1528.  
  1529. local walkAnim = 0
  1530. local increaseWalkAnim = 1
  1531.  
  1532. local idleAnimRotX = 0
  1533. local idleAnimRotZ = 0
  1534. local sneaking = 0
  1535.  
  1536. --local RS = game:GetService("RunService").RenderStepped
  1537. local Mouse = player:GetMouse()
  1538.  
  1539. local oldHP = humanoid.Health
  1540. local damageTime = 0
  1541.  
  1542. local punchRotX = 0
  1543. local punchRotY = 0
  1544. local punchRotZ = 0
  1545. local punchRotXcam = 0
  1546. local punchRotYcam = 0
  1547. local punchRotZcam = 0
  1548. local punchSpeed = 0
  1549. local punching = 0
  1550. local selectedBlock = 8
  1551. local punchEnded = 1
  1552. local itemOnHand = nil
  1553.  
  1554. local selectBox = Instance.new("SelectionBox", camera)
  1555. selectBox.Transparency = 0.5
  1556. selectBox.Color3 = Color3.new(0, 0, 0)
  1557. selectBox.LineThickness = 0
  1558.  
  1559. local handItem = Instance.new("Part", char)
  1560. handItem.Name = "HandItem"
  1561. handItem.Size = Vector3.new(0.52, 0.52, 0.52)
  1562. handItem.Transparency = 1
  1563. handItem.CanCollide = false
  1564.  
  1565. local handItemWeld = Instance.new("Weld", char)
  1566. handItemWeld.Part0 = handItem
  1567. handItemWeld.Part1 = lArm
  1568. handItemWeld.C1 = CFrame.new(0, -0.9, -0.6) * CFrame.Angles(math.rad(-10), math.rad(45), 0)
  1569.  
  1570. local sound = Instance.new("Sound", char)
  1571. sound.Name = "Hurt"
  1572. sound.Volume = 10
  1573. sound.SoundId = "rbxassetid://535690488"
  1574.  
  1575. local facesToResize = {"Front", "Back", "Left", "Right", "Bottom", "Top"}
  1576.  
  1577. local camCurrentZoom = (camera.CFrame.p - head.Position).magnitude
  1578. Mouse.Button1Down:connect(function()
  1579. if punchEnded == 1 then punching = 1 end
  1580. if Mouse.Target then
  1581. if getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  1582. local humanoid = Mouse.Target.Parent:FindFirstChild("Humanoid")
  1583. if humanoid then
  1584. humanoid.Health = humanoid.Health - 10
  1585. local parts = Mouse.Target.Parent:GetChildren()
  1586. for _,p in pairs(parts) do
  1587. if p.ClassName == "Part" then
  1588. 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))
  1589. end
  1590. end
  1591. return
  1592. end
  1593. local x = Mouse.Target.CFrame.p.X
  1594. local y = Mouse.Target.CFrame.p.Y
  1595. local z = Mouse.Target.CFrame.p.Z
  1596. if Mouse.TargetSurface.Name == "Right" then x = x + 2.6 end
  1597. if Mouse.TargetSurface.Name == "Left" then x = x - 2.6 end
  1598. if Mouse.TargetSurface.Name == "Top" then y = y + 2.6 end
  1599. if Mouse.TargetSurface.Name == "Bottom" then y = y - 2.6 end
  1600. if Mouse.TargetSurface.Name == "Back" then z = z + 2.6 end
  1601. if Mouse.TargetSurface.Name == "Front" then z = z - 2.6 end
  1602. if Mouse.Target.Size.X > 2.6 or Mouse.Target.Size.Y > 2.6 or Mouse.Target.Size.Z > 2.6 then
  1603. x = Mouse.Hit.p.X
  1604. y = Mouse.Hit.p.Y
  1605. z = Mouse.Hit.p.Z
  1606. end
  1607. -- local x = round(math.abs(mouseX)/2.6)*2.6
  1608. -- local y = round(math.abs(mouseY)/2.6)*2.6
  1609. -- local z = round(math.abs(mouseZ)/2.6)*2.6
  1610. -- if Mouse.Hit.p.X < 0 then x = x * -1 end
  1611. -- if Mouse.Hit.p.Y < 0 then y = y * -1 end
  1612. -- if Mouse.Hit.p.Z < 0 then z = z * -1 end
  1613. local blk = placeBlock(toolBar[selectedBlock + 1], CFrame.new(x, y, z), Mouse)
  1614. if blk then
  1615. for _,f in pairs(facesToResize) do
  1616. blk:WaitForChild(f).StudsPerTileU = 2.6
  1617. blk:WaitForChild(f).StudsPerTileV = 2.6
  1618. end
  1619. end
  1620. end
  1621. end
  1622. end)
  1623.  
  1624. local changedItem = false
  1625. local hasItemOnHand = 0
  1626. local hi = 0
  1627. -- selection thingy
  1628. local selectLabel = Instance.new("TextLabel", gui)
  1629. selectLabel.Size = UDim2.new(0, 32, 0, 32)
  1630. selectLabel.Position = UDim2.new(0.5, -160 + (selectedBlock*40), 1, -105)
  1631. selectLabel.BackgroundTransparency = 0.5
  1632. selectLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  1633. selectLabel.BorderSizePixel = 0
  1634. selectLabel.Text = ""
  1635. selectLabel.ZIndex = 3
  1636. --
  1637. local oldItemOnHand = itemOnHand
  1638. function updateItemOnHand()
  1639. for _,d in pairs(handItem:GetChildren()) do
  1640. d:Destroy()
  1641. end
  1642. for _,d in pairs(cameraHandItem:GetChildren()) do
  1643. d:Destroy()
  1644. end
  1645. if itemOnHand ~= nil then
  1646. putTexture(handItem, itemOnHand.frontTex, itemOnHand.backTex,
  1647. itemOnHand.topTex, itemOnHand.bottomTex,
  1648. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  1649.  
  1650. putTexture(cameraHandItem, itemOnHand.frontTex, itemOnHand.backTex,
  1651. itemOnHand.topTex, itemOnHand.bottomTex,
  1652. itemOnHand.leftTex, itemOnHand.rightTex, "Texture")
  1653.  
  1654. for _,f in pairs(facesToResize) do
  1655. handItem:WaitForChild(f).StudsPerTileU = 0.52
  1656. handItem:WaitForChild(f).StudsPerTileV = 0.52
  1657. end
  1658.  
  1659. for _,f in pairs(facesToResize) do
  1660. cameraHandItem:WaitForChild(f).StudsPerTileU = 1.1
  1661. cameraHandItem:WaitForChild(f).StudsPerTileV = 1.1
  1662. end
  1663.  
  1664. cameraHand.Transparency = 1
  1665. for _,f in pairs(facesToResize) do
  1666. cameraHand:WaitForChild(f).Transparency = 1
  1667. cameraHand:WaitForChild(f).Transparency = 1
  1668. end
  1669. else
  1670. cameraHand.Transparency = 0
  1671. for _,f in pairs(facesToResize) do
  1672. cameraHand:WaitForChild(f).Transparency = 0
  1673. cameraHand:WaitForChild(f).Transparency = 0
  1674. end
  1675. end
  1676. if oldItemOnHand ~= itemOnHand then
  1677. changedItem = true
  1678. end
  1679. end
  1680.  
  1681. local pressedWTimes = 0
  1682. local sprintingNum = 0
  1683. local sprinting = false
  1684. Mouse.KeyDown:connect(function(key)
  1685. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  1686. if (key == "w" and sprinting == false and sneaking == 0) then
  1687. if pressedWTimes >= 1 or key == Enum.KeyCode.LeftControl then
  1688. sprinting = true
  1689. humanoid.WalkSpeed = humanoid.WalkSpeed * 1.5
  1690. pressedWTimes = 0
  1691. coroutine.resume(coroutine.create(function()
  1692. for i = 1, 24 do
  1693. camera.FieldOfView = camera.FieldOfView + ((24-i)/10)
  1694. RS:wait()
  1695. end
  1696. end))
  1697. end
  1698. pressedWTimes = pressedWTimes + 1
  1699. coroutine.resume(coroutine.create(function()
  1700. for i = 1, 9 do
  1701. if sprinting == true then break end
  1702. wait()
  1703. end
  1704. pressedWTimes = 0
  1705. end))
  1706. end
  1707. if key == "q" and sprinting == false then
  1708. sneaking = 1
  1709. humanoid.WalkSpeed = humanoid.WalkSpeed / 2
  1710. humanoid.HipHeight = humanoid.HipHeight - 0.35
  1711. rootJoint.C1 = CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  1712. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  1713. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  1714. --print("Sneaking...")
  1715. end
  1716. if key == "e" then
  1717. if creativeInventoryGUI.Visible == true then
  1718. creativeInventoryGUI.Visible = false
  1719. elseif creativeInventoryGUI.Visible == false then
  1720. creativeInventoryGUI.Visible = true
  1721. end
  1722. end
  1723. if key == "1" or key == "2" or key == "3" or
  1724. key == "4" or key == "5" or key == "6" or
  1725. key == "7" or key == "8" or key == "9" then
  1726. selectedBlock = tonumber(key) - 1
  1727. oldItemOnHand = itemOnHand
  1728. itemOnHand = toolBar[tonumber(key)]
  1729. updateItemOnHand()
  1730. if hasItemOnHand == 0 and itemOnHand then hi = 1 end
  1731. if hasItemOnHand == 1 and itemOnHand == nil then hi = 1 end
  1732. end
  1733. --if (key == "0" or key == "1" or key == "2"
  1734. -- or key == "3" or key == "4" or key == "5"
  1735. -- or key == "6" or key == "7") and hasItemOnHand == 0 then hi = 1 end
  1736. selectLabel.Position = UDim2.new(0.5, -160 + ((selectedBlock)*40), 1, -105)
  1737. end)
  1738.  
  1739. local changedPerspective = 0
  1740. Mouse.KeyUp:connect(function(key)
  1741. if sprinting == false then sprintingNum = 0 else sprintingNum = 1 end
  1742. if (key == "w" and sprinting == true and sneaking == 0) then
  1743. sprinting = false
  1744. humanoid.WalkSpeed = humanoid.WalkSpeed / 1.5
  1745. coroutine.resume(coroutine.create(function()
  1746. for i = 1, 24 do
  1747. camera.FieldOfView = camera.FieldOfView - ((24-i)/10)
  1748. RS:wait()
  1749. end
  1750. end))
  1751. end
  1752. if key == "q" and sprinting == false then
  1753. sneaking = 0
  1754. humanoid.WalkSpeed = humanoid.WalkSpeed * 2
  1755. humanoid.HipHeight = humanoid.HipHeight + 0.35
  1756. rootJoint.C1 = CFrame.new(0, 0.05, 0) * CFrame.Angles(0, 0, 0)
  1757. lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  1758. rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(0, 0, 0)
  1759. --print("Stopped sneaking...")
  1760. end
  1761. if key == "r" then
  1762. if changedPerspective == 0 then
  1763. changedPerspective = 1
  1764. camera.CFrame = camera.CFrame * CFrame.Angles(0, math.rad(180), 0)
  1765. elseif changedPerspective == 1 then
  1766. changedPerspective = 0
  1767. camera.CFrame = camera.CFrame * CFrame.Angles(0, math.rad(-180), 0)
  1768. end
  1769. end
  1770. end)
  1771.  
  1772. Mouse.TargetFilter = camera
  1773.  
  1774. local humOffset = CFrame.new(0, 0, 0)
  1775. local camHandY = 0
  1776. local cameraHandCFrame = CFrame.new(1.15, -1.35, -2) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(55), math.rad(20))
  1777. local bodyRot = CFrame.new(0, 0, 0)
  1778. while RS:wait() do
  1779. camCurrentZoom = ((CFrame.new(0, -1*sneaking, 0) * camera.CFrame).p - head.Position).magnitude
  1780. if itemOnHand ~= nil then
  1781. hasItemOnHand = 1
  1782. handItem.Transparency = itemOnHand.transparency
  1783. else
  1784. hasItemOnHand = 0
  1785. handItem.Transparency = 1
  1786. end
  1787. if humanoid.Health < oldHP then
  1788. damageTime = 60
  1789. sound:Play()
  1790. end
  1791. oldHP = humanoid.Health
  1792. if damageTime > 0 and humanoid.Health > 0 then
  1793. for _,p in pairs(char:GetChildren()) do
  1794. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  1795. if p.Name == "DamagePart" then
  1796. p.Transparency = 0.5
  1797. end
  1798. end
  1799. end
  1800. damageTime = damageTime - 2
  1801. if damageTime <= 0 then
  1802. for _,p in pairs(char:GetChildren()) do
  1803. if p.Name ~= "HumanoidRootPart" and p.ClassName == "Part" then
  1804. if p.Name == "DamagePart" then
  1805. p.Transparency = 1
  1806. end
  1807. end
  1808. end
  1809. end
  1810. end
  1811. camPart.CFrame = camera.CFrame * CFrame.Angles(0, math.rad(changedPerspective*180), 0)
  1812.  
  1813. if getMagnitudeXZ(torso.Velocity) > 1 then
  1814. if walkAnim >= 1 then
  1815. increaseWalkAnim = -1
  1816. elseif walkAnim <= -1 then
  1817. increaseWalkAnim = 1
  1818. end
  1819. walkAnim = walkAnim + (increaseWalkAnim/(10+(sneaking*20))) * ((5 + getMagnitudeXZ(torso.Velocity))/20)
  1820. else
  1821. walkAnim = 0
  1822. end
  1823.  
  1824. --lH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(-math.rad(sneaking*45), 0, 0)
  1825. --rH.C0 = CFrame.new(0, 0.975, 0) * CFrame.Angles(math.rad(sneaking*45), 0, 0)
  1826. 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)
  1827. 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)
  1828. --
  1829. --rootJoint.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  1830. --print(math.abs(head.Orientation.Y) - math.abs(humRootPart.Orientation.Y))
  1831. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) > 45 then
  1832. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(-45 + head.Orientation.Y), 0)
  1833. --print("-45")
  1834. --end
  1835. --if (head.Orientation.Y * 2) - (head.Orientation.Y + torso.Orientation.Y) < -45 then
  1836. --humRootPart.CFrame = humRootPart.CFrame * CFrame.Angles(0, math.rad(45 + head.Orientation.Y), 0)
  1837. --print("45")
  1838. --end
  1839.  
  1840. if changedItem then
  1841. changedItem = false
  1842. coroutine.resume(coroutine.create(function()
  1843. for i = 1, 8 do
  1844. camHandY = camHandY - 0.2
  1845. RS:wait()
  1846. end
  1847. for i = 1, 8 do
  1848. camHandY = camHandY + 0.2
  1849. RS:wait()
  1850. end
  1851. end))
  1852. end
  1853.  
  1854. --move these arms
  1855. rootJoint.C1 = rootJoint.C1:lerp(CFrame.new(0, 0.325, 0) * CFrame.Angles(math.rad(sneaking*45), math.rad(punchRotY), 0), 0.2)
  1856.  
  1857. 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)
  1858. 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)
  1859.  
  1860. if Mouse.Target and getDistance(head.CFrame.p, Mouse.Hit.p) <= 10.4 then
  1861. if Mouse.Target.Parent:FindFirstChild("Humanoid") == nil and Mouse.Target.Parent ~= camera then
  1862. selectBox.Adornee = Mouse.Target
  1863. else
  1864. selectBox.Adornee = nil
  1865. end
  1866. else
  1867. selectBox.Adornee = nil
  1868. end
  1869.  
  1870. --local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  1871.  
  1872. --neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
  1873. --neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
  1874.  
  1875. --print(AngleDifference(camPart.Orientation, torso.Orientation).Y)
  1876.  
  1877. local BobbingY = walkAnim*2
  1878. if BobbingY >= 1 then BobbingY = -BobbingY + 0.5 end
  1879.  
  1880. cameraHandCFrame = cameraHandCFrame:lerp(CFrame.new(1.15*1.3 + (walkAnim/2 - (walkAnim/3)), -1.35*1.3 + camHandY + (-BobbingY/8), -0.45 + ((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)
  1881.  
  1882. humOffset = humOffset:lerp(CFrame.new(walkAnim/4 - (walkAnim/8), BobbingY/13, 0), 0.25)
  1883. humanoid.CameraOffset = Vector3.new(humOffset.X, humOffset.Y, 0)
  1884.  
  1885. cameraHand.CFrame = camPart.CFrame * cameraHandCFrame
  1886.  
  1887. 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)
  1888.  
  1889. if camCurrentZoom >= 1.5 then
  1890. cameraHand.Transparency = 1
  1891. for _,t in pairs(cameraHand:GetChildren()) do
  1892. if t.Transparency == 0 then
  1893. t.Transparency = 1
  1894. end
  1895. end
  1896. for _,t in pairs(cameraHandItem:GetChildren()) do
  1897. if t.Transparency == 0 then
  1898. t.Transparency = 1
  1899. end
  1900. end
  1901. else
  1902. changedPerspective = 0
  1903. cameraHand.Transparency = hasItemOnHand
  1904. for _,t in pairs(cameraHand:GetChildren()) do
  1905. if t.Transparency == 1 then
  1906. t.Transparency = hasItemOnHand
  1907. end
  1908. end
  1909. for _,t in pairs(cameraHandItem:GetChildren()) do
  1910. if t.Transparency == 1 then
  1911. t.Transparency = 0
  1912. end
  1913. end
  1914. end
  1915.  
  1916. if updateHand == true then
  1917. updateHand = false
  1918. updateItemOnHand()
  1919. end
  1920.  
  1921. if punching == 1 and punchEnded == 1 then
  1922. punching = 0
  1923. --print("steve uses punch!!")
  1924. local coPunchCam = coroutine.wrap(function()
  1925. local mult = 2
  1926. punchRotXcam = 40/2*mult
  1927. punchRotYcam = 25/2*mult
  1928. wait(0.075/2)
  1929. punchRotXcam = 50/2*mult
  1930. punchRotYcam = 25*mult
  1931. punchRotZcam = -10*mult
  1932. wait(0.075/2)
  1933. punchRotYcam = 50/1.5*mult
  1934. punchRotXcam = -10*mult
  1935. --wait(0.075/2)
  1936. --punchRotYcam = 50
  1937. --punchRotXcam = -10
  1938. wait(0.02)
  1939. punchRotXcam = -20*mult
  1940. wait(0.055)
  1941. punchRotXcam = 0
  1942. punchRotYcam = 0
  1943. punchRotZcam = 0
  1944. end)
  1945. local coPunch = coroutine.wrap(function()
  1946. punchEnded = 0
  1947. punchSpeed = 1
  1948. punchRotX = -60
  1949. punchRotY = -8
  1950. punchRotZ = -35
  1951.  
  1952. wait(0.075/1.3)
  1953. punchSpeed = 1
  1954. punchRotX = -75
  1955. punchRotY = 8
  1956. punchRotZ = 40
  1957. wait(0.075/1.3)
  1958. punchSpeed = 1
  1959. punchRotX = -20
  1960. punchRotZ = 40
  1961. wait(0.075/1.3)
  1962. punchSpeed = 3.5
  1963. punchRotX = 0
  1964. punchRotY = 0
  1965. punchRotZ = 0
  1966.  
  1967. punchRotXcam = 0
  1968. punchRotYcam = 0
  1969. punchRotZcam = 0
  1970.  
  1971. punchEnded = 1
  1972. wait(0.06/1.3)
  1973. punchSpeed = 0
  1974. end)
  1975. coPunch()
  1976. coPunchCam()
  1977. end
  1978. if ticks > 20 then
  1979. ticks = 0
  1980. if times == 0 then
  1981. times = times + 1
  1982. idleAnimRotX = -1
  1983. idleAnimRotZ = 0
  1984. elseif times == 1 then
  1985. times = times + 1
  1986. idleAnimRotX = -0.75
  1987. idleAnimRotZ = -0.75
  1988. elseif times == 2 then
  1989. times = times + 1
  1990. idleAnimRotX = 0
  1991. idleAnimRotZ = -1
  1992. elseif times == 3 then
  1993. times = times + 1
  1994. idleAnimRotX = 0.75
  1995. idleAnimRotZ = -0.75
  1996. --idleAnimRotX = 0.75
  1997. --idleAnimRotZ = -0
  1998. elseif times == 4 then
  1999. times = times + 1
  2000. idleAnimRotX = 1
  2001. idleAnimRotZ = 0
  2002. --idleAnimRotX = 1
  2003. --idleAnimRotZ = 0
  2004. elseif times == 5 then
  2005. times = times + 1
  2006. idleAnimRotX = 0.75
  2007. idleAnimRotZ = 0.75
  2008. elseif times == 6 then
  2009. times = times + 1
  2010. idleAnimRotX = 0
  2011. idleAnimRotZ = 1
  2012. elseif times == 7 then
  2013. times = 0
  2014. idleAnimRotX = -0.75
  2015. idleAnimRotZ = 0.75
  2016. end
  2017. end
  2018.  
  2019. if hi == 1 then hi = 0 end
  2020.  
  2021. local rotX = math.deg(math.atan2(humanoid.MoveDirection.Z, humanoid.MoveDirection.X)) + 90
  2022. if humanoid.MoveDirection ~= Vector3.new(0, 0, 0) then
  2023. --print(rotX)
  2024. bodyRot = bodyRot:lerp(CFrame.Angles(0, -math.rad(rotX), 0), 0.125)
  2025. humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * bodyRot
  2026. end
  2027. local neckYRot = math.rad(camPart.Orientation.Y - torso.Orientation.Y)
  2028. neck.C1 = CFrame.new(0, 0.975, 0) * CFrame.fromEulerAnglesXYZ(math.rad(sneaking*45), neckYRot, 0)
  2029. neck.C0 = CFrame.new(0, -0.65, 0) * CFrame.Angles(-math.rad(camPart.Orientation.X - torso.Orientation.X - (sneaking*45)), 0, 0)
  2030.  
  2031. local oldTorsoOrientation = torso.Orientation
  2032. if AngleDifference(camPart.Orientation, torso.Orientation).Y > 45 then
  2033. 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)
  2034. bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y + 45), 0)
  2035. --print("-45")
  2036. elseif AngleDifference(camPart.Orientation, torso.Orientation).Y < -45 then
  2037. 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)
  2038. bodyRot = CFrame.Angles(0, math.rad(head.Orientation.Y - 45), 0)
  2039. --print("45")
  2040. end
  2041.  
  2042. neck.C1 = neck.C1 * CFrame.fromEulerAnglesXYZ(0, -math.rad(AngleDifference(oldTorsoOrientation, torso.Orientation).Y), 0)
  2043. ticks = ticks + 1
  2044. end
  2045. end
  2046. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement