gosha gosha

All generations.

fix invalid codeSun, 19 Feb 2023

local runModule = require(game.ReplicatedStorage.RunModule) local HUMANOID = game.Players.LocalPlayer.Character.Humanoid local SPRINT_SPEED = 50 local sprintInput = {Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift} game:GetService("UserInputService").InputBegan:Connect(function(input,processed) if processed then return end if table.find(sprintInput, input.KeyCode) then HUMANOID.WalkSpeed = SPRINT_SPEED runModule:Activate("sprint") end end) game:GetService("UserInputService").InputEnded:Connect(function(input,processed) if processed then return end if table.find(sprintInput, input.KeyCode) then HUMANOID.WalkSpeed = 16 runModule:Deactivate("sprint") end end)

generate functionSun, 12 Feb 2023

Html

const Html = (name, heigth, width, backgroundColor) => { const html = `<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>${name}</title> </head> <body style="height:${heigth}px; width:${width}px; background-color:${backgroundColor};"> </body> </html>`; return html; }; console.log(Html("abc", 100, 100, "red"));

Javascript
View
generate functionTue, 14 Feb 2023

Self-destruction lever with a timer and alarm.

Script function selfDestructionWithTimer(selfDestructionTimer) { const time = new Date().getTime() + (selfDestructionTimer * 1000); function selfDestruction() { const now = new Date().getTime(); if (now >= time) { alert("boom"); } else { setTimeout(selfDestruction, time - now) } } selfDestruction() }

Java
View
fix invalid codeSun, 12 Feb 2023

private void OnTriggerEnter(Collider other) { if (other.CompareTag("Enemy")) { Debug.Log("EnemyIn"); doorClose = true; } } private void OnTriggerExit(Collider other) { if (other.CompareTag("Enemy")) { Debug.Log("EnemyOut"); doorClose = false; } }

private void OnTriggerEnter(Collider other) { if (other.CompareTag("Enemy")) { Debug.Log("EnemyIn"); doorClose = true; } } private void OnTriggerExit(Collider other) { if (other.CompareTag("Enemy")) { Debug.Log("EnemyOut"); doorClose = false; } }

generate functionSun, 12 Feb 2023

if user clicked the button computer will automaticly shutdown.

from tkinter import * from tkinter import ttk from tkinter import messagebox import os root = Tk() root.title("Shutdown App") root.geometry("250x100") def shutdown(): os.system("shutdown /s /t 1") def cancel(): os.system("shutdown /a") messagebox.showinfo("Shutdown Canceled", "Shutdown was canceled by the user") button = ttk.Button(root, text="Shutdown", command=shutdown) button.pack() button2 = ttk.Button(root, text="Cancel", command=cancel) button2.pack() root.mainloop()

Python
View
generate functionSun, 12 Feb 2023

If the shutdown timer is started, then show how much time you have with functional buttons.

from time import sleep def timer(h, m, s): print("Shutdown Timer Started... ") counter = (h*3600) + (m*60) + s for i in range(counter): sleep(1) counter -= 1 print(counter) def show_timer(h, m, s): if (m > 59): print("Please enter a value less than 60 for minute") elif (s > 59): print("Please enter a value less than 60 for second") else: timer(h, m, s) show_timer(0, 0, 1)

Python
View
css from descriptionSun, 12 Feb 2023

Scary style for website

* { margin: 0; padding: 0; box-sizing: border-box; } .container { width: 100px; height: 100px; background-color: #a8b8d8; } .container:hover { background-color: #ffa000; } .container > span { display: inline-block; padding: 10px; background-color: #000; color: #fff; font-family: Arial, sans-serif; border-radius: 0 0 5px 5px; } .container > span::before { content: ""; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background-color: #000; border-radius: 5px 5px 0 0; }

translateSun, 12 Feb 2023

* { margin: 0; padding: 0; box-sizing: border-box; } .container { width: 100px; height: 100px; background-color: #a8b8d8; } .container:hover { background-color: #ffa000; } .container > span { display: inline-block; padding: 10px; background-color: #000; color: #fff; font-family: Arial, sans-serif; border-radius: 0 0 5px 5px; } .container > span::before { content: ""; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background-color: #000; border-radius: 5px 5px 0 0; }

function add(a, b) { return a + b; }

Javascript
View
translateSun, 12 Feb 2023

* { margin: 0; padding: 0; box-sizing: border-box; } .container { width: 100px; height: 100px; background-color: #a8b8d8; } .container:hover { background-color: #ffa000; } .container > span { display: inline-block; padding: 10px; background-color: #000; color: #fff; font-family: Arial, sans-serif; border-radius: 0 0 5px 5px; } .container > span::before { content: ""; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background-color: #000; border-radius: 5px 5px 0 0; }

function add(a, b) { return a + b; }

Javascript
View
css from descriptionSun, 12 Feb 2023

Cool style

.container { ... box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); transition: all 0.3s; ... } .container:hover { ... box-shadow: 0 0 10px rgba(0, 0, 0, 1); transform: translateY(-2px); ... }

generate functionSun, 12 Feb 2023

Html with password system.

const password = 'abcdef'; const password = 'abcd'; function checkPassword(password) { if (password === 'abcdef') { return true; } else { return false; } } checkPassword(password);

Javascript
View

Questions about programming?Chat with your personal AI assistant